Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up dependabot configuration for pip #551

Merged
merged 18 commits into from
Jun 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
# Allow up to 2 open pull requests at a time
open-pull-requests-limit: 2
ignore:
# segmentation-models-pytorch requires older timm, can't update
- dependency-name: "timm"
7 changes: 2 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[datasets,tests]
pip install -r requirements.txt
pip list
- name: Run integration checks
run: pytest -m slow
Expand All @@ -53,9 +52,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[datasets,tests]
pip install -r docs/requirements.txt
pip install -r requirements.txt
pip list
- name: Run notebook checks
env:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip install -r requirements.txt
pip list
- name: Run black checks
run: black . --check --diff
Expand All @@ -38,8 +37,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip install -r requirements.txt
pip list
- name: Run flake8 checks
run: flake8
Expand All @@ -55,8 +53,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip install -r requirements.txt
pip list
- name: Run isort checks
run: isort . --check --diff
Expand All @@ -72,8 +69,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip install -r requirements.txt
pip list
- name: Run pydocstyle checks
run: pydocstyle
Expand All @@ -89,8 +85,7 @@ jobs:
python-version: 3.9
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip install -r requirements.txt
pip list
- name: Run pyupgrade checks
run: pyupgrade --py37-plus $(find . -name "*.py")
8 changes: 3 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
python-version: '3.10'
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[datasets,tests]
pip install -r requirements.txt
pip list
- name: Run mypy checks
run: mypy .
Expand Down Expand Up @@ -57,14 +56,13 @@ jobs:
if: ${{ runner.os == 'Windows' }}
- name: Install conda dependencies (Windows)
run: |
conda install 'fiona>=1.5' 'rasterio>=1.0.16'
conda install 'fiona==1.8.21' 'rasterio==1.2.10'
conda list
conda info
if: ${{ runner.os == 'Windows' }}
- name: Install pip dependencies
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[datasets,tests]
pip install -r requirements.txt
pip list
- name: Run pytest checks
run: pytest --cov=torchgeo --cov-report=xml
Expand Down
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ build:
# Configuration of the Python environment to be used
python:
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
- method: pip
path: .
Expand Down
7 changes: 0 additions & 7 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
# ipywidgets 7+ required for nbsphinx
ipywidgets>=7
# nbsphinx 0.8.5 fixes bug with nbformat attributes
nbsphinx>=0.8.5
# release versions missing files, must install from master
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
# sphinx 4+ required for autodoc_typehints_description_target = documented
sphinx>=4
12 changes: 9 additions & 3 deletions docs/tutorials/benchmarking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
"source": [
"data_root = tempfile.gettempdir()\n",
"naip_root = os.path.join(data_root, \"naip\")\n",
"naip_url = \"https://naipeuwest.blob.core.windows.net/naip/v002/de/2018/de_060cm_2018/38075/\"\n",
"naip_url = (\n",
" \"https://naipeuwest.blob.core.windows.net/naip/v002/de/2018/de_060cm_2018/38075/\"\n",
")\n",
"tiles = [\n",
" \"m_3807511_ne_18_060_20181104.tif\",\n",
" \"m_3807511_se_18_060_20181104.tif\",\n",
Expand Down Expand Up @@ -211,7 +213,9 @@
" naip = NAIP(naip_root, crs=chesapeake.crs, res=chesapeake.res, cache=cache)\n",
" dataset = chesapeake & naip\n",
" sampler = RandomGeoSampler(naip, size=1000, length=888)\n",
" dataloader = DataLoader(dataset, batch_size=12, sampler=sampler, collate_fn=stack_samples)\n",
" dataloader = DataLoader(\n",
" dataset, batch_size=12, sampler=sampler, collate_fn=stack_samples\n",
" )\n",
" duration, count = time_epoch(dataloader)\n",
" print(duration, count)"
]
Expand Down Expand Up @@ -262,7 +266,9 @@
" naip = NAIP(naip_root, crs=chesapeake.crs, res=chesapeake.res, cache=cache)\n",
" dataset = chesapeake & naip\n",
" sampler = GridGeoSampler(naip, size=1000, stride=500)\n",
" dataloader = DataLoader(dataset, batch_size=12, sampler=sampler, collate_fn=stack_samples)\n",
" dataloader = DataLoader(\n",
" dataset, batch_size=12, sampler=sampler, collate_fn=stack_samples\n",
" )\n",
" duration, count = time_epoch(dataloader)\n",
" print(duration, count)"
]
Expand Down
14 changes: 7 additions & 7 deletions docs/tutorials/custom_raster_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"from torch import Tensor\n",
"from torch.utils.data import DataLoader\n",
"from torchgeo.datasets import RasterDataset, stack_samples\n",
"from torchgeo.samplers import RandomGeoSampler\n"
"from torchgeo.samplers import RandomGeoSampler"
]
},
{
Expand All @@ -81,8 +81,8 @@
"source": [
"from torchgeo.datasets.utils import extract_archive\n",
"\n",
"data_root = Path('../../tests/data/xview3/')\n",
"extract_archive(str(data_root / 'sample_data.tar.gz'))"
"data_root = Path(\"../../tests/data/xview3/\")\n",
"extract_archive(str(data_root / \"sample_data.tar.gz\"))"
]
},
{
Expand Down Expand Up @@ -111,9 +111,9 @@
"outputs": [],
"source": [
"class XView3Polarizations(RasterDataset):\n",
" '''\n",
" \"\"\"\n",
" Load xView3 polarization data that ends in *_dB.tif\n",
" '''\n",
" \"\"\"\n",
"\n",
" filename_glob = \"*_dB.tif\""
]
Expand Down Expand Up @@ -153,10 +153,10 @@
"dl = DataLoader(ds, sampler=sampler, collate_fn=stack_samples)\n",
"\n",
"for sample in dl:\n",
" image = sample['image']\n",
" image = sample[\"image\"]\n",
" print(image.shape)\n",
" image = torch.squeeze(image)\n",
" plt.imshow(image, cmap='bone', vmin=-35, vmax=-5)"
" plt.imshow(image, cmap=\"bone\", vmin=-35, vmax=-5)"
]
}
],
Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@
"source": [
"data_root = tempfile.gettempdir()\n",
"naip_root = os.path.join(data_root, \"naip\")\n",
"naip_url = \"https://naipeuwest.blob.core.windows.net/naip/v002/de/2018/de_060cm_2018/38075/\"\n",
"naip_url = (\n",
" \"https://naipeuwest.blob.core.windows.net/naip/v002/de/2018/de_060cm_2018/38075/\"\n",
")\n",
"tiles = [\n",
" \"m_3807511_ne_18_060_20181104.tif\",\n",
" \"m_3807511_se_18_060_20181104.tif\",\n",
Expand Down
Loading