lp://staging/~pierregm/scipy/numpydocs

Created by Pierre GM and last modified

Tools for building documentation for Numpy/Scipy with reST and sphinx

Get this branch:
bzr branch lp://staging/~pierregm/scipy/numpydocs
Only Pierre GM can upload to this branch. If you are Pierre GM please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Pierre GM
Project:
SciPy
Status:
Experimental

Recent revisions

21. By Pierre GM

Docscraper
8 fixed _fix_see_also

Numpydoc:
* Add the numpydoc_default_block_type and numpydoc_default_list_type options
* Fixed mangle_signature

20. By Pierre GM

* Defined a .format() method for FunctionDoc and modified __str__ accordingly

19. By Pierre GM

moved to ./ext

18. By Pierre GM

docscraper: suppressed the example

17. By Pierre GM

* moved `docscraper.py` and `numpydoc.py` to ./ext
* add `generate.py` and `summarize.py` from Pauli's branch

docscraper:
* add Docstring.get_paragraphs()
* add Docstring.paragraphs_as_list()

16. By Pierre GM

docscraper:
* put .split_sections() in .parse()
* renamed ._parse_xxx() to ._fix_xxx()
* renamed ._str_xxx() to ._format_xxx()
* introduced the .format() method:
  it transforms the parsed docstring to a new list, properly formatted
* .__str__() now just join the list w/ \n as a separator
* fixed the formatting of the signature

15. By Pierre GM

numpydoc : moving around some code to improve readability

14. By Pierre GM

* Update to Pauli's modification (r50)

13. By Pierre GM

Overhaul #2 : The "We're getting there" version
-----------------------------------------------

Following Stefan's and Pauli's examples, the numpydoc file is now split in 2

* `docscraper.py` implements an alternative to the base classes NumpyDocString,
  SphinxDocString, SphinxFunctionDoc,... Details below
* numpydoc is basically Pauli's version, with a few modifications. Note that it
  won't work with Sphinx-0.4.1 but with dev200080721 at least.

Usage should be the same. I tested it with some of the numpy docs and it works
pretty nicely.

The alternative implementations are midway between Stefan's approach of a reader
and David's and my approach of an improved list.
First, the docstring is split in sections.
Some (examples, see also, parameters list) sections are then processed and
modified in place.
Then, the __str__ method deals with the finer details of formatting.

By default, list-like blocks (parameters, returns, ...) are formatted with a
field + list approach, while the others (notes, examples...) are formatted with
a header in bold. However, this behavior can be changed by the user.
At the moment, the default are defined at the module level. Later on, they should
depend on some configuration options.

12. By Pierre GM

* force see_also_parser to indent by 3
* force description_parser to insert a new line before each new description.

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 (needs bzr 0.92)
This branch contains Public information 
Everyone can see this information.

Subscribers