Skip to content

Commit 47137c1

Browse files
Updating to numpy style docs
1 parent e45eeab commit 47137c1

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

codeflare/pipelines/Datamodel.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ class Xy:
1414
"""
1515
Holder class for Xy, where X is array-like and y is array-like. This is the base
1616
data structure for fully materialized X and y.
17+
18+
Examples
19+
--------
20+
.. code-block:: python
21+
22+
x = np.array([1.0, 2.0, 4.0, 5.0])
23+
y = np.array(['odd', 'even', 'even', 'odd'])
24+
xy = Xy(x, y)
25+
1726
"""
1827

1928
def __init__(self, X, y):

docs/source/conf.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'
33+
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc', 'numpydoc', 'sphinx.ext.autosummary'
3434
]
3535

3636
# Add any paths that contain templates here, relative to this directory.
@@ -39,15 +39,22 @@
3939
# List of patterns, relative to source directory, that match files and
4040
# directories to ignore when looking for source files.
4141
# This pattern also affects html_static_path and html_extra_path.
42-
exclude_patterns = ['*tests*']
42+
exclude_patterns = ['*tests*', '*test*']
4343

44+
numpydoc_show_class_members = True
45+
46+
class_members_toctree = False
47+
48+
pygments_style = 'sphinx'
49+
50+
autodoc_mock_imports = ['codeflare.pipelines.tests']
4451

4552
# -- Options for HTML output -------------------------------------------------
4653

4754
# The theme to use for HTML and HTML Help pages. See the documentation for
4855
# a list of builtin themes.
4956
#
50-
html_theme = 'alabaster'
57+
html_theme = 'sphinx_rtd_theme'
5158

5259
# Add any paths that contain custom static files (such as style sheets) here,
5360
# relative to this directory. They are copied after the builtin static files,

0 commit comments

Comments
 (0)