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

De-randomize doc builds#5769

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
jenshnielsen merged 7 commits intomatplotlib:v2.xfromQuLogic:non-random-docs
Jan 5, 2016

Conversation

QuLogic
Copy link
Member

Based on some issues I've found trying to get consistency out of#5743, this disables some needless randomness in the documentation (by setting seeds, or dropping it altogether). There are still a few things that remain:

  • The hash in the inheritance diagrams changes; I guess this is a "bug" in the Sphinx extension, but I have not really looked much deeper.
  • There are some dictionaries in attributes and/or default parameters that don't stay sorted. I would assume that's also deep in Sphinx and I can't do anything about it.
  • Something is weird with the size of the background of the labels inboxplot_demo2.py; I guess the font size and bbox calculation are not always done in the same order.
  • The location of some tick marks is ever so slightly different in 41 images (including thumbnails and duplicates, so not quite so many actual examples.) I don't know why this is, maybe rounding differences?

@QuLogicQuLogic added this to thenext major release (2.0) milestoneDec 31, 2015
@jenshnielsen
Copy link
Member

👍

I think this fails due to the issue fixed by#5770

@mdboom
Copy link
Member

Cool. This is very welcome work.

The hash in the inheritance diagrams changes; I guess this is a "bug" in the Sphinx extension, but I have not really looked much deeper.

Looking at the code, nothing obvious leaps out as to why this would be the case... As an experiment, you could try monkey-patching the hash function insphinx.ext.inheritance_diagram.get_graph_hash to forcibly sort or otherwise normalize the stuff that goes into the hash (and then make a PR against Sphinx if successful -- I'm not suggesting monkey patching it as a matter of course from matplotlib).

There are some dictionaries in attributes and/or default parameters that don't stay sorted. I would assume that's also deep in Sphinx and I can't do anything about it.

If you can reduce this to a simple standalone example where the attributes don't always come out in order, I suspect the Sphinx folks would be amenable to fixing it.

Something is weird with the size of the background of the labels in boxplot_demo2.py; I guess the font size and bbox calculation are not always done in the same order.

I can certainly reproduce this one. I might spend a little time looking.

The location of some tick marks is ever so slightly different in 41 images (including thumbnails and duplicates, so not quite so many actual examples.) I don't know why this is, maybe rounding differences?

Which ones? I wonder if this is due to something not quite right in the recent limits changes or possibly something like#5767

@QuLogic
Copy link
MemberAuthor

Inheritance diagrams should be fixed bysphinx-doc/sphinx#2210.

@QuLogic
Copy link
MemberAuthor

Which ones? I wonder if this is due to something not quite right in the recent limits changes or possibly something like#5767

I don't know how these few always come out different somehow, but

  • build/html/_images/demo_axis_direction.png
  • build/html/_images/demo_axisline_style.png
  • build/html/_images/demo_curvelinear_grid1.png
  • build/html/_images/demo_curvelinear_grid.png
  • build/html/_images/demo_floating_axes1.png
  • build/html/_images/demo_floating_axes.png
  • build/html/_images/demo_floating_axis1.png
  • build/html/_images/demo_floating_axis.png
  • build/html/_images/parasite_simple21.png
  • build/html/_images/parasite_simple2.png
  • build/html/_images/simple_axis_direction01.png
  • build/html/_images/whats_new_99_axes_grid.png
    plus whatever other copies of these there are.

I was thinking more of#5647, though.

@QuLogic
Copy link
MemberAuthor

Looks like this is passing again with the rebase; I think it can go in if there are no other issues and we can leave the other stuff for other PRs.

@@ -16,6 +16,7 @@
randomDists = ['Normal(1,1)', ' Lognormal(1,1)', 'Exp(1)', 'Gumbel(6,4)',
'Triangular(2,9,11)']
N = 500
np.random.seed(0)
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest adding a comment that the random seeding is only to make the example reproducible

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

There are many of these in the examples without any comment; add them as well?

Copy link
Member

Choose a reason for hiding this comment

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

There are many issues with the examples so I wouldn't expect to fix all of them but I would like to do this in new examples

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Done.

@jenshnielsen
Copy link
Member

A few inline comments otherwise 👍 I agree that leaving the other stuff for a subsequent PR is fine.

Looks like the examples that list above are mainly in the mpl_toolkits axes_grid1 and axisartist.
Any change to these may conflict with#5752 which moves these around a bit

@tacaswell
Copy link
Member

@QuLogic If you can address the few line comments we can get this merged.#5752 needs a rebase already so lets get this one in so we can move forward on#5752 and#5743.

If you need to install sphinx from your repo to get that fix.

@mdboom
Copy link
Member

If you need to install sphinx from your repo to get that fix.

That's fine as long as we remember to rebase that against upstream Sphinx periodically. While I'm normally against monkey-patching, in this case I think I'd prefer monkey patching those two small methods in Sphinx because it places less burden to keep up with Sphinx.

@QuLogic
Copy link
MemberAuthor

If you need to install sphinx from your repo to get that fix.

Nah, I don't think that's necessary; it only ensures that consecutive builds give consistent names, but it won't make too much difference to the results.

jenshnielsen added a commit that referenced this pull requestJan 5, 2016
@jenshnielsenjenshnielsen merged commit1d89de2 intomatplotlib:v2.xJan 5, 2016
@jenshnielsen
Copy link
Member

Thanks. We can always fix the examples later then if there are several others with the same issue

@QuLogicQuLogic deleted the non-random-docs branchJanuary 5, 2016 07:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

4 participants
@QuLogic@jenshnielsen@mdboom@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp