Skip to content

Commit 23c67ac

Browse files
authored
Better nox automation (#630)
* Fix nox -s docs * Add default "dev" session, as a development env
1 parent ce4e941 commit 23c67ac

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

noxfile.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33

44
import nox
55

6+
nox.options.sessions = ["dev"]
7+
nox.options.reuse_existing_virtualenvs = True
8+
nox.options.error_on_external_run = True
9+
10+
11+
@nox.session(python="3.5")
12+
def dev(session):
13+
session.install("-r", "requirements.txt")
14+
15+
session.run("python", "manage.py", *session.posargs)
16+
617

718
@nox.session(python=["3.5", "3.6", "3.7", "3.8"])
819
def test(session):
@@ -35,11 +46,10 @@ def get_sphinx_build_command(kind):
3546
return [
3647
"sphinx-build",
3748
"-W",
38-
"-c", "docs/", # see note above
3949
"-d", "docs/build/_doctrees/" + kind,
4050
"-b", kind,
41-
"docs/" + kind,
42-
"docs/_build/" + kind,
51+
"docs/source",
52+
"docs/build/" + kind,
4353
]
4454

4555
session.run(*get_sphinx_build_command("html"))

0 commit comments

Comments
 (0)