Skip to content

Commit b2facbf

Browse files
committed
Use uv with Nox
1 parent e3a8c37 commit b2facbf

4 files changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/nox.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ jobs:
2424
uses: astral-sh/setup-uv@v6
2525
- name: Register Python problem matcher
2626
run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
27-
- name: Install dependencies
28-
run: pip install nox pytest-github-actions-annotate-failures
2927
- name: Test with nox using minimal dependencies
30-
run: nox -e "pytest-${{ matrix.python-version }}(all_deps=False)"
28+
run: uv run --group nox nox -e "pytest-${{ matrix.python-version }}(all_deps=False)"
3129
- name: Test with nox with all dependencies
32-
run: nox -e "pytest-${{ matrix.python-version }}(all_deps=True)"
30+
run: uv run --group nox nox -e "pytest-${{ matrix.python-version }}(all_deps=True)"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ jupyter labextension install @pyviz/jupyterlab_pyviz
160160

161161
## :wrench: Development
162162

163-
Clone the repository and run `pip install -e ".[notebook,testing,other]"` to add a link to the cloned repo into your Python path:
163+
Clone the repository and run `pip install -e ".[notebook,test,other]"` to add a link to the cloned repo into your Python path:
164164

165165
```bash
166166
git clone git@github.com:python-adaptive/adaptive.git
167167
cd adaptive
168-
pip install -e ".[notebook,testing,other]"
168+
pip install -e ".[notebook,test,other]"
169169
```
170170

171171
We recommend using a Conda environment or a virtualenv for package management during Adaptive development.

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
@nox.parametrize("all_deps", [True, False])
1010
def pytest(session: nox.Session, all_deps: bool) -> None:
1111
"""Run pytest with optional dependencies."""
12-
session.install(".[testing,other]" if all_deps else ".[testing]")
12+
session.install(".[test,other]" if all_deps else ".[test]")
1313
session.run("coverage", "erase")
1414
session.run("pytest")
1515

1616

1717
@nox.session(python="3.11")
1818
def pytest_typeguard(session: nox.Session) -> None:
1919
"""Run pytest with typeguard."""
20-
session.install(".[testing,other]")
20+
session.install(".[test,other]")
2121
session.run("coverage", "erase")
2222
session.run("pytest", "--typeguard-packages=adaptive")
2323

@@ -26,7 +26,7 @@ def pytest_typeguard(session: nox.Session) -> None:
2626
def coverage(session: nox.Session) -> None:
2727
"""Generate coverage report."""
2828
session.install("coverage")
29-
session.install(".[testing,other]")
29+
session.install(".[test,other]")
3030
session.run("pytest")
3131

3232
session.run("coverage", "report")

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ notebook = [
4747
"matplotlib",
4848
"plotly",
4949
]
50-
testing = [
50+
test = [
5151
"flaky",
5252
"pytest",
5353
"pytest-cov",
@@ -56,6 +56,7 @@ testing = [
5656
"pre_commit",
5757
"typeguard",
5858
]
59+
dev = ["adaptive[test,nox,notebook,other]"]
5960

6061
[project.urls]
6162
homepage = "https://adaptive.readthedocs.io/"
@@ -66,6 +67,12 @@ repository = "https://github.com/python-adaptive/adaptive"
6667
content-type = "text/markdown"
6768
file = "README.md"
6869

70+
[dependency-groups]
71+
nox = [
72+
"nox",
73+
"pytest-github-actions-annotate-failures",
74+
]
75+
6976
[tool.setuptools.packages.find]
7077
include = ["adaptive.*", "adaptive"]
7178

0 commit comments

Comments
 (0)