-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DOC: add option for skipping execution of code blocks #39360
Conversation
This should make documentation builds faster for people who aren't working on the code samples.
Speeds up full build by 36% in wall clock time.
Ran these in GitHub Codespaces. |
@@ -302,6 +306,12 @@ def main(): | |||
argparser.add_argument( | |||
"--no-api", default=False, help="omit api and autosummary", action="store_true" | |||
) | |||
argparser.add_argument( | |||
"--no-ipython", | |||
default=False, |
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.
is default
needed with action="store_true"
?
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.
Not sure; I just copied from --no-api
above.
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.
Yeah I think Marco is correct - https://docs.python.org/3/library/argparse.html#action
@@ -595,6 +595,9 @@ reducing the turn-around time for checking your changes. | |||
python make.py clean | |||
python make.py --no-api | |||
|
|||
# skip executing the code blocks |
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.
Worth noting why someone might do this - slight performance improvements :)
status here? |
On second thought, not sure it's worth the added complexity for the narrow use case. If someone disagrees, happy to reopen and fix. Thanks for the reviews! |
Came up as an idea at the documentation meeting (#39183). This should make documentation builds faster for people who aren't working on the code samples.
Very open to alternatives names to
--no-ipython
.closes #xxxxwhatsnew entry