lp://staging/~pierregm/scipy/numpydocs
Tools for building documentation for Numpy/Scipy with reST and sphinx
- Get this branch:
- bzr branch lp://staging/~pierregm/scipy/numpydocs
Branch merges
Recent revisions
- 21. By Pierre GM
-
Docscraper
8 fixed _fix_see_alsoNumpydoc:
* Add the numpydoc_default_ block_type and numpydoc_ default_ list_type options
* Fixed mangle_signature - 17. By Pierre GM
-
* moved `docscraper.py` and `numpydoc.py` to ./ext
* add `generate.py` and `summarize.py` from Pauli's branchdocscraper:
* 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 - 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.
Branch metadata
- Branch format:
- Branch format 6
- Repository format:
- Bazaar pack repository format 1 (needs bzr 0.92)