-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
32 lines (26 loc) · 869 Bytes
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import nox
@nox.session(python=["3.10", "3.11", "3.12"], venv_backend="uv")
def tests(session):
session.install("-e", ".[dev]")
session.run(
"coverage",
"run",
"--source=src",
"--rcfile=pyproject.toml",
"-m",
"unittest",
"discover",
"tests",
)
session.run("coverage", "report", "--rcfile=pyproject.toml")
session.run("coverage", "html", "--rcfile=pyproject.toml")
@nox.session(python="3.10", reuse_venv=True, venv_backend="uv")
def docs(session):
session.install("-e", ".[docs]")
session.run("mkdocs", "build")
@nox.session(python="3.10", reuse_venv=True, venv_backend="uv")
@nox.parametrize("package", ["src", "tests"])
def ruff(session, package):
session.install("ruff")
session.run("ruff", "format", package)
session.run("ruff", "check", "--fix", package)