Skip to content

Commit 470f6bd

Browse files
authored
MNT: Use dependency_groups (#889)
1 parent 240917d commit 470f6bd

9 files changed

Lines changed: 35 additions & 28 deletions

File tree

.github/workflows/build_docs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ jobs:
3838
- name: Install and Build
3939
shell: bash
4040
run: |
41-
micromamba run -n docs python -m pip install -e .[all]
42-
micromamba run -n docs python -m pip install -r requirements/doc.txt
41+
micromamba run -n docs python -m pip install -e . --group doc
4342
micromamba run -n docs sphinx-build -b html docs/ docs/_build/
4443
4544
- name: Deploy 🚀

.github/workflows/tests.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ jobs:
9595
export INSTALL_DEPS='rasterio${{ matrix.rasterio-version }} xarray${{ matrix.xarray-version }}'
9696
[ "${{ matrix.run-with-scipy }}" = "YES" ] && export INSTALL_DEPS="${INSTALL_DEPS} scipy"
9797
python -m pip install $INSTALL_DEPS
98-
python -m pip install -e .[all]
99-
python -m pip install -r requirements/test.txt
98+
python -m pip install -e . --group test
10099
101100
- name: Check and Log Environment
102101
shell: bash
@@ -154,8 +153,7 @@ jobs:
154153
shell: bash
155154
run: |
156155
[ "${{ matrix.run-with-scipy }}" = "YES" ] && micromamba install -n test scipy
157-
micromamba run -n test python -m pip install -e .[all]
158-
micromamba run -n test python -m pip install -r requirements/dev.txt
156+
micromamba run -n test python -m pip install -e . --group dev
159157
160158
- name: Check and Log Environment
161159
shell: bash
@@ -229,8 +227,7 @@ jobs:
229227
git+https://github.com/mapbox/rasterio.git@main \
230228
git+https://github.com/pyproj4/pyproj.git@main \
231229
git+https://github.com/pydata/xarray.git@main;
232-
micromamba run -n test python -m pip install -e .[all]
233-
micromamba run -n test python -m pip install -r requirements/test.txt
230+
micromamba run -n test python -m pip install -e . --group dev
234231
235232
- name: Check and Log Environment
236233
shell: bash

CONTRIBUTING.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ Using python::
8080

8181
4. Install your local copy into a virtualenv::
8282

83-
$ python -m pip install -e ".[all]"
84-
$ python -m pip install -r requirements/dev.txt
83+
$ python -m pip install -e . --group dev
8584

8685
5. Setup pre-commit hooks::
8786

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ dist: clean ## builds source and wheel package
8989
report: install-dev coverage ## clean, install development version, run all tests, produce coverage report
9090

9191
install: clean ## install the package to the active Python's site-packages
92-
python -m pip install .[all]
92+
python -m pip install .
9393

9494
install-dev: clean ## install development version to active Python's site-packages
95-
python -m pip install -e .[all]
96-
python -m pip install -r requirements/dev.txt
95+
python -m pip install -e . --group dev

appveyor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ install:
2222
#-------------------------------------------------------------------------------
2323
# Install rioxarray
2424
#-------------------------------------------------------------------------------
25-
- python -m pip install -e .[all]
26-
- python -m pip install -r requirements/test.txt
25+
- python -m pip install -e . --group test
2726

2827
build: false
2928

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,33 @@ dependencies = [
4141
"numpy>=2",
4242
]
4343

44+
[dependency-groups]
45+
doc = [
46+
"sphinx-click",
47+
"nbsphinx",
48+
"sphinx_rtd_theme",
49+
]
50+
test = [
51+
"pytest>=3.6",
52+
"pytest-cov",
53+
"pytest-timeout",
54+
"dask",
55+
"netcdf4",
56+
]
57+
type = [
58+
"mypy",
59+
]
60+
lint = [
61+
"pylint"
62+
]
63+
dev = [
64+
"pre-commit",
65+
{include-group = "doc"},
66+
{include-group = "test"},
67+
{include-group = "type"},
68+
{include-group = "lint"}
69+
]
70+
4471
[project.urls]
4572
homepage = "https://corteva.github.io/rioxarray/"
4673
documentation = "https://corteva.github.io/rioxarray/"

requirements/dev.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements/doc.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

requirements/test.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)