-
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathnoxfile.py
More file actions
37 lines (28 loc) · 879 Bytes
/
noxfile.py
File metadata and controls
37 lines (28 loc) · 879 Bytes
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
33
34
35
36
37
import os
import nox
os.environ.update(PDM_IGNORE_SAVED_PYTHON="1")
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"])
def tests(session):
session.run("pdm", "install", "-d", external=True)
session.run("pytest", "tests/")
@nox.session
def benchmark(session):
session.run("pdm", "install", "-dG", "benchmark", external=True)
session.run("python", "-m", "tests.benchmark")
@nox.session
def docs(session):
session.install("pdm", "install", "-G", "doc", external=True)
session.install("sphinx-autobuild")
session.run(
"sphinx-autobuild",
"docs/",
"docs/_build/html",
# Rebuild all files when rebuilding
"-a",
# Trigger rebuilds on code changes (for autodoc)
"--watch",
"marko",
# Use a not-common high-numbered port
"--port",
"8765",
)