Re: [Numpy-discussion] Sphinx custom extension mess, and patches

On Tue, Feb 17, 2009 at 12:17:17AM +0100, Georg Brandl wrote:
I'm all for it. In the case of autosummary, I'm guilty of not getting it in sooner. This will change soon. In other cases, I don't even know of the extension, probably because those who write it deem it as too project-specific to contribute it.
I don't ask for too much if an extension is contributed, so by all means do at least post about your extensions!
I am not blaming anyone, just pointing out a non ideal situation. It has already improved a lot with the matplotlib guys and the scipy guys merging some changes in extensions and publishing the extensions in an importable part of their source tree. It is true that I'll be happier when I will be able to import the only_directive, and the auto_summary from sphinx :). Thanks for your great work, Gaƫl

On Mon, Feb 16, 2009 at 3:21 PM, Gael Varoquaux <gael.varoquaux@normalesup.org> wrote:
I am not blaming anyone, just pointing out a non ideal situation. It has already improved a lot with the matplotlib guys and the scipy guys merging some changes in extensions and publishing the extensions in an importable part of their source tree.
In keeping with the spirit of trying to get all of these extension changes upstream so that we can all eventually stop carrying our own copies, below is a tiny change I just made to the inheritance diagram one. This is needed to ensure that the figure is separated from any surrounding text, since otherwise you get hideous off-screen diagrams in the rendered PDF. This has been committed to the nipy trunk already. Similarly (for the pymvpa crowd), the api autogen code is now a module, and it also contains a few small fixes, in particular regarding chapter titles. Feel free to grab and update your copy: http://bazaar.launchpad.net/~nipy-developers/nipy/trunk/annotate/head%3A/too... I've been told the gods of numpy/sphinx don't like auto-generated docs, but I think there's a valid use case for these tools, so hopefully in the future it will be possible to include them upstream for us lesser mortals to use. If not, I guess we'll just continue to carry our copies around :) Cheers, f # diff, inline because it's so trivial: === modified file 'doc/sphinxext/inheritance_diagram.py' --- doc/sphinxext/inheritance_diagram.py 2009-01-30 02:00:57 +0000 +++ doc/sphinxext/inheritance_diagram.py 2009-02-20 21:11:38 +0000 @@ -370,7 +370,7 @@ graph.run_dot(['-Tpdf', '-o%s' % pdf_path], name, parts, graph_options={'size': '"6.0,6.0"'}) - return '\\includegraphics{%s}' % pdf_path + return '\n\\includegraphics{%s}\n\n' % pdf_path def visit_inheritance_diagram(inner_func): """

Thanks, Fernando. I've applied your patch to matplotlib (branch and trunk). Mike Fernando Perez wrote:
On Mon, Feb 16, 2009 at 3:21 PM, Gael Varoquaux <gael.varoquaux@normalesup.org> wrote:
I am not blaming anyone, just pointing out a non ideal situation. It has already improved a lot with the matplotlib guys and the scipy guys merging some changes in extensions and publishing the extensions in an importable part of their source tree.
In keeping with the spirit of trying to get all of these extension changes upstream so that we can all eventually stop carrying our own copies, below is a tiny change I just made to the inheritance diagram one. This is needed to ensure that the figure is separated from any surrounding text, since otherwise you get hideous off-screen diagrams in the rendered PDF.
This has been committed to the nipy trunk already.
Similarly (for the pymvpa crowd), the api autogen code is now a module, and it also contains a few small fixes, in particular regarding chapter titles. Feel free to grab and update your copy:
http://bazaar.launchpad.net/~nipy-developers/nipy/trunk/annotate/head%3A/too...
I've been told the gods of numpy/sphinx don't like auto-generated docs, but I think there's a valid use case for these tools, so hopefully in the future it will be possible to include them upstream for us lesser mortals to use. If not, I guess we'll just continue to carry our copies around :)
Cheers,
f
# diff, inline because it's so trivial:
=== modified file 'doc/sphinxext/inheritance_diagram.py' --- doc/sphinxext/inheritance_diagram.py 2009-01-30 02:00:57 +0000 +++ doc/sphinxext/inheritance_diagram.py 2009-02-20 21:11:38 +0000 @@ -370,7 +370,7 @@
graph.run_dot(['-Tpdf', '-o%s' % pdf_path], name, parts, graph_options={'size': '"6.0,6.0"'}) - return '\\includegraphics{%s}' % pdf_path + return '\n\\includegraphics{%s}\n\n' % pdf_path
def visit_inheritance_diagram(inner_func): """
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
-- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
participants (3)
-
Fernando Perez
-
Gael Varoquaux
-
Michael Droettboom