Skip to content

Commit 79144be

Browse files
authored
Store Python 3.7 deps in separate files, use rasterio/fiona Windows wheels (torchgeo#647)
* Store Python 3.7 deps in separate files, use rasterio/fiona Windows wheels * Fix fiona 1.9 warning * Fix import error * Try again * Expand obj kwargs * Fiona still support Python 3.7 * Investigate segfaults * Undo last commit
1 parent 1495e8a commit 79144be

File tree

11 files changed

+75
-39
lines changed

11 files changed

+75
-39
lines changed

.github/workflows/tests.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,23 @@ jobs:
5353
python-version: ${{ matrix.python-version }}
5454
channels: conda-forge
5555
channel-priority: strict
56-
if: ${{ runner.os == 'Windows' }}
56+
if: ${{ runner.os == 'Windows' && matrix.python-version == '3.7' }}
5757
- name: Install conda dependencies (Windows)
5858
run: |
59-
conda install 'fiona==1.8.21' 'rasterio==1.2.10'
59+
conda install 'rasterio==1.2.10'
6060
conda list
6161
conda info
62-
if: ${{ runner.os == 'Windows' }}
63-
- name: Install pip dependencies
62+
if: ${{ runner.os == 'Windows' && matrix.python-version == '3.7' }}
63+
- name: Install pip dependencies (3.8+)
6464
run: |
6565
pip install -r requirements/required.txt -r requirements/datasets.txt -r requirements/tests.txt
6666
pip list
67+
if: ${{ matrix.python-version != '3.7' }}
68+
- name: Install pip dependencies (3.7)
69+
run: |
70+
pip install -r requirements/required.old -r requirements/datasets.old -r requirements/tests.txt
71+
pip list
72+
if: ${{ matrix.python-version == '3.7' }}
6773
- name: Run pytest checks
6874
run: pytest --cov=torchgeo --cov-report=xml
6975
- name: Report coverage
@@ -85,7 +91,7 @@ jobs:
8591
- name: Install pip dependencies
8692
run: |
8793
pip install cython numpy==1.17.2 # needed by pycocotools
88-
pip install -r requirements/min
94+
pip install -r requirements/min.old
8995
pip list
9096
- name: Run pytest checks
9197
run: pytest --cov=torchgeo --cov-report=xml

requirements/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This directory contains several files that document the versions of our dependencies used in CI. These are not hard requirements for using TorchGeo.
2+
3+
### Managed by dependabot
4+
5+
All files with a `.txt` extension are managed by dependabot and should not be manually edited unless you need to add or remove a dependency.
6+
7+
### Not managed by dependabot
8+
9+
All files with a `.old` extension are not managed by dependabot. They document the minimum version of our dependencies that we support, or older versions required for versions of Python that the numpy ecosystem no longer supports. See [NEP-29](https://numpy.org/neps/nep-0029-deprecation_policy.html) for more information on the numpy deprecation timeline. See https://github.com/dependabot/dependabot-core/issues/5299 and https://github.com/dependabot/dependabot-core/issues/5300 for why these dependencies have to be in separate files with a different file extension.

requirements/datasets.old

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# datasets
2+
h5py==3.6.0
3+
laspy==2.2.0
4+
open3d==0.14.1;python_version<'3.10'
5+
opencv-python==4.6.0.66
6+
pandas==1.4.3;python_version>='3.8'
7+
pandas==1.3.5;python_version=='3.7'
8+
pycocotools==2.0.4
9+
radiant-mlhub==0.5.1;python_version>='3.8'
10+
radiant-mlhub==0.4.1;python_version=='3.7'
11+
rarfile==4.0
12+
scipy==1.8.1;python_version>='3.8'
13+
scipy==1.7.3;python_version=='3.7'
14+
zipfile-deflate64==0.2.0

requirements/datasets.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
# This file is managed by dependabot and should not be manually edited unless you need
2-
# to add or remove a dependency. It documents the version of our dependencies used in
3-
# CI, these are not hard requirements for using TorchGeo.
4-
51
# datasets
62
h5py==3.6.0
73
laspy==2.2.0
84
open3d==0.14.1;python_version<'3.10'
95
opencv-python==4.6.0.66
106
pandas==1.4.3;python_version>='3.8'
11-
pandas==1.3.5;python_version=='3.7'
127
pycocotools==2.0.4
138
radiant-mlhub==0.5.1;python_version>='3.8'
14-
radiant-mlhub==0.4.1;python_version=='3.7'
159
rarfile==4.0
1610
scipy==1.8.1;python_version>='3.8'
17-
scipy==1.7.3;python_version=='3.7'
1811
zipfile-deflate64==0.2.0

requirements/docs.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# This file is managed by dependabot and should not be manually edited unless you need
2-
# to add or remove a dependency. It documents the version of our dependencies used in
3-
# CI, these are not hard requirements for using TorchGeo.
4-
51
# docs
62
ipywidgets==7.7.1
73
nbsphinx==0.8.9
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This file is not managed by dependabot. It documents the minimum version of our
2-
# dependencies that is supported.
3-
41
# setup
52
setuptools==42.0.0
63

requirements/required.old

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# setup
2+
setuptools==62.6.0
3+
4+
# install
5+
einops==0.4.1
6+
fiona==1.9a2
7+
kornia==0.6.5
8+
matplotlib==3.5.2
9+
numpy==1.23.0;python_version>='3.8'
10+
numpy==1.21.6;python_version=='3.7'
11+
omegaconf==2.2.2
12+
packaging==21.3
13+
pillow==9.2.0
14+
protobuf==3.20.1
15+
pyproj==3.3.1;python_version>='3.8'
16+
pyproj==3.2.0;python_version=='3.7'
17+
pytorch-lightning==1.6.4
18+
rasterio==1.3b3;python_version>='3.8'
19+
rasterio==1.2.10;python_version=='3.7'
20+
rtree==1.0.0
21+
scikit-learn==1.1.1;python_version>='3.8'
22+
scikit-learn==1.0.2;python_version=='3.7'
23+
segmentation-models-pytorch==0.2.1
24+
shapely==1.8.2
25+
timm==0.4.12
26+
torch==1.12.0
27+
torchmetrics==0.9.2
28+
torchvision==0.13.0

requirements/required.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
# This file is managed by dependabot and should not be manually edited unless you need
2-
# to add or remove a dependency. It documents the version of our dependencies used in
3-
# CI, these are not hard requirements for using TorchGeo.
4-
51
# setup
62
setuptools==62.6.0
73

84
# install
95
einops==0.4.1
10-
fiona==1.8.21
6+
fiona==1.9a2
117
kornia==0.6.5
128
matplotlib==3.5.2
139
numpy==1.23.0;python_version>='3.8'
14-
numpy==1.21.6;python_version=='3.7'
1510
omegaconf==2.2.2
1611
packaging==21.3
1712
pillow==9.2.0
1813
protobuf==3.20.1
1914
pyproj==3.3.1;python_version>='3.8'
20-
pyproj==3.2.0;python_version=='3.7'
2115
pytorch-lightning==1.6.4
22-
rasterio==1.3b3;python_version=='3.10' and platform_system != 'Windows'
23-
rasterio==1.2.10;python_version<='3.9' or platform_system == 'Windows'
16+
rasterio==1.3b3;python_version>='3.8'
2417
rtree==1.0.0
2518
scikit-learn==1.1.1;python_version>='3.8'
26-
scikit-learn==1.0.2;python_version=='3.7'
2719
segmentation-models-pytorch==0.2.1
2820
shapely==1.8.2
2921
timm==0.4.12

requirements/style.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
# This file is managed by dependabot and should not be manually edited unless you need
2-
# to add or remove a dependency. It documents the version of our dependencies used in
3-
# CI, these are not hard requirements for using TorchGeo.
4-
51
# style
62
black[jupyter]==22.6.0
7-
flake8==4.0.1;python_version=='3.10'
3+
flake8==4.0.1
84
isort[colors]==5.10.1
95
pydocstyle[toml]==6.1.1
106
pyupgrade==2.34.0

requirements/tests.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# This file is managed by dependabot and should not be manually edited unless you need
2-
# to add or remove a dependency. It documents the version of our dependencies used in
3-
# CI, these are not hard requirements for using TorchGeo.
4-
51
# tests
62
mypy==0.961
73
nbmake==1.3.0

0 commit comments

Comments
 (0)