diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000000..70d4c5250a --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,16 @@ +version: 2 + +sphinx: + configuration: docs/source/conf.py + +python: + version: 3.7 + install: + - requirements: requirements-dev.txt + - method: pip + path: . + + +submodules: + include: all + recursive: true diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index aab5e1bb1f..6c47a4751f 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -6,6 +6,7 @@ + `theano.printing.pydotprint` is now hotfixed upon import (see [#4594](https://github.com/pymc-devs/pymc3/pull/4594)). + Fix bug in the computation of the log pseudolikelihood values (SMC-ABC). (see [#4672](https://github.com/pymc-devs/pymc3/pull/4672)). + Fix `LKJCorr.random` method to work with `pm.sample_prior_predictive`. (see [#4780](https://github.com/pymc-devs/pymc3/pull/4780)) ++ Enable documentation generation via ReadTheDocs for upcoming v3 releases. (see [#4805](https://github.com/pymc-devs/pymc3/pull/4805)). ### New Features + Generalized BART, bounded distributions like Binomial and Poisson can now be used as likelihoods (see [#4675](https://github.com/pymc-devs/pymc3/pull/4675), [#4709](https://github.com/pymc-devs/pymc3/pull/4709) and diff --git a/docs/source/conf.py b/docs/source/conf.py index 9b23a323af..6fc8780e8b 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,6 +15,8 @@ import os import sys +from pathlib import Path + import pymc3 # If extensions (or modules to document with autodoc) are in another directory, @@ -330,3 +332,6 @@ def setup(app): app.add_css_file("https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css") app.add_css_file("default.css") + dir_root = Path(__file__).parent + for directory in html_static_path: + os.makedirs(str(dir_root / directory), exist_ok=True) diff --git a/docs/source/index.rst b/docs/source/index.rst index 053e1962f1..205f8ee902 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -44,28 +44,28 @@
-

Installation

- -
-
-

Via conda-forge:

- -.. code-block:: bash - - conda install -c conda-forge pymc3 - - -.. raw:: html - -

Latest (unstable):

+
+

Installation

+
-.. code-block:: bash + +
+
Instructions for Linux
+
+
- pip install git+https://github.com/pymc-devs/pymc3 + +
+
Instructions for MacOS
+
+
-.. raw:: html + +
+
Instructions for Windows
+
+
-
@@ -73,7 +73,7 @@

In-Depth Guides

- +
Probability Distributions
PyMC3 includes a comprehensive set of pre-defined statistical distributions that can be used as model building blocks. @@ -81,7 +81,7 @@
- +
Gaussian Processes
Sometimes an unknown parameter or variable in a model is not a scalar value or a fixed-length vector, but a function. A Gaussian process (GP) can be used as a prior probability distribution whose support is over the space of continuous functions. PyMC3 provides rich support for defining and using GPs. @@ -89,7 +89,7 @@
- +
Variational Inference
Variational inference saves computational cost by turning a problem of integration into one of optimization. PyMC3's variational API supports a number of cutting edge algorithms, as well as minibatch for scaling to large datasets. @@ -97,7 +97,7 @@
- +
PyMC3 and Theano
Theano is the deep-learning library PyMC3 uses to construct probability distributions and then access the gradient in order to implement cutting edge inference algorithms. More advanced models may be built by understanding this layer. diff --git a/docs/source/pymc-examples b/docs/source/pymc-examples index a093bcc5aa..0bbf199c46 160000 --- a/docs/source/pymc-examples +++ b/docs/source/pymc-examples @@ -1 +1 @@ -Subproject commit a093bcc5aa828e9317bdf9f936f968f76acdb4f7 +Subproject commit 0bbf199c462a65e3c9a7b5155f7b47c69eae2581 diff --git a/docs/source/sphinxext/gallery_generator.py b/docs/source/sphinxext/gallery_generator.py index caf4beb450..46273e04d6 100644 --- a/docs/source/sphinxext/gallery_generator.py +++ b/docs/source/sphinxext/gallery_generator.py @@ -170,16 +170,23 @@ def build_gallery(srcdir, gallery): if basename.find(".rst") < 1: filename = os.path.join(source_dir, basename + ".ipynb") ex = NotebookGenerator(filename, target_dir) + url = Path(os.path.join(os.sep, gallery, ex.output_html)) + # Need to chop off "/${gallery}/../" so as redirection works in multi versioned docs. + url = str(Path("..", *url.parts[3:])) data[basename] = { "title": ex.pagetitle, - "url": os.path.join(os.sep, gallery, ex.output_html), + "url": url, "thumb": os.path.basename(ex.png_path), } + else: filename = basename.split(".")[0] + url = Path(os.path.join(os.sep, gallery, "../" + filename + ".html")) + # Need to chop off "/${gallery}/../" so as redirection works in multi versioned docs. + url = str(Path("..", *url.parts[3:])) data[basename] = { "title": " ".join(filename.split("_")), - "url": os.path.join(os.sep, gallery, "../" + filename + ".html"), + "url": url, "thumb": os.path.basename(default_png_path), }