Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Commit 276f8b5

Browse files
sasha-gitgcopybara-github
authored andcommitted
chore: unbreak gemini_docsfx build and update noxfile.py and docs-presubmit.cfg to include gemini_docs and gemini_docfx sessions
PiperOrigin-RevId: 671822171
1 parent ee65917 commit 276f8b5

3 files changed

Lines changed: 25 additions & 33 deletions

File tree

.github/sync-repo-settings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ branchProtectionRules:
1414
requiresStrictStatusChecks: true
1515
requiredStatusCheckContexts:
1616
- 'cla/google'
17+
- 'Kokoro docs-presubmit'
1718
- 'Presubmit - Lint and Coverage'
1819
- 'Presubmit - Unit Tests Python 3.8'
1920
- 'Presubmit - Unit Tests Python 3.9'

.kokoro/docs/docs-presubmit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ env_vars: {
2424
# Only run this nox session.
2525
env_vars: {
2626
key: "NOX_SESSION"
27-
value: "docs"
27+
value: "docs docfx gemini_docs gemini_docfx"
2828
}

noxfile.py

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@
3232

3333
DEFAULT_PYTHON_VERSION = "3.8"
3434

35+
DOCS_DEPENDENCIES = (
36+
"sphinx==5.0.2",
37+
"alabaster",
38+
"google-cloud-aiplatform[evaluation]",
39+
"recommonmark",
40+
)
41+
42+
DOCFX_DEPENDENCIES = (
43+
"gcp-sphinx-docfx-yaml",
44+
"sphinxcontrib-applehelp==1.0.4",
45+
"sphinxcontrib-devhelp==1.0.2",
46+
"sphinxcontrib-htmlhelp==2.0.1",
47+
"sphinxcontrib-qthelp==1.0.3",
48+
"sphinxcontrib-serializinghtml==1.1.5",
49+
"alabaster",
50+
"google-cloud-aiplatform[evaluation]",
51+
"recommonmark",
52+
)
53+
3554
UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]
3655
UNIT_TEST_STANDARD_DEPENDENCIES = [
3756
"mock",
@@ -374,12 +393,8 @@ def docs(session):
374393

375394
session.install("-e", ".")
376395
session.install(
377-
"sphinx==5.0.2",
378-
"alabaster",
379-
"immutabledict",
380-
"google-cloud-aiplatform[evaluation]",
396+
*DOCS_DEPENDENCIES,
381397
"google-cloud-aiplatform[prediction]",
382-
"recommonmark",
383398
)
384399

385400
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
@@ -402,15 +417,8 @@ def docfx(session):
402417

403418
session.install("-e", ".")
404419
session.install(
405-
"gcp-sphinx-docfx-yaml",
406-
"sphinxcontrib-applehelp==1.0.4",
407-
"sphinxcontrib-devhelp==1.0.2",
408-
"sphinxcontrib-htmlhelp==2.0.1",
409-
"sphinxcontrib-qthelp==1.0.3",
410-
"sphinxcontrib-serializinghtml==1.1.5",
411-
"alabaster",
420+
*DOCFX_DEPENDENCIES,
412421
"google-cloud-aiplatform[prediction]",
413-
"recommonmark",
414422
)
415423

416424
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
@@ -444,14 +452,7 @@ def gemini_docs(session):
444452
"""Build the docs for library related to Gemini."""
445453

446454
session.install("-e", ".")
447-
session.install(
448-
"sphinx==5.0.2",
449-
"alabaster",
450-
"immutabledict",
451-
"google-cloud-aiplatform[evaluation]",
452-
"google-cloud-aiplatform[prediction]",
453-
"recommonmark",
454-
)
455+
session.install(*DOCS_DEPENDENCIES)
455456

456457
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
457458
session.run(
@@ -472,17 +473,7 @@ def gemini_docfx(session):
472473
"""Build the docfx yaml files for library related to Gemini."""
473474

474475
session.install("-e", ".")
475-
session.install(
476-
"gcp-sphinx-docfx-yaml",
477-
"sphinxcontrib-applehelp==1.0.4",
478-
"sphinxcontrib-devhelp==1.0.2",
479-
"sphinxcontrib-htmlhelp==2.0.1",
480-
"sphinxcontrib-qthelp==1.0.3",
481-
"sphinxcontrib-serializinghtml==1.1.5",
482-
"alabaster",
483-
"google-cloud-aiplatform",
484-
"recommonmark",
485-
)
476+
session.install(*DOCFX_DEPENDENCIES)
486477

487478
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
488479
session.run(

0 commit comments

Comments
 (0)