Skip to content

Commit ff1238d

Browse files
authored
refactor: use dependency groups (#195)
* refactor: use dependency groups Signed-off-by: nstarman <nstarman@users.noreply.github.com> * docs: fix building Signed-off-by: nstarman <nstarman@users.noreply.github.com> --------- Signed-off-by: nstarman <nstarman@users.noreply.github.com>
1 parent 514c5e9 commit ff1238d

4 files changed

Lines changed: 34 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
- name: Install dependencies
4949
run: |
5050
python -m pip install --upgrade pip
51-
python -m pip install --upgrade --no-cache-dir -e '.[dev]'
51+
python -m pip install --no-cache-dir --group dev
52+
python -m pip install --no-cache-dir -e .
5253
${{ matrix.value.extra-install }}
5354
- name: Test linter assertions
5455
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: check-useless-excludes
1212

1313
- repo: https://github.com/abravalheri/validate-pyproject
14-
rev: v0.16
14+
rev: v0.23
1515
hooks:
1616
- id: validate-pyproject
1717

.readthedocs.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ build:
44
os: ubuntu-22.04
55
tools:
66
python: "3.12"
7+
nodejs: "20"
78
jobs:
9+
install:
10+
# Since the install step is overridden, pip is no longer updated automatically.
11+
- pip install --upgrade pip
12+
- pip install --group 'docs' .
13+
814
pre_build:
915
# Generate the Sphinx configuration for this Jupyter Book, so it builds.
1016
- "jupyter-book config sphinx docs/"
1117

12-
python:
13-
install:
14-
- method: pip
15-
path: ".[dev]"
16-
1718
sphinx:
1819
builder: html
1920
fail_on_warning: true

pyproject.toml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,36 @@ dependencies = [
2323
"rich>=10.0"
2424
]
2525

26-
[project.optional-dependencies]
27-
dev = [
28-
"numpy",
29-
"pytest>=6",
30-
"pytest-cov",
31-
"coveralls",
32-
"pre-commit",
33-
"IPython",
34-
"black==23.9.0",
35-
"ghp-import",
36-
"wheel",
37-
"build",
38-
"tox",
39-
"jupyter-book",
40-
"mypy",
41-
"pyright>=1.1.331",
42-
"ruff>=0.2.1",
43-
"sybil",
44-
]
45-
4626
[project.urls]
4727
repository = "https://github.com/beartype/plum"
4828
documentation = "https://beartype.github.io/plum"
4929

5030

31+
[dependency-groups]
32+
dev = [
33+
{ include-group = "docs" },
34+
{ include-group = "lint" },
35+
{ include-group = "test" },
36+
]
37+
docs = [
38+
"jupyter-book>=1.0.0,<2.0.0",
39+
]
40+
lint = [
41+
"pre-commit>=4.3.0",
42+
]
43+
test = [
44+
"coveralls>=4.0.1",
45+
"ipython>=8.18.1",
46+
"mypy>=1.18.2",
47+
"numpy>=2.0.2",
48+
"pyright>=1.1.331",
49+
"pytest>=8.4.2",
50+
"pytest-cov>=7.0.0",
51+
"sybil[pytest]>=9.2.0",
52+
"tox>=4.30.3",
53+
]
54+
55+
5156
[build-system]
5257
requires = ["hatchling>=1.8.0", "hatch-vcs"]
5358
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)