Skip to content

Commit

Permalink
chore: update docfx minimum Python version (#185)
Browse files Browse the repository at this point in the history
* chore: update docfx minimum Python version

* test: update test for python-asset deprecation

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
dandhlee and gcf-owl-bot[bot] committed Nov 3, 2023
1 parent 7b984ed commit 7f9e75a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def install_systemtest_dependencies(session, *constraints):
@nox.session(python=["3.7", "3.8", "3.9"])
@nox.parametrize(
"library",
["python-asset"],
[
("google-cloud-python", "google-cloud-asset"),
],
ids=["asset"],
)
def test(session, library):
Expand All @@ -230,6 +232,9 @@ def test(session, library):
NOTE: The unit and system test functions above are copied from the templates.
They will need to be updated when the templates change.
"""
package = ""
if type(library) == tuple:
library, package = library
try:
session.run("git", "-C", library, "pull", external=True)
except nox.command.CommandFailed:
Expand All @@ -242,6 +247,8 @@ def test(session, library):
)

session.cd(library)
if package:
session.cd(f"packages/{package}")
unit(session)
# system tests are run 3.7 only
if session.python == "3.7":
Expand Down Expand Up @@ -337,13 +344,15 @@ def docs(session):
)


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

session.install("-e", ".")
session.install(
"sphinx==4.0.1", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml"
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
Expand Down

0 comments on commit 7f9e75a

Please sign in to comment.