Skip to content

Commit 7bd8704

Browse files
authored
Several API doc improvements (#5367)
* work on docs * add examples link * run pre-commit * update release notes * Update RELEASE-NOTES.md
1 parent be3f77e commit 7bd8704

File tree

14 files changed

+103
-42
lines changed

14 files changed

+103
-42
lines changed

RELEASE-NOTES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ This includes API changes we did not warn about since at least `3.11.0` (2021-01
128128
- `softmax` and `log_softmax` functions added to `math` module (see [#5279](https://github.com/pymc-devs/pymc/pull/5279)).
129129
- ...
130130

131+
## Documentation
132+
- Switched to the [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/en/latest/)
133+
- Updated our documentation tooling to use [MyST](https://myst-parser.readthedocs.io/en/latest/), [MyST-NB](https://myst-nb.readthedocs.io/en/latest/), sphinx-design, notfound.extension,
134+
sphinx-copybutton and sphinx-remove-toctrees.
135+
- Separated the builds of the example notebooks and of the versioned docs.
136+
- Restructured the documentation to facilitate learning paths
137+
- Updated API docs to document objects at the path users should use to import them
131138

132139
### Internal changes
133140
- ⚠ PyMC now requires Scipy version `>= 1.4.1` (see [4857](https://github.com/pymc-devs/pymc/pull/4857)).

conda-envs/environment-dev-py37.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ dependencies:
3131
- pip:
3232
- polyagamma
3333
- sphinx-design
34+
- sphinx-remove-toctrees

conda-envs/environment-dev-py38.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ dependencies:
3131
- pip:
3232
- polyagamma
3333
- sphinx-design
34+
- sphinx-remove-toctrees

conda-envs/environment-dev-py39.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ dependencies:
3131
- pip:
3232
- polyagamma
3333
- sphinx-design
34+
- sphinx-remove-toctrees

conda-envs/windows-environment-dev-py38.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ dependencies:
3333
- watermark
3434
- pip:
3535
- sphinx-design
36+
- sphinx-remove-toctrees
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
7+
{% block methods %}
8+
{% if methods %}
9+
10+
.. rubric:: Methods
11+
12+
.. autosummary::
13+
:toctree: classmethods
14+
15+
{% for item in methods %}
16+
{{ objname }}.{{ item }}
17+
{%- endfor %}
18+
{% endif %}
19+
{% endblock %}
20+
21+
{% block attributes %}
22+
{% if attributes %}
23+
.. rubric:: Attributes
24+
25+
.. autosummary::
26+
{% for item in attributes %}
27+
~{{ name }}.{{ item }}
28+
{%- endfor %}
29+
{% endif %}
30+
{% endblock %}

docs/source/api/gp.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Gaussian Processes API
2-
----------------------
1+
Gaussian Processes
2+
------------------
33

4-
.. currentmodule:: pymc.gp.gp
4+
.. automodule:: pymc.gp
55

66
.. toctree::
77

docs/source/api/gp/cov.rst

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22
Covariance Functions
33
********************
44

5-
.. currentmodule:: pymc.gp.cov
5+
.. automodule:: pymc.gp.cov
66
.. autosummary::
7-
Constant
8-
WhiteNoise
9-
ExpQuad
10-
RatQuad
11-
Exponential
12-
Matern52
13-
Matern32
14-
Linear
15-
Polynomial
16-
Cosine
17-
Periodic
18-
WarpedInput
19-
Gibbs
20-
Coregion
21-
ScaledCov
22-
Kron
7+
:toctree: generated
238

24-
.. automodule:: pymc.gp.cov
25-
:members:
9+
Constant
10+
WhiteNoise
11+
ExpQuad
12+
RatQuad
13+
Exponential
14+
Matern52
15+
Matern32
16+
Linear
17+
Polynomial
18+
Cosine
19+
Periodic
20+
WarpedInput
21+
Gibbs
22+
Coregion
23+
ScaledCov
24+
Kron

docs/source/api/gp/implementations.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
Implementations
33
***************
44

5-
.. currentmodule:: pymc.gp.gp
5+
.. currentmodule:: pymc.gp
66
.. autosummary::
7+
:toctree: generated
8+
79
Latent
8-
Marginal
910
LatentKron
11+
Marginal
1012
MarginalKron
11-
MarginalSparse
13+
MarginalApprox
1214
TP
13-
14-
.. automodule:: pymc.gp.gp
15-
:members:

docs/source/api/gp/mean.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
Mean Functions
33
**************
44

5-
.. currentmodule:: pymc.gp.mean
5+
.. automodule:: pymc.gp.mean
66
.. autosummary::
7+
:toctree: generated
78

89
Zero
910
Constant
1011
Linear
11-
12-
.. automodule:: pymc.gp.mean
13-
:members:

0 commit comments

Comments
 (0)