forked from sphinx-doc/sphinx-autobuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
29 lines (20 loc) · 760 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
"""Development automation."""
import nox
@nox.session(reuse_venv=True)
def lint(session):
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files", *session.posargs)
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
def test(session):
session.install("-e", ".[test]", silent=True)
session.run("pytest", *session.posargs)
@nox.session(reuse_venv=True)
def docs(session):
session.install("-e", ".", silent=True)
session.run("sphinx-build", "-b", "html", "docs/", "build/docs")
@nox.session(name="docs-live", reuse_venv=True)
def docs_live(session):
session.install("-e", ".", silent=True)
session.run(
"sphinx-autobuild", "-b", "html", "docs/", "build/docs", *session.posargs
)