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
------------
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.
================
.. 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
------------
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.
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.2.zip
(17.4 kB
view details)
File details
Details for the file trait_documenter-1.0.2.zip
.
File metadata
- Download URL: trait_documenter-1.0.2.zip
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3774bc12718753d4e795c83bb217fbf445699aa63cdcfa1f00e6d167995756b |
|
MD5 | 678c4c12ad150f358ad29556c41b6b33 |
|
BLAKE2b-256 | 7dc02e8a245fffa8835ff20cace896ba01f6079c733ee4cccebacff8a38dbf48 |
File details
Details for the file trait_documenter-1.0.2.tar.gz
.
File metadata
- Download URL: trait_documenter-1.0.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 927fe3b690572f71adac612fa55851e8e59893e7374d4d6ae0a8d12f27e38110 |
|
MD5 | b92d94151222fbef6ad7a5609ef02061 |
|
BLAKE2b-256 | d7b7eda5dc061b8cd7c4a24767cd487571e9d654e4f7cdcf9912d71133f2f5d3 |