Skip to content
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

MEP 12: Gallery cleanup and reorganization (rebase) #1924

Merged
merged 36 commits into from Apr 26, 2013

Conversation

tonysyu
Copy link
Contributor

@tonysyu tonysyu commented Apr 19, 2013

Rebase of #1623. I rebased on a separate branch just in case I mess up. The gallery looks good on my end, but I don't have the green button so I can't check whether or not github gives the "We can’t automatically merge this pull request." message.

Split demo in to two different examples
Rename fill_demo2 to fill_demo_features to clarify purpose
* Rename to imshow_demo
* Add smaller version of lena image saved as a numpy binary so that use doesn't require PIL
Add new sphinx config variable `mpl_example_sections` and use this list in both `gen_gallery.py` and `gen_rst.py`.
@mdboom
Copy link
Member

mdboom commented Apr 19, 2013

Looks good to me. (And the green button is there!). I'm fine with merging this now, but would like @pelson's view about whether it will be easiest to do this before or after #1918.

@tonysyu
Copy link
Contributor Author

tonysyu commented Apr 19, 2013

If it's easier to merge #1918 first, I don't mind redoing the rebase.

@pelson
Copy link
Member

pelson commented Apr 25, 2013

I've just checked out a fresh clone of this and was unable to build the docs:

reading sources... [  0%] api/axes_api                                                                                                                
Exception occurred:
  File "<path to global matplotlib install>/matplotlib/sphinxext/plot_directive.py", line 670, in run
    with open(source_file_name, 'r') as fd:
IOError: [Errno 2] No such file or directory: u'<path to local matplotlib install>/doc/mpl_examples/pylab_examples/errorbar_demo.py'
The full traceback has been saved in /var/tmp/sphinx-err-o5We0U.log, if you want to report the issue to the developers.

Any ideas? @NelleV have you ever seen this?

@pelson
Copy link
Member

pelson commented Apr 25, 2013

Any ideas? @NelleV have you ever seen this?

Looks like my paths are a little odd. I think I know the problem, now time to find a solution 😄...

@NelleV
Copy link
Member

NelleV commented Apr 25, 2013

@pelson If seen this before: I think doing a make clean solves the problem. You also need to make sure you've got the proper version of matplotlib installed (ie you need to check you are building the documentation at time T of the matplotlib version at time T, and not at time T - n) .

@pelson
Copy link
Member

pelson commented Apr 26, 2013

I think doing a make clean solves the problem

Hmmm, yes, normally I'd agree, but because the clean wasn't working I took a whole new clone of this branch and it still failed. It turns out that because of the way make.py calls sphinx-build, which itself calls python, my local build of matplotlib is not being picked up, and instead I'm getting the old globally installed version (in fact, this had nothing to do with our make.py, I get the same problem calling sphinx-build directly. Adding sys.path.insert(0, '../lib/') to conf.py did the trick though.

Now building these docs. Once I've done that, I'll merge this and then rebase my conflicting branch.

@pelson
Copy link
Member

pelson commented Apr 26, 2013

For the record, I've also been getting the following:

writing output... [  0%] api/artist_api                                                                                                               
Exception occurred:
  File "Sphinx-1.1.3-py2.7.egg/sphinx/ext/graphviz.py", line 219, in render_dot_html
    mapfile = open(outfn + '.map', 'rb')
IOError: [Errno 2] No such file or directory: 'doc/build/html/_images/inheritance-e7d27e10673ff7b93cbe7104e04dbb29a26587da.png.map'
The full traceback has been saved in /var/tmp/sphinx-err-JmhgQ8.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
Building HTML failed.

Which I fixed by downgrading from graphiviz 2.30 back to 2.26 (because I had it handy, but otherwise 2.28).

@pelson
Copy link
Member

pelson commented Apr 26, 2013

I notice Lena has made her way back into the gallery. @tonysyu - would you mind creating a follow on PR to use the Grace Hopper image instead?

pelson added a commit that referenced this pull request Apr 26, 2013
MEP 12: Gallery cleanup and reorganization
@pelson pelson merged commit 218b550 into matplotlib:master Apr 26, 2013
@pelson
Copy link
Member

pelson commented Apr 26, 2013

@tonysyu - would mind also putting up another separate PR which fixes backend_driver.py?

@mdboom
Copy link
Member

mdboom commented Apr 26, 2013

@pelson: My solution to the build-sphinx script pointing to the wrong Python is to install Sphinx into the same virtualenv as where I installed matplotlib. Adding ../lib to sys.path will only work for pure Python modules -- C/C++ extentsions don't live there so won't be included.

@takluyver takluyver mentioned this pull request Apr 27, 2013
tonysyu added a commit to tonysyu/matplotlib that referenced this pull request May 5, 2013
Note that lena.npy was created in PR matplotlib#1924 before I realized matplotlib could read png images without PIL. That file wasn't used anywhere else, so I remove it here.
tonysyu added a commit to tonysyu/matplotlib that referenced this pull request May 5, 2013
A couple of files were removed in PR matplotlib#1918, but were accidentally re-added to `backend_driver.py` by PR matplotlib#1924.
@tonysyu tonysyu mentioned this pull request May 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants