Skip to content

Don't add package name to site_path value in dev_tools/docs/build_api_docs.py#1400

Merged
arettig merged 2 commits into
quantumlib:mainfrom
mhucka:update-site-path
Jul 6, 2026
Merged

Don't add package name to site_path value in dev_tools/docs/build_api_docs.py#1400
arettig merged 2 commits into
quantumlib:mainfrom
mhucka:update-site-path

Conversation

@mhucka

@mhucka mhucka commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

The base site_path parameter value is used to construct the absolute URLs for the table of contents and redirects. Past organizations of the DevSite-based API documentation for OpenFermion must have been slightly different. To make things work correctly today, the value of site_path in dev_tools/docs/build_api_docs.py must omit the openfermion part, because the Python API generator (tensorflow_docs.api_generator) automatically appends the Python package's namespace (openfermion) to the base site_path.

This change only affects the metadata links generated in the _toc.yaml and _redirects.yaml files used for the web site served internally by Google.

mhucka added 2 commits July 6, 2026 22:24
The base `site_path` parameter value is used to construct the absolute
URLs for the table of contents and redirects. Past organizations of the
DevSite-based API documentation for OpenFermion must have been slightly
different. To make things work correctly today, the value of `site_path`
in dev_tools/docs/build_api_docs.py must omit the `openfermion` part,
because the Python API generator (`tensorflow_docs.api_generator`)
automatically appends the Python package's namespace (`openfermion`) to
the base `site_path`.

This change only affects the metadata links generated in the `_toc.yaml`
and `_redirects.yaml` files used for the web site served internally by
Google.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the default value of the site_path command-line flag in dev_tools/docs/build_api_docs.py from '/reference/python/openfermion' to '/reference/python'. There are no review comments to address, and I have no feedback to provide on this straightforward change.

@mhucka mhucka requested review from arettig and fdmalone July 6, 2026 22:25
@mhucka mhucka changed the title Don't add package name to site_path Don't add package name to site_path value in dev_tools/docs/build_api_docs.py Jul 6, 2026

@arettig arettig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arettig arettig added this pull request to the merge queue Jul 6, 2026
Merged via the queue into quantumlib:main with commit 5decfb3 Jul 6, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants