9
9
docs_dir = os .path .join ("_build" , "html" )
10
10
build_command = ["-b" , "html" , "." , docs_dir ]
11
11
12
+
12
13
@nox .session
13
14
def docs (session ):
14
15
session .install ("-e" , "." )
15
16
cmd = ["sphinx-build" ]
16
17
cmd .extend (build_command + session .posargs )
17
18
session .run (* cmd )
18
19
20
+
19
21
@nox .session (name = "docs-test" )
20
22
def docs_test (session ):
21
23
"""
22
24
Same as `docs`, but rebuild everything and fail on warnings for testing
23
25
"""
24
26
session .install ("-e" , "." )
25
27
cmd = ["sphinx-build" ]
26
- cmd .extend (['-W' , ' --keep-going' , '-E' , '-a' ])
28
+ cmd .extend (["-W" , " --keep-going" , "-E" , "-a" ])
27
29
cmd .extend (build_command + session .posargs )
28
30
session .run (* cmd )
29
31
@@ -43,17 +45,15 @@ def docs_live(session):
43
45
# well, they're static.
44
46
# Include these as the final `filenames` argument
45
47
46
- AUTOBUILD_INCLUDE = [
47
- os .path .join ("_static" , "pyos.css" )
48
- ]
48
+ AUTOBUILD_INCLUDE = [os .path .join ("_static" , "pyos.css" )]
49
49
50
50
# ----------------
51
51
# Assemble command
52
52
cmd = ["sphinx-autobuild" ]
53
53
for folder in AUTOBUILD_IGNORE :
54
54
cmd .extend (["--ignore" , f"*/{ folder } /*" ])
55
55
56
- #cmd.extend(build_command)
56
+ # cmd.extend(build_command)
57
57
cmd .extend (build_command + session .posargs )
58
58
59
59
# Use positional arguments if we have them
@@ -66,15 +66,14 @@ def docs_live(session):
66
66
session .run (* cmd )
67
67
68
68
69
-
70
69
@nox .session (name = "docs-clean" )
71
70
def clean_dir (dir_path = docs_dir ):
72
71
"""
73
72
Clean out the docs directory used in the
74
73
live build.
75
74
"""
76
75
dir_path = pathlib .Path (dir_path )
77
- dir_contents = dir_path .glob ('*' )
76
+ dir_contents = dir_path .glob ("*" )
78
77
79
78
for content in dir_contents :
80
79
print (content )
0 commit comments