Skip to content

Commit ba10e0f

Browse files
committed
chore: use dependency groups
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 9faba05 commit ba10e0f

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
@@ -56,7 +56,7 @@ jobs:
5656
- uses: astral-sh/setup-uv@v7
5757

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

6161
- name: Pytest
6262
if: runner.os == 'Linux'
@@ -92,7 +92,7 @@ jobs:
9292
run: sudo apt-get install graphviz
9393

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

9797
- name: Install notebook requirements
9898
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
@@ -53,9 +53,9 @@ dependencies = [
5353
]
5454
dynamic = ["version"]
5555

56-
[project.optional-dependencies]
56+
[dependency-groups]
5757
dev = [
58-
"pytest>=6",
58+
{ include-group = "test" }
5959
]
6060
docs = [
6161
"sphinx-rtd-theme>=0.5.0",
@@ -147,6 +147,9 @@ messages_control.disable = [
147147
"duplicate-code",
148148
]
149149

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

0 commit comments

Comments
 (0)