Sphinx (doc)
Sphinx est le nouvel outil python pour produire de la documentation python (à l’origine) ou autres (musique, commandes GNU/Linux, etc…). Il connait un très grand succès.
Source

http://sphinx.pocoo.org/
(‘Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.It was originally created to translate the new Python documentation, and it has excellent support for the documentation of Python projects, but other documents can be written with it too. Of course, this site is also created from reStructuredText sources using Sphinx!’)
http://matplotlib.sourceforge.net/sampledoc/
(‘This is a tutorial introduction to quickly get you up and running with your own sphinx documentation system. We’ll cover installing sphinx, customizing the look and feel, using custom extensions for embedding plots, inheritance diagrams, syntax highlighted ipython sessions and more. If you follow along the tutorial, you’ll start with nothing and end up with this site – it’s the bootstrapping documentation tutorial that writes itself!‘)
http://matplotlib.sourceforge.net/sampledoc/getting_started.html
(‘Installing your doc directory’)
http://matplotlib.sourceforge.net/sampledoc/cheatsheet.html#this-file
- Very nice sphinx doc:
https://wiki.fysik.dtu.dk/ase/
(‘The Atomic Simulation Environment (ASE) is the common part of the simulation tools developed at CAMd. ASE provides Python modules for manipulating atoms, analyzing simulations, visualization etc.’)
http://matplotlib.sourceforge.net/
http://www.buildout.org/index.html
(‘Buildout is a Python-based build system for creating, assembling and deploying applications from multiple parts, some of which may be non-Python-based. It lets you create a buildout configuration and reproduce the same software later. ‘)
https://wiki.fysik.dtu.dk/gpaw/index.html
(‘GPAW is a density-functional theory (DFT) Python code based on the projector-augmented wave (PAW) method. It uses real-space uniform grids and multigrid methods or atom-centered basis-functions. Read more about its features and the algorithms used.’)
http://sagemath.org/doc/developer/index.html
(‘Sage is a free mathematics software system. It is implemented using Python, Cython, and C++, uses GAP, GSL, Matplotlib, Maxima, MWRANK, NetworkX, NTL, Numpy, PARI, Singular and many specialized systems and libraries. It is free and open source, and is available under the terms of the GNU Public License. Some parts are available under compatible licenses.’)
http://biodb.bioinformatics.ucla.edu/pygr_docs/0.8.0/html/index.html
(‘Pygr is open source software designed to make it easy to do powerful sequence and comparative genomics analyses, even with extremely large multi-genome alignments.’)
http://projects.forked.de/graph-tool/doc/
(‘The graph_tool module provides a Graph class and several algorithms that operate on it. The internals of this class, and of most algorithms, are written in C++ for performance.’)
http://openalea.gforge.inria.fr/doc/openalea/doc/build/html/index.html
(‘OpenAlea is an open source project primarily aimed at the plant research community, with a particular focus on Plant Architecture Modeling at different scales. It is a distributed collaborative effort to develop Python libraries and tools which address the needs of current and future work in Plant Architecture modeling’)
http://openalea.gforge.inria.fr/doc/openalea/misc/doc/html/misc/openalea_misc_sphinx_tools_ref.html#module-sphinx_tools
https://gforge.inria.fr/frs/?group_id=79
-
svn checkout svn://scm.gforge.inria.fr/svn/openalea/trunk openalea
Other documentation links
http://jacobian.org/writing/great-documentation/what-to-write/
(Tech docs can take a bunch of different forms ranging from high-level overviews, to step-by-step walkthroughs, to auto-generated API documentation. Unfortunately, no single format works for all users; there’s huge differences in the way that people learn, so a well-documented project needs to provide many different forms of documentation)
# Add any Sphinx extension module names here, as strings. They can
# be extensions coming with Sphinx (named 'sphinx.ext.*') or your
# custom ones.
extensions = ['matplotlib.sphinxext.mathmpl',
'matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'ipython_console_highlighting',
'inheritance_diagram',
'numpydoc']
def fox_speed(size, weight, age):
""" Return the maximum speed for a fox.
:parameters:
size
The size of the fox (in meters)
weight : float
The weight of the fox (in stones)
age : int
The age of the fox (in years)
"""
pass
# I think this last example is very readable in its ASCII form there, and
# will produce nicely formatted results in Sphinx (or epydoc for that matter).
Projets utilisant sphinx
http://sphinx.pocoo.org/examples.html
- Applied Mathematics at the Stellenbosch University:
http://dip.sun.ac.za/
- APSW:
http://apsw.googlecode.com/svn/publish/index.html
- ASE:
https://wiki.fysik.dtu.dk/ase/
- boostmpi:
http://documen.tician.de/boostmpi/
- Calibre:
http://calibre.kovidgoyal.net/user_manual/
- Chaco:
http://code.enthought.com/projects/chaco/docs/html/
- CodePy:
http://documen.tician.de/codepy/
- Cython:
http://docs.cython.org/
- C\C++ Python language binding project:
http://language-binding.net/index.html
- Director:
http://packages.python.org/director/
- Djagios:
http://djagios.org/
- Django:
http://docs.djangoproject.com/
- F2py:
http://www.f2py.org/html/
- Fityk:
http://www.unipress.waw.pl/fityk/
- GeoDjango:
http://geodjango.org/docs/
- GeoServer:
http://docs.geoserver.org/
- Glashammer:
http://glashammer.org/
- GPAW:
https://wiki.fysik.dtu.dk/gpaw/
- Grok:
http://grok.zope.org/doc/current/
- GSL Shell:
http://www.nongnu.org/gsl-shell/
- Hedge:
http://documen.tician.de/hedge/
- IFM:
http://fluffybunny.memebot.com/ifm-docs/index.html
- Jinja:
http://jinja.pocoo.org/2/documentation/
- Kaa:
http://doc.freevo.org/api/kaa/
- LEPL:
http://www.acooke.org/lepl/
- MapServer:
http://mapserver.org/
- Matplotlib:
http://matplotlib.sourceforge.net/
- Mayavi:
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi
- MeshPy:
http://documen.tician.de/meshpy/
- MirrorBrain:
http://mirrorbrain.org/docs/
- Mixin.com:
http://dev.mixin.com/
- mpmath:
http://mpmath.googlecode.com/svn/trunk/doc/build/index.html
- MyHDL:
http://www.myhdl.org/doc/0.6/
- NetworkX:
http://networkx.lanl.gov/
- nose:
http://somethingaboutorange.com/mrl/projects/nose/
- NumPy:
http://docs.scipy.org/doc/numpy/reference/
- ObjectListView:
http://objectlistview.sourceforge.net/python
- OpenEXR:
http://excamera.com/articles/26/doc/index.html
- OpenLayers:
http://docs.openlayers.org/
- openWNS:
http://docs.openwns.org/
- Paste:
http://pythonpaste.org/script/
- Paver:
http://www.blueskyonmars.com/projects/paver/
- Py on Windows:
http://timgolden.me.uk/python-on-windows/
- PyCuda:
http://documen.tician.de/pycuda/
- PyEphem:
http://rhodesmill.org/pyephem/
- Pyevolve:
http://pyevolve.sourceforge.net/
- PyLit:
http://pylit.berlios.de/
- Pylo:
http://documen.tician.de/pylo/
- Pylons:
http://docs.pylonshq.com/
- PyMOTW:
http://www.doughellmann.com/PyMOTW/
- PyPubSub:
http://pubsub.sourceforge.net/
- pyrticle:
http://documen.tician.de/pyrticle/
- Pysparse:
http://pysparse.sourceforge.net/
- Python:
http://docs.python.org/
- python-apt:
http://people.debian.org/~jak/python-apt-doc/
- PyUblas:
http://documen.tician.de/pyublas/
- Quex:
http://quex.sourceforge.net/
- Reteisi:
http://docs.argolinux.org/reteisi/
- Roundup:
http://www.roundup-tracker.org/
- Sage:
http://sagemath.org/doc/
- Satchmo:
http://www.satchmoproject.com/docs/svn/
- Scapy:
http://www.secdev.org/projects/scapy/doc/
- Selenium:
http://seleniumhq.org/docs/
- Self:
http://selflanguage.org/
- SimPy:
http://simpy.sourceforge.net/
- Sphinx:
http://sphinx.pocoo.org/
- Sprox:
http://sprox.org/
- SQLAlchemy:
http://www.sqlalchemy.org/docs/
- Sqlkit:
http://sqlkit.argolinux.org/
- sqlparse:
http://python-sqlparse.googlecode.com/svn/docs/api/index.html
- SymPy:
http://docs.sympy.org/
- tinyTiM:
http://tinytim.sourceforge.net/docs/2.0/
- The Wine Cellar Book:
http://www.thewinecellarbook.com/doc/en/
- TurboGears:
http://turbogears.org/2.0/docs/
- VOR:
http://www.vor-cycling.be/
- WebFaction:
http://docs.webfaction.com/
- WFront:
http://discorporate.us/projects/WFront/
- WTForms:
http://wtforms.simplecodes.com/docs/
- Zope 3: e.g.
http://docs.carduner.net/z3c-tutorial/
- zc.async:
http://packages.python.org/zc.async/1.5.0/
Builtin sphinx extensions
http://sphinx.pocoo.org/extensions.html#builtin-sphinx-extensions
http://matplotlib.sourceforge.net/sampledoc/extensions.html
These extensions are built in and can be activated by respective entries in the extensions configuration value:
- sphinx.ext.autodoc – Include documentation from docstrings
- sphinx.ext.autosummary – Generate autodoc summaries
- sphinx.ext.doctest – Test snippets in the documentation
- This extension allows you to test snippets in the documentation in a natural way. It works by collecting specially-marked up code blocks and running them as doctest tests.
http://jessenoller.com/2009/02/26/sphinx-and-auto-buildingtests/
(‘…Ok, so I’m think I’m in sphinx-love. I’ve needed to really begin a largish documentation project for a code base I own and drive (omgmanagerspeak) and since I’d rather not completely rely on API docs, and I have exposure to sphinx courtesy of python-core work, I chose you sphinx-a-chu! Sphinx really is awesome. I started just chugging through the docs, and ended up pulling from tip (via mercurial) and using the latest version for the theme support Georg added recently. Rather than rehash the basics, I’ll simple explain my setup, and why I love it – starting with the output from sphinx-quickstart which kicks out a makefile for you, I immediately turned on the ‘sphinx.ext.autodoc‘ and ‘sphinx.ext.doctest‘ extensions – the former allows you to tell sphinx (in your rst file) to delegate the documentation for this class/method/etc to the API docs, and the latter allows you to pass the examples/snippets you will have through doctest. These two things make writing/testing the docs awesome – but it gets more awesome...’)
http://aroberge.blogspot.com/2008/03/inspiration-and-persistence.html
(‘… inspired by an earlier post on Georg Brand’s remarkable Sphinx, Crunchy now includes a prototype for an automated documentation testing framework along the lines of sphinx.ext.doctest which was released yesterday. My intention is to update Crunchy’s implementation so that it can be totally compatible with Sphinx’s. And while I believe that this is a neat (and fun!) thing to include in Crunchy, it only very indirectly contribute to my overall goal and ends up delaying the 1.0 release for Crunchy...’)
http://svn.turbogears.org/docs/2.0/docs/conf.py
- sphinx.ext.intersphinx – Link to other projects’ documentation
- Math support in Sphinx
- sphinx.ext.graphviz – Add Graphviz graphs
- sphinx.ext.inheritance_diagram – Include inheritance diagrams
- sphinx.ext.refcounting – Keep track of reference counting behavior
- sphinx.ext.ifconfig – Include content based on configuration
- sphinx.ext.coverage – Collect doc coverage stats
- sphinx.ext.todo – Support for todo items
Third-party extensions
There are several extensions that are not (yet) maintained in the Sphinx distribution. The Wiki at BitBucket maintains a list of those. If you write an extension that you think others will find useful, please write to the project mailing list (sphinx-dev@googlegroups.com) and we’ll find the proper way of including or hosting it for the public.
- ascii (aafigure for sphinx,
http://packages.python.org/sphinxcontrib-aafig/
).. aafig:: :aspect: 60 :scale: 150 :proportional: :textual: +-------+ +-----------+ | Hello +-------->+ aafigure! | +-------+ +-----------+
http://pypi.python.org/pypi/sphinx_wxoptimize
/ (‘Convert sphinx-generated htmlhelp files into versions optimized for reading using the wxHtmlHelp browser’)
http://packages.python.org/lunar.sphinx.ext/
- lunar.sphinx.ext.programoutput ( Execute programs and include their output into the documentation)
- lunar.sphinx.ext.ansi (Parse and interpret ANSI color codes)
- lunar.sphinx.ext.issuetracker(Reference issues in an issue tracker)
http://jmu.koodiorja.com/static/rusty/doc/index.html
(‘Rusty is a collection of extensions (directives and roles) for Sphinx documentation framework. While the extensions are somewhat compatible with docutils, the usage of Sphinx is currently required‘)
http://projects.scipy.org/numpy/browser/trunk/doc/sphinxext/numpydoc.py
http://nipy.sourceforge.net/nipy/documentation.html
(très belle documentation produite avec l’extension ci-dessus)
http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines
http://svn.scipy.org/svn/numpy/trunk/doc/example.py
http://nipy.sourceforge.net/devel/
http://nipy.sourceforge.net/devel/guidelines/howto_document.html
(‘Nipy uses the Sphinx documentation generating tool. Sphinx translates reST formatted documents into html and pdf documents. All our documents and docstrings are in reST format, this allows us to have both human-readable docstrings when viewed in ipython, and web and print quality documentation.’)
http://nipy.sourceforge.net/devel/guidelines/sphinx_helpers.html
- UML

