Skip to content

Commit

Permalink
Add docs session to noxfile (#202)
Browse files Browse the repository at this point in the history
* Add docs session to noxfile

* Update noxfile.py.j2
  • Loading branch information
busunkim96 authored Apr 17, 2019
1 parent 526aba4 commit 55e5e75
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions synthtool/gcp/templates/python_library/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,21 @@ def cover(session):
session.run("coverage", "report", "--show-missing", "--fail-under={{ cov_level if cov_level != None else '100' }}")

session.run("coverage", "erase")

@nox.session(python="3.7")
def docs(session):
"""Build the docs for this library."""

session.install('sphinx', 'alabaster', 'recommonmark')

shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
session.run(
'sphinx-build',
'-W', # warnings as errors
'-T', # show full traceback on exception
'-N', # no colors
'-b', 'html',
'-d', os.path.join('docs', '_build', 'doctrees', ''),
os.path.join('docs', ''),
os.path.join('docs', '_build', 'html', ''),
)

0 comments on commit 55e5e75

Please # to comment.