Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible #7327

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 2 commits into from
Jan 20, 2017
Merged

DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible #7327

merged 2 commits into from
Jan 20, 2017

Conversation

NelleV
Copy link
Member

@NelleV NelleV commented Oct 21, 2016

Minor modification to have the lines, bars and markers section Sphinx-gallery compatible.

See #7206

@NelleV NelleV added Documentation MEP: MEP12 gallery and examples improvements labels Oct 21, 2016
@@ -1,4 +1,3 @@
from __future__ import print_function, division
"""
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure why this file is here.

@NelleV NelleV changed the title DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible [MRG] DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible Oct 21, 2016
@anntzer
Copy link
Contributor

anntzer commented Nov 2, 2016

I think(?) sphinx-gallery requires both a title and some non-empty "content", right? Would it be better to ask them (or write a PR ourselves) that drops the requirement for the content (generating a page with just a title and a plot) and/or special cases the case of the a single-line docstring to use it as both title and content?

I feel that docstrings of the form

======
<topic>
======

This example showcases <topic>.

or

======
<topic>
======

Reference for <topic> included in matplotlib.

are mostly line noise...

(As a side note I think that the correct capitalization is matplotlib, not Matplotlib -- see home page, for example.)

@QuLogic
Copy link
Member

QuLogic commented Nov 2, 2016

(As a side note I think that the correct capitalization is matplotlib, not Matplotlib -- see home page, for example.)

Not sure that discussion was ever concluded.

@NelleV
Copy link
Member Author

NelleV commented Nov 2, 2016

sphinx-gallery is very unlikely to drop that requirement considering it is a very good way to enforce good documentation and meaningful examples. I'll ask one of the maintainer if this is an option but don't hold your breath.

for the matplotlib versus Matplotlib, considering these are lines that were there before me, I'd rather not have to modify them. I am going for the minimal change possible on all examples to precisely make the PR mergeable quickly and without discussion.

@anntzer
Copy link
Contributor

anntzer commented Nov 2, 2016

I agree that the requirement is, in theory, good. In practice, repeating the title in the description is somewhat defeating its goal...

Sorry for the capitalization noise :)

@NelleV
Copy link
Member Author

NelleV commented Nov 3, 2016

@anntzer I might create a PR fixing the capitalization as that's a quick easy fix.

'plot_fill.py',
'plot_fill_features.py',
'plot_line_dash_control.py',
'plot_line_styles_reference.py',
'scatter_with_legend.py'
Copy link
Member

Choose a reason for hiding this comment

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

should scatter_with_legend be renamed as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Eventually, when we move to sphinx-gallery, it'll have to.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Dec 8, 2016
@NelleV NelleV modified the milestones: 2.1 (next point release), 2.0.1 (next bug fix release) Dec 16, 2016
@tacaswell
Copy link
Member

tacaswell commented Dec 29, 2016

I am a bit concerned about renaming examples breaking people's bookmarks.

Why not backport example-only changes as far back as we can? That way the next time we re-generate the docs (ex on a micro release) the updated examples will be built.

@NelleV
Copy link
Member Author

NelleV commented Dec 30, 2016

If we migrate to sphinx-gallery, this will not be an option: examples are split between the one that produce a plot and no plot (and I hope soon, a video). This can be done right at the end, specially considering @efiring mentioned cleaning up and removing some of our examples (we have around 450 examples right now…).

@NelleV
Copy link
Member Author

NelleV commented Dec 30, 2016

(I can easily revert this change).

@NelleV
Copy link
Member Author

NelleV commented Dec 31, 2016

@tacaswell eh… I hadn't seen/understood your comments on the milestone.
I clearly don't understand how matplotlib deals with tagging, branching and releasing. On all the other opensource projects I've worked on once you've branched and tagged, the minimal amount of changes are backported. This means only backporting critical bug fixes. We actually had agreed to this in one of the calls (also mentionning a quick 2.1 release after the 2.0).
The constant backporting of pull requests by everyone, and then the merge of 2.0 into master really raises red flags in terms of project maintenance and good practices : as everyone can (and does) backport elements to 2.x, we've been backporting new features and very minor bug fixes to the 2.0 branch (which then leads to more bugs to fix in the 2.0 branch, so more delays to 2.0 etc).

Documentation is as important as code. It needs to be checked, reviewed and maintained. IMO, backporting documentation and examples changes should not be taken lightly. Instead of backporting to 2.0, I think we should be thinking about 2.1.

@tacaswell
Copy link
Member

All of our examples should be producing a plot and the name pattern sphinx-gallery looks for is configurable (ex https://github.com/NSLS-II/docs/blob/master/source/conf.py#L68 from my day-job).

The criteria for backports onto the RC should be critical or low risk. Doc changes (particularly to examples or rst prose) can not break anyone's code so are zero-risk.

I don't see what is wrong with merging maintenance branches up into the master branch.

@NelleV
Copy link
Member Author

NelleV commented Jan 3, 2017 via email

@NelleV
Copy link
Member Author

NelleV commented Jan 12, 2017

I've reverted the change in filenames, but it will be impossible to migrate to sphinx-gallery without a way to distinguish examples that produces plots to those that don't from the filename.

@codecov-io
Copy link

codecov-io commented Jan 13, 2017

Current coverage is 62.09% (diff: 100%)

Merging #7327 into master will not change coverage

@@             master      #7327   diff @@
==========================================
  Files           174        174          
  Lines         56050      56050          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          34807      34807          
  Misses        21243      21243          
  Partials          0          0          

Powered by Codecov. Last update 4d390fa...4e25744

@NelleV
Copy link
Member Author

NelleV commented Jan 13, 2017

I am closing this PR.
If someone is interested in picking up the work, the branch is still available.

@NelleV NelleV closed this Jan 13, 2017
@tacaswell tacaswell reopened this Jan 13, 2017
@NelleV
Copy link
Member Author

NelleV commented Jan 20, 2017

This is ready to be merged.

@QuLogic QuLogic changed the title [MRG] DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible [MRG+1] DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible Jan 20, 2017
@phobson phobson merged commit a17fc4f into matplotlib:master Jan 20, 2017
phobson added a commit that referenced this pull request Jan 20, 2017
DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible
@phobson
Copy link
Member

phobson commented Jan 20, 2017

Backported v2.0.x as 38298db

@phobson
Copy link
Member

phobson commented Jan 20, 2017

Thanks @NelleV, these are great improvements! I'm really looking forward to helping more with migrating to sphinx-gallery

@QuLogic QuLogic changed the title [MRG+1] DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible Jan 20, 2017
@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.1 (next point release) Jan 20, 2017
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.

6 participants