Autodoc extention for documenting traits
Project description
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.
Installation
------------
Developments versions can be found in `github <https://github.com/enthought/trait-documenter.git>`_.
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.
================
.. 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.
Installation
------------
Developments versions can be found in `github <https://github.com/enthought/trait-documenter.git>`_.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
trait_documenter-1.0.1.zip
(17.4 kB
view details)
File details
Details for the file trait_documenter-1.0.1.zip
.
File metadata
- Download URL: trait_documenter-1.0.1.zip
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83fad28c9b2bf3e0a37fb02853abd53e5afa4b2c2e91269be2b70cc860191f8e |
|
MD5 | c9c028e367f356fb29346435672b3eaa |
|
BLAKE2b-256 | 61f92c16cec78e6aceb091f82a638e3758a12cd2e8ca6e05fcbc23c8d6194d47 |
File details
Details for the file trait_documenter-1.0.1.tar.gz
.
File metadata
- Download URL: trait_documenter-1.0.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75727a739f3c2e5a64aeaac98af5be56e6b17559d99eb9cc4b9b5faa9db17c00 |
|
MD5 | 9434ea3bc0533ef151b18366e3932b18 |
|
BLAKE2b-256 | c2df6c277ba8f4a53061009968169f8ca7ed3b25ee329f464ec6b9ed21f2203e |