GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: update docs publisher for Gemini · hamgor/python-aiplatform@dc33b30

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .kokoro
    • publish-docs.sh
  • docs
    • index.rst
    • vertexai
      • services.rst
  • noxfile.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.kokoro/publish-docs.sh‎

Copy file name to clipboardExpand all lines: .kokoro/publish-docs.sh
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,41 @@ cat docs.metadata
6060

6161
# upload docs
6262
python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
63+
64+
# build Gemini docs
65+
nox -s gemini_docs
66+
67+
# create metadata
68+
python3 -m docuploader create-metadata \
69+
--name="vertexai" \
70+
--version=$(python3 setup.py --version) \
71+
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
72+
--distribution-name="google-cloud-vertexai" \
73+
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
74+
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
75+
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
76+
77+
cat docs.metadata
78+
79+
# upload docs
80+
python3 -m docuploader upload gemini_docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
81+
82+
83+
# Gemini docfx yaml files
84+
nox -s gemini_docfx
85+
86+
# create metadata.
87+
python3 -m docuploader create-metadata \
88+
--name="vertexai" \
89+
--version=$(python3 setup.py --version) \
90+
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
91+
--distribution-name="google-cloud-vertexai" \
92+
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
93+
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
94+
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) \
95+
--stem="/vertex-ai/generative-ai/docs/reference/python"
96+
97+
cat docs.metadata
98+
99+
# upload docs
100+
python3 -m docuploader upload gemini_docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
Collapse file

‎docs/index.rst‎

Copy file name to clipboardExpand all lines: docs/index.rst
-2Lines changed: 0 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ API Reference
77
.. toctree::
88
:maxdepth: 2
99

10-
vertexai/services
11-
1210
aiplatform/services
1311
aiplatform/types
1412
aiplatform/prediction
Collapse file

‎docs/vertexai/services.rst‎

Copy file name to clipboardExpand all lines: docs/vertexai/services.rst
-72Lines changed: 0 additions & 72 deletions
This file was deleted.
Collapse file

‎noxfile.py‎

Copy file name to clipboardExpand all lines: noxfile.py
+69Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,75 @@ def docfx(session):
402402
)
403403

404404

405+
@nox.session(python="3.9")
406+
def gemini_docs(session):
407+
"""Build the docs for library related to Gemini."""
408+
409+
session.install("-e", ".")
410+
session.install(
411+
"sphinx==5.0.2",
412+
"alabaster",
413+
"google-cloud-aiplatform[prediction]",
414+
"recommonmark",
415+
)
416+
417+
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
418+
session.run(
419+
"sphinx-build",
420+
"-T", # show full traceback on exception
421+
"-N", # no colors
422+
"-b",
423+
"html",
424+
"-d",
425+
os.path.join("gemini_docs", "_build", "doctrees", ""),
426+
os.path.join("gemini_docs", ""),
427+
os.path.join("gemini_docs", "_build", "html", ""),
428+
)
429+
430+
431+
@nox.session(python="3.10")
432+
def gemini_docfx(session):
433+
"""Build the docfx yaml files for library related to Gemini."""
434+
435+
session.install("-e", ".")
436+
session.install(
437+
"gcp-sphinx-docfx-yaml",
438+
"sphinxcontrib-applehelp==1.0.4",
439+
"sphinxcontrib-devhelp==1.0.2",
440+
"sphinxcontrib-htmlhelp==2.0.1",
441+
"sphinxcontrib-qthelp==1.0.3",
442+
"sphinxcontrib-serializinghtml==1.1.5",
443+
"alabaster",
444+
"google-cloud-aiplatform",
445+
"recommonmark",
446+
)
447+
448+
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
449+
session.run(
450+
"sphinx-build",
451+
"-T", # show full traceback on exception
452+
"-N", # no colors
453+
"-D",
454+
(
455+
"extensions=sphinx.ext.autodoc,"
456+
"sphinx.ext.autosummary,"
457+
"docfx_yaml.extension,"
458+
"sphinx.ext.intersphinx,"
459+
"sphinx.ext.coverage,"
460+
"sphinx.ext.napoleon,"
461+
"sphinx.ext.todo,"
462+
"sphinx.ext.viewcode,"
463+
"recommonmark"
464+
),
465+
"-b",
466+
"html",
467+
"-d",
468+
os.path.join("gemini_docs", "_build", "doctrees", ""),
469+
os.path.join("gemini_docs", ""),
470+
os.path.join("gemini_docs", "_build", "html", ""),
471+
)
472+
473+
405474
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
406475
def prerelease_deps(session):
407476
"""Run all tests with prerelease versions of dependencies installed."""

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.