Skip to content

Commit

Permalink
add docfx and presubmits
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Nov 16, 2023
1 parent 7ab1eda commit 892ee89
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
7 changes: 0 additions & 7 deletions docs/multiprocessing.rst

This file was deleted.

36 changes: 36 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,39 @@ def docs(session):
os.path.join("docs", ""),
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(
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-T", # show full traceback on exception
"-N", # no colors
"-D",
(
"extensions=sphinx.ext.autodoc,"
"sphinx.ext.autosummary,"
"docfx_yaml.extension,"
"sphinx.ext.intersphinx,"
"sphinx.ext.coverage,"
"sphinx.ext.napoleon,"
"sphinx.ext.todo,"
"sphinx.ext.viewcode,"
"recommonmark"
),
"-b",
"html",
"-d",
os.path.join("docs", "_build", "doctrees", ""),
os.path.join("docs", ""),
os.path.join("docs", "_build", "html", ""),
)
4 changes: 2 additions & 2 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@

templated_files = gcp.CommonTemplates().py_library()
s.move(templated_files / ".kokoro")
s.move(templated_files / "docs")
s.move(templated_files / "docs", excludes=["multiprocessing.rst"])
s.move(templated_files / "LICENSE")
s.move(templated_files / "CONTRIBUTING.rst")
s.move(templated_files / "*.md")
s.move(templated_files / "renovate.json")
s.move(templated_files / ".github", excludes=["workflows"])
s.move(templated_files / ".github", excludes=["workflows/unittest.yml"])

python.py_samples(skip_readmes=True)

Expand Down

0 comments on commit 892ee89

Please sign in to comment.