Skip to content

Commit

Permalink
update docs jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Jan 24, 2025
1 parent e1bee47 commit a78f804
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,26 @@ def docs(session):
"""Build the docs for this library."""

session.install("-e", ".[aiohttp]")
session.install("sphinx", "alabaster", "recommonmark", "sphinx-docstring-typing")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"sphinx==4.5.0",
"alabaster",
"recommonmark",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-T", # show full traceback on exception
"-W", # warnings as errors
"-T", # show full traceback on exception
"-N", # no colors
"-b",
"html",
Expand All @@ -141,6 +154,26 @@ def docs(session):
os.path.join("docs", "_build", "html", ""),
)

@nox.session(python="3.10")
def docfx(session):
"""Build the docfx yaml files for this library."""

session.install("-e", ".")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
)


@nox.session(python="pypy")
def pypy(session):
Expand Down

0 comments on commit a78f804

Please sign in to comment.