Skip to content

Commit 00d4580

Browse files
committed
some more updates to api section
1 parent 702255f commit 00d4580

File tree

11 files changed

+56
-59
lines changed

11 files changed

+56
-59
lines changed

docs/source/Makefile renamed to Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
77
PAPER =
8-
BUILDDIR = _build
8+
SOURCEDIR = docs/source
9+
BUILDDIR = docs/_build
910

1011
# User-friendly check for sphinx-build
1112
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
@@ -51,9 +52,11 @@ help:
5152

5253
clean:
5354
rm -rf $(BUILDDIR)/*
55+
rm -rf $(SOURCEDIR)/api/**/generated
56+
rm -rf docs/jupyter_execute
5457

5558
html:
56-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
59+
$(SPHINXBUILD) $(SOURCEDIR) $(BUILDDIR) -b html
5760
@echo
5861
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
5962

docs/source/api.rst

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,34 @@ API Reference
1515
api/smc
1616
api/step_methods
1717
api/inference
18-
api/plots
1918

20-
Indices and tables
21-
===================
19+
--------------
20+
API extensions
21+
--------------
2222

23-
* :ref:`genindex`
24-
* :ref:`modindex`
25-
* :ref:`search`
23+
Plots, stats and diagnostics
24+
----------------------------
25+
Plots, stats and diagnostics are delegated to the
26+
:doc:`ArviZ <arviz:index>`.
27+
library, a general purpose library for
28+
"exploratory analysis of Bayesian models".
29+
30+
* Functions from the `arviz.plots` module are available through ``pymc.<function>`` or ``pymc.plots.<function>``,
31+
but for their API documentation please refer to the :ref:`ArviZ documentation <arviz:plot_api>`.
32+
33+
* Functions from the `arviz.stats` module are available through ``pymc.<function>`` or ``pymc.stats.<function>``,
34+
but for their API documentation please refer to the :ref:`ArviZ documentation <arviz:stats_api>`.
35+
36+
ArviZ is a dependency of PyMC and so, in addition to the locations described above,
37+
importing arviz and using ``arviz.<function>`` will also work without any extra installation.
38+
39+
Generalized Linear Models (GLMs)
40+
--------------------------------
41+
42+
Generalized Linear Models are delegated to the
43+
`Bambi <https://bambinos.github.io/bambi>`_.
44+
library, a high-level Bayesian model-building
45+
interface built on top of the PyMC.
46+
47+
Bambi is not a dependency of PyMC and should be installed in addition to PyMC
48+
to use it to generate PyMC models via formula syntax.

docs/source/api/distributions/simulator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Simulator
33
**********
44

5-
.. currentmodule:: pymc.distributions.simulator
5+
.. currentmodule:: pymc
66
.. autosummary::
77
:toctree: generated
88

docs/source/api/distributions/timeseries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Timeseries
33
**********
44

5-
.. currentmodule:: pymc.distributions.timeseries
5+
.. currentmodule:: pymc
66
.. autosummary::
77
:toctree: generated
88

docs/source/api/distributions/utilities.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Distribution utilities
44

55
.. currentmodule:: pymc
66
.. autosummary::
7-
:toctree: generated
7+
:toctree: generated/
88

9-
Distribution
10-
Discrete
11-
Continuous
12-
NoDistribution
13-
DensityDist
9+
Distribution
10+
Discrete
11+
Continuous
12+
NoDistribution
13+
DensityDist

docs/source/api/glm.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/source/api/plots.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/source/api/stats.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
# myst and panels config
119119
jupyter_execute_notebooks = "off"
120120
myst_enable_extensions = ["colon_fence", "deflist", "dollarmath", "amsmath", "substitution"]
121-
myst_heading_anchors = 0
121+
myst_heading_anchors = None
122122

123123
# The reST default role (used for this markup: `text`) to use for all
124124
# documents.
@@ -191,7 +191,6 @@
191191
"navbar_end": ["search-field.html", "navbar-icon-links.html"],
192192
"search_bar_text": "Search...",
193193
"use_edit_page_button": False, # TODO: see how to skip of fix for generated pages
194-
"externalrefs": True,
195194
"google_analytics_id": "UA-176578023-1",
196195
}
197196
html_context = {

docs/source/contributing/build_docs.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
To build the docs, run these commands at pymc repository root:
44

5-
TODO: fix makefile
6-
75
```bash
86
$ pip install -r requirements-dev.txt # Make sure the dev requirements are installed
9-
$ cd docs/source
10-
$ make html # Build docs
11-
$ python -m http.server --directory ../_build/html # Render docs
7+
$ make clean # clean built docs from previous runs and intermediate outputs
8+
$ make html # Build docs
9+
$ python -m http.server --directory ../_build/ # Render docs
1210
```
1311

1412
Check the printed url where docs are being served and open it.
13+
14+
The `make clean` step is not always necessary, if you are working on a specific page
15+
for example, you can rebuild the docs without the clean step and everything should
16+
work fine. If you are restructuring the content or editing toctrees, then you'll need
17+
to execute `make clean`.
18+
19+
A good approach is to skip the `make clean`, which makes
20+
the `make html` blazing fast and see how everything looks.
21+
If something looks strange, run `make clean` and `make html` one after the other
22+
to see if it fixes the issue before checking anything else.
File renamed without changes.

0 commit comments

Comments
 (0)