Skip to content

Commit 0eb4278

Browse files
Add a noxfile with a docs session
1 parent be76266 commit 0eb4278

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

noxfile.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import nox
2+
3+
# Options to modify nox behaviour
4+
nox.options.reuse_existing_virtualenvs = True
5+
6+
@nox.session(name="docs")
7+
def build_docs(session):
8+
"""Build the documentation and load it in a browser tab, rebuilding on changes."""
9+
envbindir = session.bin
10+
session.install("-e", ".[all,docs]")
11+
with session.chdir("docs/"):
12+
session.run(
13+
"sphinx-autobuild",
14+
"-j",
15+
"auto",
16+
"--open-browser",
17+
"-qT",
18+
".",
19+
f"{envbindir}/../tmp/html",
20+
)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import nox
2+
3+
# Options to modify nox behaviour
4+
nox.options.reuse_existing_virtualenvs = True
5+
6+
@nox.session(name="docs")
7+
def build_docs(session):
8+
"""Build the documentation and load it in a browser tab, rebuilding on changes."""
9+
envbindir = session.bin
10+
session.install("-e", ".[docs]")
11+
with session.chdir("docs/"):
12+
session.run(
13+
"sphinx-autobuild",
14+
"-j",
15+
"auto",
16+
"--open-browser",
17+
"-qT",
18+
".",
19+
f"{envbindir}/../tmp/html",
20+
)

0 commit comments

Comments
 (0)