Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/samplers/gridgeosampler_bounds' …
Browse files Browse the repository at this point in the history
…into samplers/gridgeosampler_bounds

# Conflicts:
#	torchgeo/samplers/single.py
  • Loading branch information
remtav committed Aug 25, 2022
2 parents eb33fe0 + 45b3490 commit 720cf5b
Show file tree
Hide file tree
Showing 378 changed files with 8,420 additions and 3,652 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Do not change line endings on test data, it will change the MD5
/tests/data/*/** binary
/tests/data/*/** -text
# Test data generation files are fine though
/tests/data/**/data.py text
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 🐛 Bug report
description: Create a report to help us reproduce and fix a bug
labels: [bug]

body:
- type: textarea
attributes:
label: Description
description: >
Please provide a clear and concise description of the bug.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: >
We can't solve your issue if we can't reproduce it. Please provide a
[minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)
that shows how to reproduce the bug. If the bug requires any additional files to
reproduce, please upload those or provide a download link. Your code should be
runnable and include all relevant imports.
placeholder: |
1. Download any Landsat 8 scene from https://earthexplorer.usgs.gov/
2. Run the following code to reproduce the error
```python
from torchgeo.datasets import Landsat8
ds = Landsat8("/path/to/downloads/directory")
...
```
validations:
required: true
- type: input
attributes:
label: Version
description: |
What version of TorchGeo are you using? This can be found using the following code.
```console
$ python
>>> import torchgeo
>>> torchgeo.__version__
X.Y.Z
```
If you are using a development release (ends with ".dev0") please also include the specific git commit.
Whenever possible, try to reproduce your issue with the latest commit from `main`. You never know, someone may have already fixed your bug!
placeholder: |
1.2.3.dev0 (e1285e6cc6b65080e82bdbf7de9dea3f647d8b3b)
validations:
required: true
- type: markdown
attributes:
value: >
Thanks for taking the time to report this bug! TorchGeo is an open-source project
maintained by its users. If you're Python savvy and want to contribute a pull
request to fix this bug, we'll be happy to review it. If not, we'll try to fix it
as long as we can reproduce it.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Questions
url: https://github.com/microsoft/torchgeo/discussions
about: Ask questions or discuss ideas with other TorchGeo users
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 📚 Documentation
description: Issues or suggestions related to documentation
labels: [documentation]

body:
- type: textarea
attributes:
label: Issue
description: >
A clear and concise description of what is wrong with or missing from the
documentation.
validations:
required: true
- type: textarea
attributes:
label: Fix
description: >
Tell us how we could improve the documentation!
- type: markdown
attributes:
value: >
Thanks for taking the time to improve the documentation! TorchGeo is an
open-source project maintained by its users. If you're rST savvy and want
to contribute a pull request to improve the docs, we'll be happy to review
it. If not, we'll try to fix it when a get a chance.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🚀 Feature request
description: Submit a proposal/request for a new TorchGeo feature
labels: [feature]

body:
- type: markdown
attributes:
value: >
TorchGeo is a PyTorch domain library for _geospatial_ data. If the feature you
are suggesting is not specific to working with geospatial data or multispectral
satellite imagery and may be of interest to the broader computer vision
community, consider contributing it to
[torchvision](https://github.com/pytorch/vision) or
[kornia](https://github.com/kornia/kornia) instead.
- type: textarea
attributes:
label: Summary
description: >
A clear and concise summary of your suggestion.
- type: textarea
attributes:
label: Rationale
description: >
Why is this feature important? Is it related to a problem you are experiencing?
- type: textarea
attributes:
label: Implementation
description: >
If you've thought about how to implement this feature, describe your proposed
solution.
- type: textarea
attributes:
label: Alternatives
description: >
Are there any alternatives to the solution you've proposed?
- type: textarea
attributes:
label: Additional information
description: >
Any additional information that might be relevant to the proposed feature.
- type: markdown
attributes:
value: >
Thanks for suggesting this awesome new feature! TorchGeo is an open-source project
maintained by its users. If you're Python savvy and want to contribute a pull
request to implement this feature, we'll be happy to review it. If not, we'll try
to implement your feature when we get a chance.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/requirements"
schedule:
interval: "daily"
# Allow up to 2 open pull requests at a time
open-pull-requests-limit: 2
ignore:
# radiant-mlhub 0.5+ changed download behavior:
# https://github.com/radiantearth/radiant-mlhub/pull/104
- dependency-name: "radiant-mlhub"
# segmentation-models-pytorch requires older timm, can't update
- dependency-name: "timm"
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ documentation:
- docs/**
testing:
- tests/**
- .github/workflows/**
16 changes: 9 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install cython numpy # needed for pycocotools
pip install .[tests]
pip list
- name: Run pytest checks
run: pytest --cov=torchgeo --cov-report=xml
integration:
Expand All @@ -32,9 +32,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: pip install .[datasets,tests]
run: |
pip install .[datasets,tests]
pip list
- name: Run integration checks
run: pytest -m slow
notebooks:
Expand All @@ -46,11 +48,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install .[datasets,tests]
pip install -r docs/requirements.txt
pip install .[datasets,docs,tests]
pip list
- name: Run notebook checks
env:
MLHUB_API_KEY: ${{ secrets.MLHUB_API_KEY }}
Expand Down
40 changes: 32 additions & 8 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: pip install .[style]
run: |
pip install -r requirements/style.txt
pip list
- name: Run black checks
run: black . --check --diff
flake8:
Expand All @@ -32,9 +34,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: pip install .[style]
run: |
pip install -r requirements/style.txt
pip list
- name: Run flake8 checks
run: flake8
isort:
Expand All @@ -46,9 +50,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: pip install .[style]
run: |
pip install -r requirements/style.txt
pip list
- name: Run isort checks
run: isort . --check --diff
pydocstyle:
Expand All @@ -60,8 +66,26 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: pip install .[style]
run: |
pip install -r requirements/style.txt
pip list
- name: Run pydocstyle checks
run: pydocstyle
pyupgrade:
name: pyupgrade
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install -r requirements/style.txt
pip list
- name: Run pyupgrade checks
run: pyupgrade --py37-plus $(find . -path ./docs/src -prune -o -name "*.py" -print)
52 changes: 38 additions & 14 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install cython numpy # needed for pycocotools
pip install .[datasets,tests]
pip install -r requirements/required.txt -r requirements/datasets.txt -r requirements/tests.txt
pip list
- name: Run mypy checks
run: mypy .
pytest:
Expand All @@ -33,10 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
exclude:
- os: windows-latest
python-version: 3.6
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Clone repo
uses: actions/checkout@v2
Expand All @@ -56,19 +53,46 @@ jobs:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
if: ${{ runner.os == 'Windows' }}
if: ${{ runner.os == 'Windows' && matrix.python-version == '3.7' }}
- name: Install conda dependencies (Windows)
run: |
# PyTorch isn't compatible with setuptools 59.6+, pin for now until new PyTorch release
# https://github.com/pytorch/pytorch/pull/69904
conda install 'fiona>=1.5' h5py 'rasterio>=1.0.16' 'setuptools<59.6'
conda install 'rasterio==1.2.10' 'geos=3.10.3'
conda list
conda info
if: ${{ runner.os == 'Windows' }}
if: ${{ runner.os == 'Windows' && matrix.python-version == '3.7' }}
- name: Install pip dependencies (3.8+)
run: |
pip install -r requirements/required.txt -r requirements/datasets.txt -r requirements/tests.txt
pip list
if: ${{ matrix.python-version != '3.7' }}
- name: Install pip dependencies (3.7)
run: |
pip install -r requirements/required.old -r requirements/datasets.old -r requirements/tests.txt
pip list
if: ${{ matrix.python-version == '3.7' }}
- name: Run pytest checks
run: pytest --cov=torchgeo --cov-report=xml
- name: Report coverage
uses: codecov/codecov-action@v2
minimum:
name: minimum
runs-on: ubuntu-latest
env:
MPLBACKEND: Agg
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install apt dependencies (Linux)
run: sudo apt-get install libgeos-dev libhdf5-dev unrar
- name: Install pip dependencies
run: |
pip install cython numpy # needed for pycocotools
pip install .[datasets,tests]
pip install cython numpy==1.17.2 # needed by pycocotools
pip install -r requirements/min.old
pip list
- name: Run pytest checks
run: pytest --cov=torchgeo --cov-report=xml
- name: Report coverage
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/data/
/logs/
/output/
*.csv
*.pdf

# Spack
Expand Down Expand Up @@ -86,6 +85,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/src/

# PyBuilder
target/
Expand Down
Loading

0 comments on commit 720cf5b

Please sign in to comment.