Skip to content

Consolidate and move examples out of pylab #8266

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 3 commits into from
May 23, 2017

Conversation

choldgraf
Copy link
Contributor

@choldgraf choldgraf commented Mar 11, 2017

This consolidates a number of examples in the pylab examples folder. Basically it's just taking examples where there was XXX_demo1, XXX_demo2 etc, and turning them into a single sphinx-gallery demo. It also moves a couple of them into more appropriate folders (e.g., barplots go from pylab -> statistics).

related to #8564 though it's not creating tutorials per-se. I think some of these examples could be converted to tutorials one day, but I think this is a good first step.

@tacaswell
Copy link
Member

This probably should make contact with http://matplotlib.org/users/annotations.html

@NelleV NelleV added the MEP: MEP12 gallery and examples improvements label Mar 11, 2017
@choldgraf
Copy link
Contributor Author

That's a good idea @tacaswell , latest push has a reference to the tutorial in the intro paragraph.

It's a little hard for me to see how this will render on the MPL website because it appears that sphinx-gallery isn't actually set up to build yet...

@NelleV
Copy link
Member

NelleV commented Mar 14, 2017

On that matter, maybe we should merge the sphinx-gallery PR sooner than later (though i am slightly hesitant to do this just now).
@tacaswell maybe we should discuss a minimal set of requirements for the sphinx-gallery PR to be merged? We have most of the «main» categories from our current gallery done, but we are missing the pylab section, the API section and some of the toolkits. If we push very hard, I am pretty sure we can get the 3D stuff in quickly. And both the pylab and API section have moved forward very fast, so we could also decide to split those folder into "sphinx-gallery compatible" and the rest. IMO, that yields a pretty decent gallery, but we would be missing some of the current examples.

@choldgraf
Copy link
Contributor Author

why not merge a PR with sphinx-gallery generating on a hidden page first (e.g. not linked in index.rst etc) so that you can make sure it's rendering how you like. Then when happy with it, it'd be a small PR just to include it in the index and make it a more discoverable page.

@tacaswell
Copy link
Member

I would be happy with merging sooner rather than later and having an 'old' section that things get moved out of.

@choldgraf
Copy link
Contributor Author

Cool - in the meantime lemme know if this looks OK and I can remove the other annotation examples (since this has all of the same information in one package). If there need to be edits made to the gallery render then I'm happy to make those changes when the time comes.

@choldgraf choldgraf force-pushed the consolidate_annotation branch from 4ed0106 to 8df5002 Compare May 4, 2017 01:36
@choldgraf choldgraf changed the title [WIP] Consolidate annotation [WIP] Consolidate examples May 4, 2017
@choldgraf
Copy link
Contributor Author

revived this PR and added some other consolidated examples...maybe @story645 has thoughts?

@choldgraf
Copy link
Contributor Author

(I don't believe that travis failures are due to this PR)

@story645
Copy link
Member

story645 commented May 7, 2017

It's kinda hard to follow 'cause there are so many files. Preliminary thought is nothing is jumping out as being messy.

@choldgraf
Copy link
Contributor Author

Yeah - there are lots of changed files basically because some links got broken and had to be changed. It's not really adding anything new, just consolidating examples into one thing instead of multiple things. The biggest drawbacks I can see to this PR is that some of these might be better as tutorials etc, but I don't have the bandwidth to do a full overhaul and think it's better to consolidate as a first step anyway. LMK what you think!

@story645
Copy link
Member

story645 commented May 8, 2017

Agree with you on consolidating first and then worrying about what should be a tutorial later. Do you have a list of which examples got consolidated down to what?

@choldgraf
Copy link
Contributor Author

It's something like:

  • image_demo
  • annotation_demo
  • barchart_demo
  • boxplot_demo
  • fancybox_demo
  • hexbin_demo
  • legend_demo
  • line_collection
  • major_minor
  • pcolor
  • psd_demo
  • stackplot

@story645
Copy link
Member

story645 commented May 8, 2017

So long as nothing got removed and it was all shifting, I'm +1 on merging

@choldgraf choldgraf force-pushed the consolidate_annotation branch from 5bfd9cb to 37995b9 Compare May 12, 2017 23:52
@choldgraf
Copy link
Contributor Author

latest push is just a rebase on 2 files that were slightly changed, but the doc-relevant tests were passing...

@choldgraf
Copy link
Contributor Author

choldgraf commented May 16, 2017

ping @story645 :)

(unless we need another person to look b4 merge?)

@story645
Copy link
Member

ping @tacaswell to sign off on the consolidation?

@choldgraf
Copy link
Contributor Author

found a broken image link in there! latest push should fix it and then this PR is ready to go from my end...

@story645 story645 changed the title [WIP] Consolidate examples [MRG] Consolidate examples May 19, 2017
@choldgraf
Copy link
Contributor Author

Failing travis test isn't doc related...think this is ready to go @story645 ?

@story645
Copy link
Member

Sorry, I agree with you but a previous disagreement about a deleted doc makes me gunshy about merging any major doc overhauls (and while this doesn't delete, it does move things) without at least one more devs approval.

@QuLogic
Copy link
Member

QuLogic commented May 20, 2017

The failing test is in a file that's changed in this PR, so I think it is related. Will review other stuff later.

@choldgraf choldgraf force-pushed the consolidate_annotation branch from ccf4005 to fbd6de5 Compare May 20, 2017 23:30
@choldgraf
Copy link
Contributor Author

choldgraf commented May 20, 2017

@QuLogic you're right - just saw that, it was a PEP error (no blank line at end of file). I disregarded the test because I thought it was one of the non-doc ones that errors all the time. Latest commit fixes that

@QuLogic
Copy link
Member

QuLogic commented May 21, 2017

The flaky tests were greatly reduced by #8346 and hopefully #8375 will be in soon to fix that one.

@choldgraf
Copy link
Contributor Author

That's great, I am +1000 on making tests more reliable :-)

@choldgraf choldgraf force-pushed the consolidate_annotation branch from fbd6de5 to 95be2dd Compare May 21, 2017 04:15
@choldgraf
Copy link
Contributor Author

looks like tests passing now @QuLogic !

@dstansby
Copy link
Member

How easy would it be to split this up into several smaller PRs? I've having trouble reviewing it because there are so many changes.

@choldgraf
Copy link
Contributor Author

How easy would it be to split this up into several smaller PRs?

To be honest, I would really prefer avoiding this. For better and worse PRs get merged rather slowly in matplotlib and I have already sunk a ton of time in the docs these last months, so I don't have the bandwidth to oversee a bunch of new pull requests. For this reason I'd rather lump a bunch of changes together when it's just rearranging stuff etc. This doesn't create any new content, it's just taking examples numbered plot1.py, plot2.py, plot3.py and turning them into a single example plot.py by stacking them.

I agree with you that any really meaningful changes to content, etc should be done in separate PRs.

@efiring efiring changed the title [MRG] Consolidate examples Consolidate and move examples out of pylab May 23, 2017
@efiring efiring merged commit 8ae0dbf into matplotlib:master May 23, 2017
@efiring
Copy link
Member

efiring commented May 23, 2017

@choldgraf, Thank you! This looks to me like low-risk progress, so I merged it.

@choldgraf
Copy link
Contributor Author

@efiring thanks! If this introduced something weird somewhere feel free to ping me and I'll patch it.

@QuLogic QuLogic added this to the v2.1 milestone Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation MEP: MEP12 gallery and examples improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants