Skip to content

Commit d9110f0

Browse files
authored
chore: use dependency groups (#550)
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 9aa5793 commit d9110f0

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- uses: astral-sh/setup-uv@v7
5555

5656
- name: Install package
57-
run: uv pip install --system -e .[test]
57+
run: uv pip install --system -e. --group=test
5858

5959
- name: Pytest
6060
if: runner.os == 'Linux'
@@ -90,7 +90,7 @@ jobs:
9090
run: sudo apt-get install graphviz
9191

9292
- name: Install package
93-
run: uv pip install --system -e .[test]
93+
run: uv pip install --system -e. --group=test
9494

9595
- name: Install notebook requirements
9696
run: uv pip install --system nbconvert jupyter_client ipykernel pydot

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
rev: "v0.14.14"
2323
hooks:
2424
- id: ruff-check
25-
args: ["--fix", "--show-fixes"]
25+
args: ["--fix"]
2626
- id: ruff-format
2727

2828
- repo: https://github.com/pre-commit/mirrors-mypy

.readthedocs.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ sphinx:
1313
formats: all
1414

1515
build:
16-
os: ubuntu-22.04
16+
os: ubuntu-24.04
1717
tools:
18-
python: "3.11"
19-
20-
python:
21-
install:
22-
- method: pip
23-
path: .
24-
extra_requirements:
25-
- docs
18+
python: "3.14"
19+
jobs:
20+
install:
21+
- pip install --upgrade pip
22+
- pip install --group docs

noxfile.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,22 @@
1616

1717
@nox.session
1818
def lint(session):
19-
session.install("pre-commit")
20-
session.run("pre-commit", "run", "--all-files", *session.posargs)
19+
session.install("prek")
20+
session.run("prek", "run", "--all-files", *session.posargs)
2121

2222

2323
@nox.session
2424
def pylint(session: nox.Session) -> None:
2525
"""
2626
Run pylint.
2727
"""
28-
29-
session.install("pylint")
30-
session.install("-e.[dev]")
28+
session.install("-e.", "--group=dev", "pylint")
3129
session.run("pylint", "src", *session.posargs)
3230

3331

3432
@nox.session(python=ALL_PYTHONS)
3533
def tests(session):
36-
session.install(".[test]")
34+
session.install(".", "--group=test")
3735
session.run("pytest", *session.posargs)
3836

3937

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ dependencies = [
5252
]
5353
dynamic = ["version"]
5454

55-
[project.optional-dependencies]
55+
[dependency-groups]
5656
dev = [
57-
"pytest>=6",
57+
{ include-group = "test" }
5858
]
5959
docs = [
6060
"sphinx-rtd-theme>=0.5.0",
@@ -146,6 +146,9 @@ messages_control.disable = [
146146
"duplicate-code",
147147
]
148148

149+
[tool.ruff]
150+
show-fixes = true
151+
149152
[tool.ruff.lint]
150153
extend-select = [
151154
"B", # flake8-bugbear

0 commit comments

Comments
 (0)