-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix doc build #23514
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
Merged
Merged
Fix doc build #23514
Conversation
This file contains hidden or 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
https://sphinx-gallery.github.io/stable/advanced.html#resetting-before-each-example is the docs on module resetting. |
jklymak
approved these changes
Jul 29, 2022
QuLogic
reviewed
Jul 29, 2022
As of sg 0.11 the unit registry is reset for each example. This also forces the basic_unit module to be fully re-imported to re-register in any example that use it.
QuLogic
approved these changes
Jul 29, 2022
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Jul 29, 2022
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Jul 29, 2022
QuLogic
added a commit
that referenced
this pull request
Jul 29, 2022
…514-on-v3.5.2-doc Backport PR #23514 on branch v3.5.2-doc (Fix doc build)
QuLogic
added a commit
that referenced
this pull request
Jul 29, 2022
…514-on-v3.5.x Backport PR #23514 on branch v3.5.x (Fix doc build)
3 tasks
1 task
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.
PR Summary
Replaces #23508
The problem is a combination of:
mpl.units
basic_units
) that lives in the examples directory that we use for the unit examplessys.modules
(so we do not get to run any code) butmpl.units
has been reloaded so our example units are no longer registeredThis PR fixes the issue by telling sg to also remove
'basic_units'
fromsys.modules
so that it is effectively re-imported (and hence we register our selves) on each example. In contrast #23508 fixes this by adding an explict re-registration step to the examples.The argument is favor of this PR is we do not require any changes to our examples and fixes the problem via the tool that broke. The argument in favor of #23508 is that it is maybe better pedagogically and explicit unit registration (rather than implicit on import) is better documentation anyway.
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).