Skip to content

Commit

Permalink
Pin max versions of all major dependencies for future compatibility (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet authored Feb 1, 2024
1 parent 67d5dc7 commit cde8ea6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
use-mamba: true
channel-priority: strict
activate-environment: geoutils-dev
python-version:

- name: Get month for resetting cache
id: get-date
Expand All @@ -48,7 +49,7 @@ jobs:
path: ${{ env.CONDA }}/envs
key: conda-${{ matrix.os }}-${{ matrix.python-version }}-${{ env.cache_date }}-${{ hashFiles('dev-environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
CACHE_NUMBER: 0 # Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 1 # Increase this value to reset cache if environment.yml has not changed
id: cache

# The trick below is necessary because the generic environment file does not specify a Python version, and ONLY
Expand All @@ -60,7 +61,7 @@ jobs:
run: |
mamba install pyyaml python=${{ matrix.python-version }}
python .github/scripts/generate_yml_env_fixed_py.py --pyv ${{ matrix.python-version }} --add "graphviz" "environment.yml"
mamba env update -n xdem-dev -f environment-ci-py${{ matrix.python-version }}.yml
mamba env update -n geoutils-dev -f environment-ci-py${{ matrix.python-version }}.yml
- name: Install project
run: pip install -e . --no-dependencies
Expand Down
17 changes: 9 additions & 8 deletions dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ channels:
- conda-forge
dependencies:
- python>=3.9,<3.12
- geopandas>=0.12.0
- matplotlib
- pyproj
- rasterio>=1.3
- numpy
- scipy
- geopandas>=0.12.0,<0.14
- matplotlib=3.*
- pyproj=3.*
- rasterio>=1.3,<2
- pandas=1.*
- numpy=1.*
- scipy=1.*
- tqdm
- xarray
- rioxarray
- rioxarray=0.*

# Development-specific, to mirror manually in setup.cfg [options.extras_require].
- pip
Expand All @@ -20,7 +21,7 @@ dependencies:
- scikit-image

# Test dependencies
- pytest
- pytest=7.*
- pytest-xdist
- pytest-lazy-fixture
- pyyaml
Expand Down
15 changes: 8 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ channels:
- conda-forge
dependencies:
- python>=3.9,<3.12
- geopandas>=0.12.0
- matplotlib
- pyproj
- rasterio>=1.3
- numpy
- scipy
- geopandas>=0.12.0,<0.14
- matplotlib=3.*
- pyproj=3.*
- rasterio>=1.3,<2
- pandas=1.*
- numpy=1.*
- scipy=1.*
- tqdm
- xarray
- rioxarray
- rioxarray=0.*
15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This file is auto-generated from environment.yml, do not modify.
# See that file for comments about the need/usage of each dependency.

geopandas>=0.12.0
matplotlib
pyproj
rasterio>=1.3
numpy
scipy
geopandas>=0.12.0,<0.14
matplotlib==3.*
pyproj==3.*
rasterio>=1.3,<2
pandas==1.*
numpy==1.*
scipy==1.*
tqdm
xarray
rioxarray
rioxarray==0.*
setuptools>=64
setuptools_scm[toml]>=8

0 comments on commit cde8ea6

Please sign in to comment.