Opened 2 years ago

Closed 5 weeks ago

#2393 closed enhancement (fixed)

python3 pystac update

Reported by: darkblueb Owned by: osgeolive@…
Priority: major Milestone: OSGeoLive17.0
Component: OSGeoLive Keywords: python
Cc: osgeolive@…

Description

ol15 build 179 -- python3 pySTAC dot-deb 1.4.0 exists but v1.6 is current

user@osgeolive:~$ pip3 install --user --upgrade-strategy=only-if-needed pystac
Collecting pystac
  Downloading pystac-1.6.1-py3-none-any.whl (146 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 146.0/146.0 KB 395.0 kB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.7.0 in /usr/lib/python3/dist-packages (from pystac) (2.8.1)
Installing collected packages: pystac
Successfully installed pystac-1.6.1
user@osgeolive:~$ apt search pystac
Sorting... Done
Full Text Search... Done
python3-pystac/jammy 1.4.0-0~jammy0 all
  PySTAC is a library for working with SpatioTemporal Asset Catalog in Python 3.

python3-pystac-client/jammy 0.4.0-0~jammy0 all
  A Python client for working with STAC Catalogs and APIs.

note: we can drop ipyleaflet in the ISO, it is currently not working.

python3-ipyleaflet/jammy,now 0.17.0-0~jammy1 all [installed]
  A Jupyter widget for dynamic Leaflet maps.

Change History (17)

comment:1 by darkblueb, 2 years ago

note that python3-odc-stac/jammy,jammy 0.3.1-0~jammy0 all is now available

comment:2 by darkblueb, 2 years ago

per comments at FOSS4G STAC presentation

FOSS4G   Pete Gadomski	pete.gadomski at Gmail 

        pystac  v1.6.1    r/w static collections, catalogs, objects
 pystac-client  v0.4.0    r/w stac api
     stactools  v0.4.1    create,modify utils
      odc-stac  v0.3.1    load stac assets into xarray

compare to ol15 RC1

        pystac  v1.4.0    r/w static collections, catalogs, objects
 pystac-client     n/a    r/w stac api
     stactools     n/a    create,modify utils
      odc-stac  v0.3.0    load stac assets into xarray
repos
      stac-utils/pystac
      stac-utils/pystac-client
      stac-utils/stactools
      opendatacube/odc-stac

comment:3 by kalxas, 2 years ago

Cc: osgeolive@… added

comment:4 by kalxas, 2 years ago

Milestone: OSGeoLive15.0OSGeoLive16.0

Ticket retargeted after milestone closed

comment:5 by darkblueb, 19 months ago

ol16 alpha3 build

        pystac  v1.4.0    r/w static collections, catalogs, objects
 pystac-client     n/a    r/w stac api
     stactools     n/a    create,modify utils
      odc-stac  v0.3.1    load stac assets into xarray
       odc-geo  v0.2.1    projection aware Geometry comp. w/ Open Data Cube

comment:6 by darkblueb, 18 months ago

same in beta1 build

comment:7 by darkblueb, 15 months ago

ol16rc1

user@osgeolive:~$ pip3 install --user stac-asset[cli]

Collecting stac-asset[cli]
  Downloading stac_asset-0.2.2-py3-none-any.whl (33 kB)
Collecting aiobotocore>=2.5.0
  Downloading aiobotocore-2.6.0-py3-none-any.whl (73 kB)
    ━*********************************━━ 73.4/73.4 KB 267.2 kB/s eta 0:00:00
Collecting yarl>=1.9.2
  Downloading yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (268 kB)
   ━*********************************━━ 268.8/268.8 KB 274.9 kB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.7.0 in /usr/lib/python3/dist-packages (from stac-asset[cli]) (2.8.1)
Collecting pystac>=1.7.3
  Downloading pystac-1.8.3-py3-none-any.whl (175 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.6/175.6 KB 278.1 kB/s eta 0:00:00
Collecting aiohttp>=3.8.4
  Downloading aiohttp-3.8.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
   ━*********************************━━ 1.0/1.0 MB 270.1 kB/s eta 0:00:00
Collecting aiofiles>=23.1.0
  Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)
Collecting tabulate~=0.9.0
  Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting click-logging~=1.0.1
  Downloading click_logging-1.0.1-py2.py3-none-any.whl (6.6 kB)
Collecting click~=8.1.5
  Downloading click-8.1.7-py3-none-any.whl (97 kB)
    ━*********************************━━ 97.9/97.9 KB 252.1 kB/s eta 0:00:00
Collecting tqdm~=4.66.1
  Downloading tqdm-4.66.1-py3-none-any.whl (78 kB)
     ━*********************************━━ 78.3/78.3 KB 285.4 kB/s eta 0:00:00
Collecting botocore<1.31.18,>=1.31.17
  Downloading botocore-1.31.17-py3-none-any.whl (11.1 MB)
     ━**********************************━ 11.1/11.1 MB 280.4 kB/s eta 0:00:00
Collecting aioitertools<1.0.0,>=0.5.1
  Downloading aioitertools-0.11.0-py3-none-any.whl (23 kB)


Successfully installed aiobotocore-2.6.0 aiofiles-23.2.1 aiohttp-3.8.5 aioitertools-0.11.0 botocore-1.31.17 click-8.1.7 click-logging-1.0.1 pystac-1.8.3 stac-asset-0.2.2 tabulate-0.9.0 tqdm-4.66.1 yarl-1.9.2

comment:8 by darkblueb, 9 months ago

ubuntu-gis https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental/+packages

pystac Changelog shows

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.7.5] - 2023-09-05

### Fixed

- `--matched` flag in CLI [#588](https://github.com/stac-utils/pystac-client/pull/588)

## [v0.7.4] - 2023-09-05

### Changed

- Don't provide a `limit` by default, trust the server to know its limits [#584](https://github.com/stac-utils/pystac-client/pull/584)

## [v0.7.3] - 2023-08-21

### Changed

comment:9 by darkblueb, 9 months ago

testing

pystac_client-0.7.6
pystac-1.9.0

 ~/srcs_vm16/tmp_pystac/stac-validator-3.3.2 $ pytest-3 tests
================================================ test session starts ================================================
platform linux -- Python 3.10.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: tmp_pystac/stac-validator-3.3.2
plugins: mypy-0.10.3, hydra-core-1.3.2, bdd-3.2.1, flaky-3.7.0, django-3.5.1
collected 64 items                                                                                                  

tests/test_assets.py F..     
tests/test_core.py .......... 
tests/test_custom.py ........... 
tests/test_default.py .s......   
tests/test_extensions.py s..........   
tests/test_links.py ..   
tests/test_recursion.py ..........  
tests/test_sys_exit.py ...          
tests/test_validate_dict.py ...   
tests/test_validate_item_collection.py ... 

comment:10 by kalxas, 7 months ago

Milestone: OSGeoLive16.0OSGeoLive17.0

Ticket retargeted after milestone closed

comment:11 by darkblueb, 3 months ago

odc-stac 0.3.1-0~noble0 not yet updated

pystac 1.9.0

current release pystac https://github.com/stac-utils/pystac/releases/tag/v1.10.1

newly added

stac-check 1.3.3+ds-2~noble0

stactools 0.5.3-2~noble0

#--

Last edited 3 months ago by darkblueb (previous) (diff)

comment:12 by darkblueb, 3 months ago

ol17a1

user@osgeolive:~/stac-validator-3.3.2$ pytest tests/
================================ test session starts =================================
platform linux -- Python 3.12.3, pytest-7.4.4, pluggy-1.4.0
rootdir: /home/user/stac-validator-3.3.2
collected 64 items                                                                   

tests/test_assets.py F..                                                       [  4%]
tests/test_core.py ..........                                                  [ 20%]
tests/test_custom.py ...........                                               [ 37%]
tests/test_default.py .s......                                                 [ 50%]
tests/test_extensions.py s..........                                           [ 67%]
tests/test_links.py ..                                                         [ 70%]
tests/test_recursion.py ..........                                             [ 85%]
tests/test_sys_exit.py FFF                                                     [ 90%]
tests/test_validate_dict.py ...                                                [ 95%]
tests/test_validate_item_collection.py ...                                     [100%]

comment:13 by darkblueb, 2 months ago

ol17_build83

odc-stac        0.3.1-0~noble0

not yet updated ? It looks like odc-stac is now at version 3 dot ten. The source tree CHANGELOG includes ## [v0.3.1] - 2022-06-28

The installed version has not been tested for compatibility with python 3.12

Last edited 2 months ago by darkblueb (previous) (diff)

comment:14 by darkblueb, 6 weeks ago

ol17_build92

user@osgeolive:~$   pip3 install --upgrade --break-system-packages   pystac-client
...
Requirement already satisfied: pystac-client in /usr/lib/python3/dist-packages (0.7.6)

Collecting pystac-client
  Downloading pystac_client-0.8.5-py3-none-any.whl.metadata (5.1 kB)

Requirement already satisfied: requests>=2.28.2 in /usr/lib/python3/dist-packages (from pystac-client) (2.31.0)

Collecting pystac>=1.10.0 (from pystac[validation]>=1.10.0->pystac-client)
  Downloading pystac-1.11.0-py3-none-any.whl.metadata (4.5 kB)

Requirement already satisfied: python-dateutil>=2.8.2 in /usr/lib/python3/dist-packages (from pystac-client) (2.8.2)
Collecting jsonschema~=4.18 (from pystac[validation]>=1.10.0->pystac-client)
  Downloading jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Requirement already satisfied: attrs>=22.2.0 in /usr/lib/python3/dist-packages (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac-client) (23.2.0)
Collecting jsonschema-specifications>=2023.03.6 (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac-client)
  Downloading jsonschema_specifications-2024.10.1-py3-none-any.whl.metadata (3.0 kB)
Collecting referencing>=0.28.4 (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac-client)
  Downloading referencing-0.35.1-py3-none-any.whl.metadata (2.8 kB)
Collecting rpds-py>=0.7.1 (from jsonschema~=4.18->pystac[validation]>=1.10.0->pystac-client)
  Downloading rpds_py-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.2 kB)