.. sequence-diagram:: actor:Actor sphinx:Sphinx[a] dot:Graphviz sdedit:Quick Sequence Diagram Editor actor:sphinx.make html sphinx:dot.render_diagram() sphinx:sdedit.render_diagram()
- Musique
- lilypond
http://www.mail-archive.com/sphinx-dev@googlegroups.com/msg01557.html
(..I made a extension for including Lilypond music notes. I made the extensionby modifying mathbase.py and pngmath.py…)
- lilypond
Utiliser sphinx avec:
- doxygen
http://github.com/michaeljones/breathe
(‘Restructured text and Sphinx bridge to Doxygen‘)
http://packages.python.org/sphinxcontrib-doxylink/index.html
Autres projets utilisant sphinx (non listés sur sphinx.pocoo.org)
http://docs.scipy.org/doc/
(‘Welcome! This is the documentation for Numpy and Scipy .’)
http://nipy.sourceforge.net/devel/
(‘The purpose of NIPY is to make it easier to do better brain imaging research.’)
http://ipython.scipy.org/doc/manual/html/index.html
http://11craft.github.com/duruses/
http://www.buildout.org/index.html
http://11craft.github.com/duruses/index.html
http://www.voidspace.org.uk/python/mock/
http://infinitemonkeycorps.net/docs/pph/
(‘You have a pile of Python code. You think, “this could be useful to someone else.” You want to release it as an open-source project. You’ve come to the right place.’)
http://doc.bazaar-vcs.org/en/
(‘Documentation for Bazaar 2.0- The Adaptive Version Control System’)
http://packages.python.org/pypng/
http://www.pyside.org/docs/pyside/index.html
(‘PySide aims to provide Python developers access to the Qt libraries in the most natural way’)
http://doc.scrapy.org/index.html
(‘Scrapy a is an application framework for crawling web sites and extracting structured data which can be used for a wide range of useful applications, like data mining, information processing or historical archival…Manuel is all about making testable documents and well-documented tests. Of course, Python’s doctest module is a long-standing fixture in that space, so it only makes sense for Manuel to support doctest syntax‘)
http://www.ottohttp.org/docs/1.0/index.html
(‘Otto is an HTTP publisher which uses a routes-like syntax to map URLs to code. It supports object traversal. You can use the publisher to write web applications. It was designed with both small and large applications in mind. In particular, it tries to conform to the Zen Of Python. )
http://packages.python.org/manuel/index.html
(Manuel lets you mix and match traditional doctests with custom test syntax…‘)
http://codespeak.net/execnet/trunk/
(‘With execnet you can instantiate "gateways" between Python processes, use "remote_exec" code execution and "channels" to perform structured data communication. See here for more info‘)
http://files.leosoto.com/dojdocs/html/index.html
(‘Welcome to Django-Jython’s documentation!‘)
http://pyxb.sourceforge.net/index.html
(‘PyXB (“pixbee”) is a pure Python package that generates Python source code for classes that correspond to data structures defined by XMLSchema. The generated classes support bi-directional conversion between XML documents and Python objects. In concept it is similar to JAXB for Java and CodeSynthesis XSD for C++. A Thirty Second Example is at the bottom of this page. Step-by-step examples are in User Reference.‘)
http://sweetapp.com/futures/
(‘The futures module provides a high-level interface for asynchronously executing functions and methods.’)
http://packages.python.org/errorhandler/
(This is a handler for the python standard logging framework that can be used to tell whether messages have been logged at or above a certain level.)
http://pybrain.org/docs/index.html
(‘PyBrain’s concept is to encapsulate different data processing algorithms in what we call a Module. A minimal Module contains a forward implementation depending on a collection of free parameters that can be adjusted, usually through some machine learning algorithm.’)
http://pitz.tplus1.com/index.html
(‘I really like Ditz. There’s a few tiny changes I want to make, so I’m making a python project, called pitz…Pitz uses yaml to serialize and unserialize data…Pitz uses IPython for the pitz-shell component and jinja2 to produce some output.’)
http://python-doit.sourceforge.net/index.html
(‘doit comes from the idea of bringing the power of build-tools to execute any kind of task. It will keep track of dependencies between “tasks” and execute them only when necessary. It was designed to be easy to use and “get out of your way”.’)
http://matuson.com/code/schemaobject/
(‘SchemaObject provides a simple, easy to use Python object interface to a MySQL database schema. You can effortlessly write tools to test, validate, sync, migrate, or manage your schema as well as generate the SQL necessary to make changes to it.’)
http://coobs.eu.org/xrecord/api/tutorial.html
(‘XRecord is an Object-Relational Mapper – a library which provides an object interface to databases. Tables are represented as classes, columns are attributes, and rows of data are class instances’)
http://viff.dk/doc/index.html
(‘VIFF allows you to write a program which will interact with other programs in order to execute a joint computation. This is called a multi-party computation, MPC for short. VIFF allows you to do secure multi-party computations, in which a number of parties (three or more at the moment) execute a cryptographic protocol to do some joint computation. The computation could be anything, but elections and auctions are good examples of what you would want to do with secure multi-party computations (SMPC or simply MPC if it is implied that the protocol is secure). VIFF is implemented in Python using Twisted and should run on any platform where Python runs (succesfully tested on Linux, Windows, and Mac OS X). Please see the installation guide for details on the requirements.’)
http://csc.media.mit.edu/docs/index.html
(‘Django is a Python framework for working with databases and web applications. All of ConceptNet is represented as Django models that interact with each other and with a database. We don’t use the web application part – not here, at least – but we provide the appropriate hooks so that ConceptNet can power a Django web application. (Because it does. It’s at
http://openmind.media.mit.edu
.)’)
http://www.briansimulator.org/docs/
(‘Brian is a clock driven simulator for spiking neural networks, written in the Python programming language. The simulator is written almost entirely in Python. The idea is that it can be used at various levels of abstraction without the steep learning curve of software like Neuron, where you have to learn their own programming language to extend their models‘)
http://packages.python.org/gitdb/
("The GitDB project implements interfaces to allow read and write access to git repositories. In its core lies the db package, which contains all database types necessary to read a complete git repository. These are the LooseObjectDB, the PackedDB and the ReferenceDB which are combined into the GitDB to combine every aspect of the git database.For this to work, GitDB implements pack reading, as well as loose object reading and writing. Data is always encapsulated in streams, which allows huge files to be handled as well as small ones, usually only chunks of the stream are kept in memory for processing, never the whole stream at once.’)
http://codespeak.net/tox/
(‘tox aims to automate state-of-the-art packaging, testing and deployment of Python software right from your console or CI server, invoking your tools of choice.’)
http://www.hardcoded.net/docs/hsaudiotag/
(‘hsaudiotag is a pure Python library that lets you read metadata (bitrate, sample rate, duration and tags) from mp3, mp4, wma, ogg, flac and aiff files. It can only read tags, not write to them, but unlike more complete libraries (like Mutagen), it is BSD licensed, making it suitable for most projects. It is also backed by a nifty test suite.’)
https://wiki.fysik.dtu.dk/ase/
(‘The Atomic Simulation Environment (ASE) is the common part of the simulation tools developed at CAMd. ASE provides Python modules for manipulating atoms, analyzing simulations, visualization etc.’)
- Projets sphinx concernant des projets non "python"
-
-
http://www.nongnu.org/gsl-shell/index.html
http://nicolas.steinmetz.fr/tutoriels/index.html
http://eclim.org/index.html
(‘The primary goal of eclim is to bring Eclipse functionality to the Vim editor. The initial goal was to provide Eclipse’s java functionality in vim, but support for various other languages (c/c++, php, python, ruby, css, html, xml, etc.) have been added and several more are planned…Sphinx is used to build the eclim documentation which is included in the installer.’)
http://catherinedevlin.pythoneers.com/
- C project
-
A lire
http://pythonic.pocoo.org/
(‘Le blog de Georg Brandl’)
http://www.pythonprogramminglanguage.info/2009/10/02/bookrest-the-stylesheet-editor-in-action/
http://pylonsbook.com/en/1.0/documentation.html#introducing-sphinx
http://pyfound.blogspot.com/2008/08/georg-brandl-and-brett-cannon-to.html
("At the July Board meeting of the PSF Board of Directors, PSF Community Awards were awarded to Georg Brandl and Brett Cannon.Georg has been an enthusiastic contributor to the core for several years, and a while ago stunned the Python development world by building the Sphinx documentation system as an alternative to the LaTeX-based system we had been using previously, and converting the Python documentation to use it.’)
http://pythonic.pocoo.org/2009/9/12/new-in-sphinx-1-0-domains
(‘)
http://bitbucket.org/birkenfeld/sphinx-domains
(‘…Anyway, when domain support is fully implemented, and assuming someone writes a JavaScript domain extension, you will be able to document a JavaScript project (or a mixed project) with Sphinx just as comfortably as you document a Python project right now…’)
http://www.voidspace.org.uk/python/weblog/arch_d7_2008_11_22.shtml
(‘…This is timely as one of the most valuable things that I learned at PyWorks (in the hallway track) was how to use Sphinx. Chris Perkins (who has some patches that will be integrated into the next release) showed me how to get started. My conclusion – Sphinx is frickin awesome!..’)
http://tarekziade.wordpress.com/2008/03/23/sphinx-as-a-doc-builder-for-python-projects/
(‘…Sphinx annoucement is really exciting, and it shouldn’t be too much pain to bundle it in a buildout recipe to manage a project documentation. Since it is based on templates and configuration files, a default structure can be generated to startup a project documentation together with a code base...’)
Autres liens
http://code.google.com/p/docpicture/
(‘Alternative to Python help() enabling viewing of embedded pictures‘)
http://www.packtpub.com/article/documenting-your-python-project-1
(‘…Documentation is work that is often neglected by developers and sometimes by managers. This is often due to a lack of time towards the end of development cycles, and the fact that people think they are bad at writing. Some of them are bad, but the majority of them are able to produce fine documentation...’)
http://www.mercurial.ch/
Source:
http://groups.google.com/group/sphinx-dev/browse_thread/thread/db7eafa20c1465d1
def fox_speed(size, weight, age):
""" Return the maximum speed for a fox.
:parameters:
size
The size of the fox (in meters)
weight : float
The weight of the fox (in stones)
age : int
The age of the fox (in years)
"""
pass
# I think this last example is very readable in its ASCII form there, and
# will produce nicely formatted results in Sphinx (or epydoc for that matter).

Comment débuter pour documenter un projet python, C, admin, etc… avec le logiciel python sphinx de Georg Brandl « Le blog de Patrick Vergain a dit
[...] Sphinx (doc) [...]