generated from readthedocs/tutorial-template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
noxfile.py
32 lines (25 loc) · 850 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
"""All the process that can be run using nox.
The nox run are build in isolated environment that will be stored in .nox. to force the venv update, remove the .nox/xxx folder.
"""
import nox
nox.options.sessions = ["docs"]
@nox.session(name="docs", reuse_venv=True)
def docs(session):
"""Build the documentation."""
session.install("-r", "requirements.txt")
session.run("rm", "-rf", "docs/source/modules", external=True)
session.run("rm", "-rf", "docs/build/html", external=True)
session.run(
"sphinx-build",
"-b",
"html",
"docs/source",
"docs/build/html",
"-w",
"warnings.txt",
)
@nox.session(name="lint", reuse_venv=True)
def lint(session):
"""Lint the documentation repository"""
session.install("pre-commit")
session.run("pre-commit", "run", "-a")