https://github.com/enthought/trait-documenter
A sphinx extention that allows traits attributes to be properly rendered by autodoc
https://github.com/enthought/trait-documenter
Last synced: about 1 year ago
JSON representation
A sphinx extention that allows traits attributes to be properly rendered by autodoc
- Host: GitHub
- URL: https://github.com/enthought/trait-documenter
- Owner: enthought
- License: other
- Created: 2014-11-21T23:59:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-06-15T08:50:38.000Z (about 5 years ago)
- Last Synced: 2024-04-29T10:44:35.589Z (about 2 years ago)
- Language: Python
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 47
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
Trait-Documenter
================
.. image:: https://travis-ci.org/enthought/trait-documenter.svg?branch=master
:target: https://travis-ci.org/enthought/trait-documenter
.. image:: http://codecov.io/github/enthought/trait-documenter/coverage.svg?branch=master
:target: http://codecov.io/github/enthought/trait-documenter?branch=master
.. image:: https://readthedocs.org/projects/trait-documenter/badge/?version=latest
:target: https://readthedocs.org/projects/trait-documenter/?badge=master
Trait-Documenter is an autodoc extension to allow trait definitions to be
properly rendered in sphinx.
Project Status
--------------
This project is a work in progress. For production use, use the existing
``traits.util.trait_documenter`` Sphinx extension (which is distributed
as part of Traits) instead.
Installation
------------
Development versions can be found at https://github.com/enthought/trait-documenter.
The package requires a recent version of *sphinx*, *traits* and *astor* to function properly.
Usage
-----
Add the trait-documenter to the extensions variable in your *conf.py*::
extensions.append('trait_documenter')
.. warning::
Using the TraitDocumenter in conjunction with the TraitsDoc package
is not advised.
Example
-------
A class trait with a docstring::
from traits.api import HasTraits, Float
class MyClass(HasTraits):
#: A float number.
number = Float(2.0)
Will be rendered as::
.. py:attribute:: number
:annotation: = Float(2.0)
A float number.