Downloading pystac_client-0.8.5-py3-none-any.whl (41 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.9/41.9 kB 273.6 kB/s eta 0:00:00

Downloading pystac-1.11.0-py3-none-any.whl (183 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 183.9/183.9 kB 278.2 kB/s eta 0:00:00

Downloading jsonschema-4.23.0-py3-none-any.whl (88 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.5/88.5 kB 272.7 kB/s eta 0:00:00
Downloading jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB)
Downloading referencing-0.35.1-py3-none-any.whl (26 kB)
Downloading rpds_py-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (357 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 358.0/358.0 kB 272.2 kB/s eta 0:00:00
Installing collected packages: rpds-py, pystac, referencing, jsonschema-specifications, jsonschema, pystac-client
  WARNING: The script jsonschema is installed in '/home/user/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                                                             
  WARNING: The script stac-client is installed in '/home/user/.local/bin' which is not on PATH.         
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                                                             
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.                                  
pywps 4.6.0 requires geotiff, which is not installed.                                                   
Successfully installed jsonschema-4.23.0 jsonschema-specifications-2024.10.1 pystac-1.11.0 pystac-client-0.8.5 referencing-0.35.1 rpds-py-0.20.0

/var/lib/dpkg/info/python3-pystac-client.list

comment:15 by darkblueb, 6 weeks ago

https://pypi.org/project/geotiff/

user@osgeolive:~$   pip3  install --break-system-packages   geotiff
...
Collecting geotiff
  Downloading geotiff-0.2.10-py3-none-any.whl.metadata (7.2 kB)

Collecting tifffile!=2022.4.28,>=2021.7.4 (from geotiff)
  Downloading tifffile-2024.9.20-py3-none-any.whl.metadata (32 kB)

Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from geotiff) (1.26.4)
Requirement already satisfied: pyproj in /usr/lib/python3/dist-packages (from geotiff) (3.6.1)
Collecting zarr<2.13,>=2.12.0 (from geotiff)
  Downloading zarr-2.12.0-py3-none-any.whl.metadata (4.6 kB)

Collecting asciitree (from zarr<2.13,>=2.12.0->geotiff)
  Downloading asciitree-0.3.3.tar.gz (4.0 kB)
  Preparing metadata (setup.py) ... done
Collecting fasteners (from zarr<2.13,>=2.12.0->geotiff)
  Downloading fasteners-0.19-py3-none-any.whl.metadata (4.9 kB)
Collecting numcodecs>=0.6.4 (from zarr<2.13,>=2.12.0->geotiff)
  Downloading numcodecs-0.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.9 kB)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pyproj->geotiff) (2023.11.17)
Downloading geotiff-0.2.10-py3-none-any.whl (19 kB)
Downloading tifffile-2024.9.20-py3-none-any.whl (228 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 228.2/228.2 kB 271.8 kB/s eta 0:00:00
Downloading zarr-2.12.0-py3-none-any.whl (185 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 185.8/185.8 kB 283.1 kB/s eta 0:00:00
Downloading numcodecs-0.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.9/8.9 MB 251.8 kB/s eta 0:00:00
Downloading fasteners-0.19-py3-none-any.whl (18 kB)
Building wheels for collected packages: asciitree
  Building wheel for asciitree (setup.py) ... done
  Created wheel for asciitree: filename=asciitree-0.3.3-py3-none-any.whl size=5033 sha256=725f9237de51b51efe39a3f84758ae5339e956e54c961d509385dcb2778b9875
  Stored in directory: /home/user/.cache/pip/wheels/a5/d7/98/f56ae733748cd0fa577172bda0e73e0b1f1793c98e09b9e458
Successfully built asciitree
Installing collected packages: asciitree, tifffile, numcodecs, fasteners, zarr, geotiff
  WARNING: The scripts lsm2bin, tiff2fsspec, tiffcomment and tifffile are installed in '/home/user/.local/bin' which is not on PATH.                                                                            
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
                                                                                             
Successfully installed asciitree-0.3.3 fasteners-0.19 geotiff-0.2.10 numcodecs-0.13.1 tifffile-2024.9.20 zarr-2.12.0

Last edited 6 weeks ago by darkblueb (previous) (diff)

comment:16 by darkblueb, 5 weeks ago

ol17_build95

  • running pytest-3 on odc-stac-0.3.10 fails.
  • sudo apt install python3-referencing does improve but not cure
  • per AlexLeith; tests (and libs?) need a newer jsonschema
  • available python3-jsonschema (4.10.3-2ubuntu1) does not fix the tests
  • pip3 install jsonschema (4.23.0-py3) does fix the tests
user@osgeolive:~/Downloads$ pip3 install --upgrade --break-system-packages jsonschema
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jsonschema in /usr/lib/python3/dist-packages (4.10.3)
Collecting jsonschema
  Downloading jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Requirement already satisfied: attrs>=22.2.0 in /usr/lib/python3/dist-packages (from jsonschema) (23.2.0)
Collecting jsonschema-specifications>=2023.03.6 (from jsonschema)
  Downloading jsonschema_specifications-2024.10.1-py3-none-any.whl.metadata (3.0 kB)
Requirement already satisfied: referencing>=0.28.4 in /usr/lib/python3/dist-packages (from jsonschema) (0.31.0)
Requirement already satisfied: rpds-py>=0.7.1 in /usr/lib/python3/dist-packages (from jsonschema) (0.12.0)
Downloading jsonschema-4.23.0-py3-none-any.whl (88 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.5/88.5 kB 288.7 kB/s eta 0:00:00
Downloading jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB)
Installing collected packages: jsonschema-specifications, jsonschema
  WARNING: The script jsonschema is installed in '/home/user/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                                                           
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.                                
pywps 4.6.0 requires geotiff, which is not installed.                                                  
Successfully installed jsonschema-4.23.0 jsonschema-specifications-2024.10.1                           
user@osgeolive:~/Downloads$ 
user@osgeolive:~/Downloads$ echo $PATH
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
user@osgeolive:~/Downloads$ PATH=$PATH:/home/user/.local/bin/
user@osgeolive:~/Downloads$ ls
demo_odcgeo.py                              osgeo-desktop_1.png
gdal-data_3.9.3+dfsg-1~noble0_all.deb       osgeo-desktop_2.png
gdal-plugins_3.9.3+dfsg-1~noble0_amd64.deb  python3-datacube_1.8.19-0~noble1_all.deb
libgdal35_3.9.3+dfsg-1~noble0_amd64.deb     python3-deprecat_2.1.3-0~noble0_all.deb
libgdal-dev_3.9.3+dfsg-1~noble0_amd64.deb   python3-eodag_2.12.1-1~noble0_all.deb
odc-geo-0.4.8/                              python3-gdal_3.9.3+dfsg-1~noble0_amd64.deb
odc-geo-0.4.8.tar.gz                        python3-odc-geo_0.4.8-0~noble0_all.deb
odc-stac-0.3.10/                            python3-odc-stac_0.3.10-0~noble0_all.deb
odc-stac-0.3.10.tar.gz
user@osgeolive:~/Downloads$ pytest-3 odc-stac-0.3.10/tests/
========================================= test session starts =========================================
platform linux -- Python 3.12.3, pytest-7.4.4, pluggy-1.4.0
rootdir: /home/user/Downloads/odc-stac-0.3.10
plugins: anyio-4.2.0
collected 60 items / 1 skipped                                                                        

odc-stac-0.3.10/tests/test_eo3converter.py ..........                                           [ 16%]
odc-stac-0.3.10/tests/test_load.py ...                                                          [ 21%]
odc-stac-0.3.10/tests/test_mdtools.py .............x......................                      [ 81%]
odc-stac-0.3.10/tests/test_model.py ...........                                                 [100%]

========================================== warnings summary ===========================================
../../../usr/lib/python3/dist-packages/xarray/core/duck_array_ops.py:215: 2 warnings
tests/test_load.py: 4 warnings
tests/test_model.py: 10 warnings
  /usr/lib/python3/dist-packages/xarray/core/duck_array_ops.py:215: DeprecationWarning: parsing timezone aware datetimes is deprecated; this will raise an error in the future
    return data.astype(dtype, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 59 passed, 1 skipped, 1 xfailed, 16 warnings in 8.22s ========================
Last edited 5 weeks ago by darkblueb (previous) (diff)

comment:17 by kalxas, 5 weeks ago

Resolution: fixed
Status: newclosed

Completed in ppa

Note: See TracTickets for help on using tickets.