[IPython-User] what triggers a figure redraw / inline

John Hunter jdh2358@gmail....
Sat Feb 25 23:04:50 CST 2012

On Thu, Feb 23, 2012 at 6:18 PM, Fernando Perez <fperez.net@gmail.com>wrote:

> Ahh, I can breathe better already :)  Speaking of the gallery (this is
> getting OT for ipython), I think it's in serious need of a cleanup.  I
> appreciate today's PR on organizing it by sections, but the real issue
> is that over the years, the gallery has accrued a lot of scripts
> without any comments or explanations of purpose, deprecated APIs, etc.
>  I wonder if you could spur a 'gallery cleanup' project, encouraging
> users to submit pull requests that remove duplicate/similar examples,
> document better the ones left, etc.  While there's a lot of good stuff
> there and I continue to point people to it, there really is also a
> massive amount of weed growth that is starting to be annoying in
> practice.
> But the cleanup job is easy, can be done by non-experts (and is hence
> a great one for new developers to start contributing) and would be
> very beneficial to the project at large.
I will get involved in that thread.  I agree that something more curated
would be preferable.  I'm imagining some sort of metadata one could drop in
an example file.  eg, at the end of a *.py code example we could have some
simple markup like (not wed to the format, just illustrating)::

  # _gallery_
  # topics: histograms, colormaps
  # rst: See :func:`~matplotlib.pyplot.hist` and :ref:`transforms_tutorial`
for more info

and then the build process could drop it in a relevant section (or two) for
the gallery.  Although the format is open to discussion, as the mockup
illustrates we could support some additional rst style meta linkage to
other docs, eg so the image/code pages could contain links to the api or
other docs that the example illustrates.  Anything that is curated (and
presumably we would comment and clean these as we tag them) would show up
at the top of the gallery in the appropriate section, and we would have
everything at the end in 'the weeds" so all the examples make it on to the
page, but the stuff at the top is organized and clean.  We could support a
section of example markup that is full blown sphinx/rest, so for each page
that is already image + code, we could optionally have a section that is
full-blown-rest that describes the example with relevant links to the rest
of the docs. This would give us not only curated sections, as Ben's pull
request already does, but lots of useful metadata on top.

I do believe it is important that even non-curated examples show up "in the
weeds" since curating is not something we can count on and there is value
in the gallery as it is showing *everything* even if it has not been
blessed.  But if we can fix what the typical user sees *first*, and then
show everything else after that, it will be an improvement.

I'll work with Ben on some of these ideas and maybe I can sprint on this at
pydata with Ben remotely and any locals who are interested.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120225/5b7fb2ce/attachment.html 

More information about the IPython-User mailing list