Skip to content

Commit 7e37ada

Browse files
committed
Update documentation
1 parent 9123c34 commit 7e37ada

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

docs/conf.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13-
# import os
14-
# import sys
15-
# sys.path.insert(0, os.path.abspath('.'))
13+
import os
14+
import sys
15+
16+
sys.path.insert(0, os.path.abspath("../py_wave_runup/"))
1617

1718

1819
# -- Project information -----------------------------------------------------
@@ -26,11 +27,10 @@
2627

2728

2829
# -- General configuration ---------------------------------------------------
29-
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 = []
33+
extensions = ["sphinx.ext.autodoc"]
3434

3535
# Add any paths that contain templates here, relative to this directory.
3636
templates_path = ["_templates"]
@@ -43,6 +43,10 @@
4343
# The master toctree document.
4444
master_doc = "index"
4545

46+
source_suffix = ".rst"
47+
autoclass_content = "both"
48+
49+
4650
# -- Options for HTML output -------------------------------------------------
4751

4852
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -54,3 +58,15 @@
5458
# relative to this directory. They are copied after the builtin static files,
5559
# so a file named "default.css" will overwrite the builtin "default.css".
5660
html_static_path = ["_static"]
61+
62+
pygments_style = "sphinx"
63+
64+
65+
def autodoc_skip_member(app, what, name, obj, skip, options):
66+
exclusions = ("RunupModel",)
67+
exclude = name in exclusions
68+
return skip or exclude
69+
70+
71+
def setup(app):
72+
app.connect("autodoc-skip-member", autodoc_skip_member)

docs/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Welcome to py-wave-runup's documentation!
1010
:maxdepth: 2
1111
:caption: Contents:
1212

13+
.. automodule:: models
14+
:members:
15+
:undoc-members:
1316

1417

1518
Indices and tables

py_wave_runup/models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ class RunupModel(object):
1313
doi = None
1414

1515
def __init__(self, Hs=None, Tp=None, beta=None, Lp=None):
16+
"""
17+
Test
18+
19+
:param Hs: description
20+
:param Tp: description
21+
:param beta: description
22+
:param Lp: description
23+
"""
24+
1625
self.Hs = Hs
1726
self.Tp = Tp
1827
self.beta = beta

0 commit comments

Comments
 (0)