Skip to content

Commit 62eb1d1

Browse files
committed
improve api page+some fixes
1 parent 3dd4206 commit 62eb1d1

File tree

6 files changed

+74
-37
lines changed

6 files changed

+74
-37
lines changed

docs/_templates/autosummary/base.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ objname | escape | underline }}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. auto{{ objtype }}:: {{ objname }}

docs/_templates/autosummary/class.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{{ objname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
7+
{% block methods %}
8+
.. automethod:: __init__
9+
10+
{% if methods %}
11+
.. rubric:: {{ _('Methods') }}
12+
13+
.. autosummary::
14+
{% for item in methods %}
15+
~{{ name }}.{{ item }}
16+
{%- endfor %}
17+
{% endif %}
18+
{% endblock %}
19+
20+
{% block attributes %}
21+
{% if attributes %}
22+
.. rubric:: {{ _('Attributes') }}
23+
24+
.. autosummary::
25+
{% for item in attributes %}
26+
~{{ name }}.{{ item }}
27+
{%- endfor %}
28+
{% endif %}
29+
{% endblock %}

docs/api_reference.rst

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,51 @@ API Reference
44
This reference provides detailed documentation for all modules, classes, and
55
methods in the current release of PyMC experimental.
66

7+
.. currentmodule:: pymc_experimental
8+
.. autosummary::
9+
:toctree: generated/
710

8-
.. toctree::
9-
:maxdepth: 2
11+
marginal_model.MarginalModel
12+
model_builder.ModelBuilder
1013

14+
Inference
15+
=========
1116

12-
:mod:`pymc_experimental`
13-
=============================
17+
.. currentmodule:: pymc_experimental.inference
18+
.. autosummary::
19+
:toctree: generated/
1420

15-
.. automodule:: pymc_experimental.marginal_model
16-
:members: MarginalModel
21+
fit
1722

18-
.. automodule:: pymc_experimental.model_builder
19-
:members: ModelBuilder
2023

24+
Distributions
25+
=============
2126

22-
:mod:`pymc_experimental.inference`
23-
=============================
27+
.. currentmodule:: pymc_experimental.distributions
28+
.. autosummary::
29+
:toctree: generated/
2430

25-
.. automodule:: pymc_experimental.inference.fit
26-
:members: fit
31+
GenExtreme
32+
histogram_utils.histogram_approximation
2733

2834

29-
:mod:`pymc_experimental.distributions`
30-
=============================
35+
Gaussian Processess
36+
===================
3137

32-
.. automodule:: pymc_experimental.distributions.continuous
33-
:members: GenExtreme
38+
.. currentmodule:: pymc_experimental.gp
39+
.. autosummary::
40+
:toctree: generated/
3441

35-
.. automodule:: pymc_experimental.distributions.histogram_utils
36-
:members: histogram_approximation
42+
latent_approx.HSGP
3743

3844

39-
:mod:`pymc_experimental.gp`
40-
=============================
45+
Utils
46+
=====
4147

42-
.. automodule:: pymc_experimental.gp.latent_approx
43-
:members: HSGP
48+
.. currentmodule:: pymc_experimental.utils
49+
.. autosummary::
50+
:toctree: generated/
4451

45-
46-
:mod:`pymc_experimental.utils`
47-
=============================
48-
49-
.. automodule:: pymc_experimental.utils.spline
50-
:members: bspline_interpolation
51-
52-
.. automodule:: pymc_experimental.utils.prior
53-
:members: prior_from_idata
52+
spline.bspline_interpolation
53+
prior.prior_from_idata
5454

docs/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,18 @@
5656
# ones.
5757
extensions = [
5858
"sphinx.ext.autodoc",
59+
"sphinx.ext.autosummary",
5960
"sphinx.ext.viewcode",
6061
"sphinx.ext.napoleon",
6162
"sphinx.ext.mathjax",
6263
"nbsphinx",
64+
"matplotlib.sphinxext.plot_directive",
6365
]
6466

6567
nbsphinx_execute = "never"
6668

6769
# Add any paths that contain templates here, relative to this directory.
68-
# templates_path = ["_templates"]
70+
templates_path = ["_templates"]
6971

7072
# The suffix(es) of source filenames.
7173
# You can specify multiple suffix as a list of string:
@@ -81,7 +83,7 @@
8183
#
8284
# This is also used if you do content translation via gettext catalogs.
8385
# Usually you set "language" from the command line for these cases.
84-
language = None
86+
# language = None
8587

8688
# List of patterns, relative to source directory, that match files and
8789
# directories to ignore when looking for source files.

pymc_experimental/distributions/continuous.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ class GenExtreme(Continuous):
119119
120120
Parameters
121121
----------
122-
mu: float
122+
mu : float
123123
Location parameter.
124-
sigma: float
124+
sigma : float
125125
Scale parameter (sigma > 0).
126-
xi: float
126+
xi : float
127127
Shape parameter
128-
scipy: bool
128+
scipy : bool
129129
Whether or not to use the Scipy interpretation of the shape parameter
130130
(defaults to `False`).
131131

pymc_experimental/marginal_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class MarginalModel(Model):
5454
Marginalize over a single variable
5555
5656
.. code-block:: python
57+
5758
import pymc as pm
5859
from pymc_experimental import MarginalModel
5960

0 commit comments

Comments
 (0)