Skip to content

Enable ReadTheDocs on v3 #4805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 3, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/arviz_compat.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arviz-compatibility

on:
pull_request:
# pull_request:
push:
branches: [v3]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jaxtests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: jax-sampling

on:
pull_request:
# pull_request:
push:
branches: [v3]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: pre-commit

on:
pull_request:
# pull_request:
push:
branches: [v3]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: pytest

on:
pull_request:
# pull_request:
push:
branches: [v3]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: windows

on:
pull_request:
# pull_request:
push:
branches: [v3]

Expand Down
16 changes: 16 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -330,3 +332,6 @@
def setup(app):
app.add_css_file("https://cdn.jsdelivr.net/npm/[email protected]/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)
36 changes: 18 additions & 18 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@

<div class="ui container">

<h2 class="ui dividing header">Installation</h2>

<div class="row">
<div class="ui text container">
<h3 class="ui header">Via conda-forge:</h3>

.. code-block:: bash

conda install -c conda-forge pymc3


.. raw:: html

<h3 class="ui header">Latest (unstable):</h3>
<div class="ui vertical segment">
<h2 class="ui dividing header">Installation</h2>
<div class="ui three stackable cards">

.. code-block:: bash
<a class="ui link card" href="https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(Linux)">
<div class="content">
<div class="header">Instructions for Linux</div>
</div>
</a>

pip install git+https://github.com/pymc-devs/pymc3
<a class="ui link card" href="https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(MacOS)">
<div class="content">
<div class="header">Instructions for MacOS</div>
</div>
</a>

.. raw:: html
<a class="ui link card" href="https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(Windows)">
<div class="content">
<div class="header">Instructions for Windows</div>
</div>
</a>
Comment on lines +47 to +67
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed the installation instructions and here's how they look like - https://pymc3-fork.readthedocs.io/en/v3_rtd_docs/


</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/source/pymc-examples
Submodule pymc-examples updated 92 files
+22 −0 .github/ISSUE_TEMPLATE/bug-report.md
+8 −0 .github/ISSUE_TEMPLATE/config.yml
+20 −0 .github/ISSUE_TEMPLATE/notebook-proposal.md
+39 −0 .github/ISSUE_TEMPLATE/tracker.md
+16 −0 .github/PULL_REQUEST_TEMPLATE.md
+1 −1 .github/workflows/pre-commit.yml
+1 −0 .gitignore
+11 −1 .pre-commit-config.yaml
+78 −0 CODE_OF_CONDUCT.md
+108 −0 CONTRIBUTING.md
+0 −2 README.md
+133 −0 README.rst
+92 −141 examples/case_studies/BEST.ipynb
+139 −96 examples/case_studies/LKJ.ipynb
+1,968 −0 examples/case_studies/bayesian_ab_testing.ipynb
+5 −5 examples/case_studies/blackbox_external_likelihood.ipynb
+5 −5 examples/case_studies/conditional-autoregressive-model.ipynb
+3 −3 examples/case_studies/disaster_model.py
+3 −3 examples/case_studies/disaster_model_theano_op.py
+333 −447 examples/case_studies/factor_analysis.ipynb
+2 −1 examples/case_studies/garch_example.py
+2 −1 examples/case_studies/gelman_schools.py
+25 −18 examples/case_studies/hierarchical_partial_pooling.ipynb
+2 −2 examples/case_studies/lightspeed_example.py
+124 −130 examples/case_studies/log-gaussian-cox-process.ipynb
+ examples/case_studies/mediation.png
+871 −0 examples/case_studies/mediation_analysis.ipynb
+920 −0 examples/case_studies/moderation_analysis.ipynb
+ examples/case_studies/moderation_figure.png
+263 −54 examples/case_studies/probabilistic_matrix_factorization.ipynb
+403 −520 examples/case_studies/putting_workflow.ipynb
+1,449 −524 examples/case_studies/rugby_analytics.ipynb
+65 −57 examples/case_studies/stochastic_volatility.ipynb
+145 −0 examples/data/AirPassengers.csv
+1 −1 examples/data/mastectomy.csv
+244 −0 examples/data/muscle-percent-males-interaction.csv
+41 −34 examples/diagnostics_and_criticism/Bayes_factor.ipynb
+598 −566 examples/diagnostics_and_criticism/Diagnosing_biased_Inference_with_Divergences.ipynb
+132 −171 examples/diagnostics_and_criticism/model_averaging.ipynb
+77 −77 examples/diagnostics_and_criticism/model_comparison.ipynb
+66 −61 examples/diagnostics_and_criticism/posterior_predictive.ipynb
+1,346 −182 examples/diagnostics_and_criticism/sampler-stats.ipynb
+1,775 −0 examples/gaussian_processes/GP-Heteroskedastic.ipynb
+6 −8 examples/gaussian_processes/GP-Kron.ipynb
+5 −5 examples/gaussian_processes/GP-Latent.ipynb
+4 −4 examples/gaussian_processes/GP-Marginal.ipynb
+1,082 −310 examples/gaussian_processes/GP-MeansAndCovs.ipynb
+647 −0 examples/generalized_linear_models/GLM-binomial-regression.ipynb
+448 −59 examples/generalized_linear_models/GLM-hierarchical-binominal-model.ipynb
+3 −3 examples/generalized_linear_models/GLM-hierarchical.ipynb
+59 −56 examples/generalized_linear_models/GLM-linear.ipynb
+81 −64 examples/generalized_linear_models/GLM-logistic.ipynb
+561 −642 examples/generalized_linear_models/GLM-model-selection.ipynb
+655 −0 examples/generalized_linear_models/GLM-out-of-sample-predictions.ipynb
+760 −196 examples/generalized_linear_models/GLM-poisson-regression.ipynb
+258 −196 examples/generalized_linear_models/GLM-robust-with-outlier-detection.ipynb
+912 −0 examples/generalized_linear_models/GLM-truncated-censored-regression.ipynb
+2,686 −395 examples/generalized_linear_models/GLM.ipynb
+426 −384 examples/getting_started.ipynb
+1,930 −0 examples/mixture_models/dirichlet_mixture_of_multinomials.ipynb
+0 −4 examples/mixture_models/dp_mix.ipynb
+5 −5 examples/mixture_models/gaussian_mixture_model.ipynb
+7 −7 examples/ode_models/ODE_API_shapes_and_benchmarking.ipynb
+492 −176 examples/ode_models/ODE_with_manual_gradients.ipynb
+3 −3 examples/pymc3_howto/LKJ_correlation.py
+148 −159 examples/pymc3_howto/data_container.ipynb
+36 −24 examples/pymc3_howto/lasso_block_update.ipynb
+3 −2 examples/pymc3_howto/rankdata_ordered.py
+351 −58 examples/pymc3_howto/sampling_compound_step.ipynb
+27 −22 examples/pymc3_howto/sampling_conjugate_step.ipynb
+91 −83 examples/pymc3_howto/updating_priors.ipynb
+3 −7 examples/samplers/DEMetropolisZ_EfficiencyComparison.ipynb
+2 −11 examples/samplers/DEMetropolisZ_tune_drop_fraction.ipynb
+56 −56 examples/samplers/GLM-hierarchical-jax.ipynb
+711 −540 examples/samplers/MLDA_gravity_surveying.ipynb
+1 −1 examples/samplers/MLDA_introduction.ipynb
+62 −101 examples/samplers/MLDA_simple_linear_regression.ipynb
+212 −164 examples/samplers/MLDA_variance_reduction_linear_regression.ipynb
+5 −5 examples/samplers/SMC-ABC_Lotka-Volterra_example.ipynb
+1 −1 examples/samplers/SMC2_gaussians.ipynb
+6 −5 examples/samplers/samplers_mvnormal.py
+153 −207 examples/survival_analysis/bayes_param_survival_pymc3.ipynb
+290 −157 examples/survival_analysis/censored_data.ipynb
+58 −53 examples/survival_analysis/cox_model.ipynb
+684 −208 examples/survival_analysis/survival_analysis.ipynb
+9 −0 examples/table_of_contents_examples.js
+1,165 −0 examples/time_series/Air_passengers-Prophet_with_Bayesian_workflow.ipynb
+3 −2 examples/time_series/arma_example.py
+3 −2 examples/variational_inference/bayesian_neural_network_advi.ipynb
+84 −79 examples/variational_inference/empirical-approx-overview.ipynb
+1 −1 examples/variational_inference/normalizing_flows_overview.ipynb
+7 −6 examples/variational_inference/variational_api_quickstart.ipynb
11 changes: 9 additions & 2 deletions docs/source/sphinxext/gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down