Skip to content

Commit 4ecf5e1

Browse files
authored
Switch to dependency groups (#311)
1 parent ebdec3d commit 4ecf5e1

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

.github/workflows/check-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
with:
2828
python-version: "3.x"
2929

30-
- name: Install dependencies
30+
- name: Install docs dependencies
3131
run: |
32-
python -m pip install '.[docs]'
32+
python -m pip install . --group docs
3333
3434
- name: Sphinx build
3535
run: |

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: data-morph --version
6868

6969
- name: Install testing dependencies
70-
run: python -m pip install '.[dev]'
70+
run: python -m pip install --group test
7171

7272
- name: Run tests
7373
run: pytest

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Install dependencies
4040
run: |
41-
pip install '.[docs]'
41+
pip install . --group docs
4242
- name: Sphinx build
4343
run: |
4444
git worktree add docs/_build/html gh-pages

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Open up an issue describing in detail the bug or feature request you are proposi
99
Once you have been given the go ahead, you can start working on the code. Start by forking the project, cloning locally, and then creating a branch to work on. You will need to then install the main dependencies as well as the `dev` and `docs` dependencies, which can be done by running the following command:
1010

1111
```shell
12-
$ pip install -e '.[dev,docs]'
12+
$ pip install -e . --group dev
1313
```
1414

1515
Set up the pre-commit hooks to make sure you can pass the CI checks:

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Docs
22

3-
1. Install the docs dependencies: `pip install '.[docs]'`.
3+
1. Install the docs dependencies: `pip install --group docs`.
44
2. From this directory, run `make html`.
55

66
## Managing versions

pyproject.toml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,31 @@ dependencies = [
4949
"pandas>=1.2",
5050
"rich>=13.9.4",
5151
]
52-
optional-dependencies.dev = [
53-
"pre-commit",
54-
"pytest",
55-
"pytest-cov",
56-
"pytest-mock",
57-
"pytest-randomly",
58-
"pytest-xdist",
59-
]
60-
optional-dependencies.docs = [
52+
53+
urls."Bug Tracker" = "https://github.com/stefmolin/data-morph/issues"
54+
urls."Documentation" = "https://stefaniemolin.com/data-morph/stable/api.html"
55+
urls."Homepage" = "https://stefaniemolin.com/data-morph"
56+
urls."Source" = "https://github.com/stefmolin/data-morph"
57+
scripts.data-morph = "data_morph.cli:main"
58+
59+
[dependency-groups]
60+
dev = [ "pre-commit", { include-group = "docs" }, { include-group = "test" } ]
61+
62+
test = [
63+
"pytest>=8.3.4",
64+
"pytest-cov>=4.1.0",
65+
"pytest-mock>=3.10.0",
66+
"pytest-randomly>=3.12.0",
67+
"pytest-xdist>=3.6.1",
68+
]
69+
70+
docs = [
6171
"pydata-sphinx-theme>=0.15.3",
6272
"sphinx>=7.2.6",
6373
"sphinx-argparse-cli>=1.16.0",
6474
"sphinx-copybutton>=0.5.1",
6575
"sphinx-design>=0.6.1",
6676
]
67-
urls."Bug Tracker" = "https://github.com/stefmolin/data-morph/issues"
68-
urls."Documentation" = "https://stefaniemolin.com/data-morph/stable/api.html"
69-
urls."Homepage" = "https://stefaniemolin.com/data-morph"
70-
urls."Source" = "https://github.com/stefmolin/data-morph"
71-
scripts.data-morph = "data_morph.cli:main"
7277

7378
[tool.setuptools.packages.find]
7479
where = [

0 commit comments

Comments
 (0)