Skip to content

Commit 970bf49

Browse files
committed
Add API reference documentation
1 parent f38a372 commit 970bf49

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ coverage.xml
5252

5353
# Sphinx documentation
5454
docs/_build/
55+
docs/source/_generate/
5556

5657
# PyBuilder
5758
target/

docs/source/api_documentation.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
API Reference Documentation
22
---------------------------
33

4-
.. automodule:: traittypes
4+
The ``SciType`` trait type is the base trait type for all Scipy trait types.
5+
6+
It complements the ``traitlets.TraitType`` with a special API to register custom
7+
validators.
8+
9+
.. autoclass:: traittypes.traittypes.SciType
10+
:members:
11+
12+
The ``Array`` trait type holds a numpy Array.
13+
14+
.. autoclass:: traittypes.traittypes.Array
15+
16+
The ``DataFrame`` trait type holds a pandas DataFrame.
17+
18+
.. autoclass:: traittypes.traittypes.DataFrame
19+
20+
The ``Series`` trait type holds a pandas Series.
21+
22+
.. autoclass:: traittypes.traittypes.Series

docs/source/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ traittypes: Trait Types for Scientific Python
66

77
introduction
88
usage
9-
10-
..
119
api_documentation

traittypes/traittypes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class SciType(TraitType):
77

8-
"""A base traittype for numpy arrays, pandas dataframes and series."""
8+
"""A base trait type for numpy arrays, pandas dataframes and series."""
99

1010
def valid(self, *validators):
1111
"""
@@ -24,7 +24,8 @@ def valid(self, *validators):
2424
Example
2525
-------
2626
27-
.. code-block:: python
27+
.. code:: python
28+
2829
# Test with a shape constraint
2930
def shape(*dimensions):
3031
def validator(trait, value):

0 commit comments

Comments
 (0)