-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathnoxfile.py
More file actions
39 lines (31 loc) · 1.04 KB
/
noxfile.py
File metadata and controls
39 lines (31 loc) · 1.04 KB
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
38
39
"""Nox sessions for building MyST documentation."""
import nox
nox.options.reuse_existing_virtualenvs = True
nox.options.default_venv_backend = "uv"
@nox.session
def docs(session):
"""Build the MyST documentation."""
session.install("-r", "requirements.txt")
session.chdir("docs")
session.run("npm", "install", external=True)
session.run("myst", "build", "--strict", "--html")
@nox.session(name="docs-live")
def docs_live(session):
"""Build a live server with MyST documentation."""
session.install("-r", "requirements.txt")
session.chdir("docs")
session.run("npm", "install", external=True)
session.run("myst", "start")
@nox.session(name="redirects")
def redirects(session):
"""Generate redirects for built docs."""
session.run(
"uv",
"run",
"https://raw.githubusercontent.com/jupyter-book/jb1-redirect-generator/main/generate_redirects.py",
"--base-url",
"https://jupyter.org/governance/",
"--output-dir",
"docs/_build/html",
external=True,
)