[NumPy-Tickets] [NumPy] #1074: Merge plot_directive back to Matplotlib

NumPy Trac numpy-tickets@scipy....
Mon Mar 28 14:08:47 CDT 2011


#1074: Merge plot_directive back to Matplotlib
--------------------------------------+-------------------------------------
 Reporter:  pv                        |       Owner:  mdroe      
     Type:  task                      |      Status:  new        
 Priority:  normal                    |   Milestone:  Unscheduled
Component:  Documentation             |     Version:  devel      
 Keywords:  plot_directive sphinxext  |  
--------------------------------------+-------------------------------------

Comment(by mdroe):

 This is a good chunk of work, as the two versions have diverged
 considerably over the time -- and their behaviors wrt to file handling are
 different.

 I have a first pass at this in a branch on my personal git fork:

 https://github.com/mdboom/matplotlib/tree/plot_directive

 Unfortunately, I cannot test this against Numpy, as the doc build
 currently fails with:

 {{{
 # Sphinx version: 1.1pre
 # Python version: 2.7.1
 # Docutils version: 0.7 release
 # Jinja2 version: 2.2.1
 Traceback (most recent call last):
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/cmdline.py",
 line 188, in main
     app.build(force_all, filenames)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/application.py",
 line 204, in build
     self.builder.build_update()
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/builders/__init__.py",
 line 196, in build_update
     'out of date' % len(to_build))
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/builders/__init__.py",
 line 216, in build
     purple, length):
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/builders/__init__.py",
 line 120, in status_iterator
     for item in iterable:
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/environment.py",
 line 615, in update_generator
     self.read_doc(docname, app=app)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/environment.py",
 line 762, in read_doc
     pub.publish()
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/core.py", line 203, in publish
     self.settings)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/readers/__init__.py", line 69, in
 read
     self.parse()
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/readers/__init__.py", line 75, in
 parse
     self.parser.parse(self.input, document)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/__init__.py", line
 157, in parse
     self.statemachine.run(inputlines, document, inliner=self.inliner)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 170,
 in run
     input_source=document['source'])
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/statemachine.py", line 233, in
 run
     context, state, transitions)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/statemachine.py", line 454, in
 check_line
     return method(match, context, next_state)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2940, in text
     self.section(title.lstrip(), source, style, lineno + 1, messages)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 329,
 in section
     self.new_subsection(title, lineno, messages)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 398,
 in new_subsection
     node=section_node, match_titles=1)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 284,
 in nested_parse
     node=node, match_titles=match_titles)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 195,
 in run
     results = StateMachineWS.run(self, input_lines, input_offset)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/statemachine.py", line 233, in
 run
     context, state, transitions)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/statemachine.py", line 454, in
 check_line
     return method(match, context, next_state)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2283, in explicit_markup
     self.explicit_list(blank_finish)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2314, in explicit_list
     match_titles=self.state_machine.match_titles)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 321,
 in nested_list_parse
     node=node, match_titles=match_titles)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line 195,
 in run
     results = StateMachineWS.run(self, input_lines, input_offset)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/statemachine.py", line 233, in
 run
     context, state, transitions)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/statemachine.py", line 454, in
 check_line
     return method(match, context, next_state)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2587, in explicit_markup
     nodelist, blank_finish = self.explicit_construct(match)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2293, in explicit_construct
     return method(self, expmatch)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2035, in directive
     directive_class, match, type_name, option_presets)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/docutils-0.7-py2.7.egg/docutils/parsers/rst/states.py", line
 2086, in run_directive
     result = directive_instance.run()
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/domains/__init__.py",
 line 190, in run
     return BaseDirective.run(self)
   File "/home/mdroe/usr/lib/python2.7/site-
 packages/Sphinx-1.1pre_69acc55585e9dev_20110328-py2.7.egg/sphinx/domains/std.py",
 line 308, in run
     self.state.nested_parse(definition, definition.items[0][1], defnode)
 IndexError: list index out of range
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1074#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list