Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 2 commits intomatplotlib:mainfromtacaswell:fix_doc_build
Jul 29, 2022
Merged

Fix doc build#23514

QuLogic merged 2 commits intomatplotlib:mainfromtacaswell:fix_doc_build
Jul 29, 2022

Conversation

tacaswell
Copy link
Member

PR Summary

Replaces#23508

The problem is a combination of:

  • the unit registry is managed by a dictionary at the module level ofmpl.units
  • in sg 0.11 the default matplotlib reset reloads that module which (resets the registry). The motivation for this on their side was to make sure that the date formatter config did not leak between examples.
  • we have a local module (basic_units) that lives in the examples directory that we use for the unit examples
  • the first time it is imported the example units get registered
  • on the second import call Python grabs the module fromsys.modules (so we do not get to run any code) butmpl.units has been reloaded so our example units are no longer registered

This 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

  • [n/a] Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

@tacaswelltacaswell added this to thev3.5-doc milestoneJul 29, 2022
@tacaswell
Copy link
MemberAuthor

As of sg 0.11 the unit registry is reset for each example.  This also forcesthe basic_unit module to be fully re-imported to re-register in any examplethat use it.
@QuLogicQuLogic merged commite7c5290 intomatplotlib:mainJul 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJul 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJul 29, 2022
@tacaswelltacaswell deleted the fix_doc_build branchJuly 29, 2022 20:40
QuLogic added a commit that referenced this pull requestJul 29, 2022
…514-on-v3.5.2-docBackport PR#23514 on branch v3.5.2-doc (Fix doc build)
QuLogic added a commit that referenced this pull requestJul 29, 2022
…514-on-v3.5.xBackport PR#23514 on branch v3.5.x (Fix doc build)
@bjlittlebjlittle mentioned this pull requestAug 1, 2022
1 task
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.5-doc
Development

Successfully merging this pull request may close these issues.

3 participants
@tacaswell@QuLogic@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp