brian-team/brian2 — pull request #16 by mstimberg (2013-02-26 14:51:48+00:00)
Title: Improvements to the documentation system

This pull request introduces a new Sphinx role `brianobj` that is used by default when enclosing names in backticks. It is a wrapper around Sphinx's `py:obj` role with the following two additions:
- You can use it to link to brian preferences, e.g. writing `` `core.default_scalar_dtype` `` will automatically link to the documentation for the preference.
- Links to classes/functions that are reachable with a `from brian2 import ...` import are automatically linked to the respective class/function name: E.g. `` `Equations` `` is translated into `` `~brian2.equations.equations.Equations` ``, i.e. it is still displayed as `Equations` but links to the correct page. This automatic linking also works for class attributes or methods, e.g. you can write `` `Scheduler.when` `` or `` `Network.run` ``. Note that Sphinx's standard mechanism already takes care of linking to methods of the class you are currently documenting or linking to classes in the current module.

This pull request should fix #7 but before merging it, I still want to fix another bug that appeared (maybe with a newer Sphinx version?): Currently, method/attribute descriptions in the "Details" section of a class documentation are duplicated.