-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to use arbitrary Sphinx HTML artifact folder #1336
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds a `--sphinx-artifact-folder` (alias `--sphinx-output`) option to manually specify the root of the Sphinx HTML output for a given package. This implies `--skip-download`. This is convenient for local API-docs development of the targetted packages, since I can use their regular docs-build processes and then just point `gen-api` at the right place without needing to copy anything into special folders.
jakelishman
force-pushed
the
jake/override-sphinx-dir
branch
from
May 9, 2024 16:59
56a306d
to
198451a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! No need to add tests. @arnaucasau will document this in #1336
Eric-Arellano
approved these changes
May 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this pull request
Jul 22, 2024
This adds a `--sphinx-artifact-folder` (alias `--sphinx-output`) option to manually specify the root of the Sphinx HTML output for a given package. This implies `--skip-download`. This is convenient for local API-docs development of the targetted packages, since I can use their regular docs-build processes and then just point `gen-api` at the right place without needing to copy anything into special folders. For example, I've locally been using Sphinx as normal in Qiskit, then running ```bash npm run gen-api -- -p qiskit -v 1.2.0 -a /path/to/docs/_build/html ``` to have the script directly target the Sphinx files without copying them. I made the magic `/artifact` suffix a bit more local, rather than spread between two functions for two reasons: 1. it's easier to reason about magic that's only local. 2. if the `/artifact` is _always_ appended by `zxMain` outside of the control of `prepareSphinxFolder`, it defeated the main purpose of this option. --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a
--sphinx-artifact-folder
(alias--sphinx-output
) option to manually specify the root of the Sphinx HTML output for a given package. This implies--skip-download
. This is convenient for local API-docs development of the targetted packages, since I can use their regular docs-build processes and then just pointgen-api
at the right place without needing to copy anything into special folders.For example, I've locally been using Sphinx as normal in Qiskit, then running
to have the script directly target the Sphinx files without copying them.
I made the magic
/artifact
suffix a bit more local, rather than spread between two functions for two reasons:/artifact
is always appended byzxMain
outside of the control ofprepareSphinxFolder
, it defeated the main purpose of this option.