From d473e8c56eff3df1feecc17500dde3ba92be175f Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 20 Feb 2023 12:27:52 +0100 Subject: [PATCH 1/3] Build docs in simplified environment --- .readthedocs.yml | 2 +- conda-envs/environment-docs.yml | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 conda-envs/environment-docs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml index e4348676e6..67dd44b022 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,7 +9,7 @@ python: path: . conda: - environment: "conda-envs/environment-dev.yml" + environment: "conda-envs/environment-docs.yml" build: os: "ubuntu-20.04" diff --git a/conda-envs/environment-docs.yml b/conda-envs/environment-docs.yml new file mode 100644 index 0000000000..b92f8e791a --- /dev/null +++ b/conda-envs/environment-docs.yml @@ -0,0 +1,34 @@ +# "dev" conda envs are to be used by devs in setting their local environments +name: pymc-docs +channels: +- conda-forge +- defaults +dependencies: +# Base dependencies +- arviz>=0.13.0 +- cachetools>=4.2.1 +- cloudpickle +- fastprogress>=0.2.0 +- numpy>=1.15.0 +- pandas>=0.24.0 +- pip +- pytensor=2.9.1 +- python-graphviz +- scipy>=1.4.1 +- typing-extensions>=3.7.4 +# Extra dependencies for dev, testing and docs build +- ipython>=7.16 +- jupyter-sphinx +- myst-nb +- numpydoc +- pre-commit>=2.8.0 +- sphinx-copybutton +- sphinx-design +- sphinx-notfound-page +- sphinx>=1.5 +- sphinxext-rediraffe +- watermark +- sphinx-remove-toctrees +- pip: + - git+https://github.com/pymc-devs/pymc-sphinx-theme + - numdifftools>=0.9.40 From 0eaf74821feaedb7bf0c5ca519a788938a2c79d4 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 20 Feb 2023 14:27:11 +0100 Subject: [PATCH 2/3] Fix docs build --- conda-envs/environment-docs.yml | 3 ++- docs/source/api/backends.rst | 1 - docs/source/api/data.rst | 1 - docs/source/api/distributions/simulator.rst | 2 -- docs/source/api/distributions/timeseries.rst | 1 - docs/source/api/distributions/transforms.rst | 2 -- docs/source/api/math.rst | 2 +- docs/source/api/pytensorf.rst | 4 +--- docs/source/api/samplers.rst | 1 - docs/source/api/vi.rst | 2 -- docs/source/conf.py | 2 +- 11 files changed, 5 insertions(+), 16 deletions(-) diff --git a/conda-envs/environment-docs.yml b/conda-envs/environment-docs.yml index b92f8e791a..e00978a0fe 100644 --- a/conda-envs/environment-docs.yml +++ b/conda-envs/environment-docs.yml @@ -16,8 +16,9 @@ dependencies: - python-graphviz - scipy>=1.4.1 - typing-extensions>=3.7.4 -# Extra dependencies for dev, testing and docs build +# Extra dependencies for docs build - ipython>=7.16 +- jax - jupyter-sphinx - myst-nb - numpydoc diff --git a/docs/source/api/backends.rst b/docs/source/api/backends.rst index c5c48d8523..ca00a56d81 100644 --- a/docs/source/api/backends.rst +++ b/docs/source/api/backends.rst @@ -18,6 +18,5 @@ Internal structures :toctree: generated/ NDArray - point_list_to_multitrace base.BaseTrace base.MultiTrace diff --git a/docs/source/api/data.rst b/docs/source/api/data.rst index 004d7ff75e..09d3f42fdb 100644 --- a/docs/source/api/data.rst +++ b/docs/source/api/data.rst @@ -12,4 +12,3 @@ Data Data GeneratorAdapter Minibatch - align_minibatches diff --git a/docs/source/api/distributions/simulator.rst b/docs/source/api/distributions/simulator.rst index 831aaa5990..509916a875 100644 --- a/docs/source/api/distributions/simulator.rst +++ b/docs/source/api/distributions/simulator.rst @@ -6,6 +6,4 @@ Simulator .. autosummary:: :toctree: generated - SimulatorRV Simulator - KullbackLiebler diff --git a/docs/source/api/distributions/timeseries.rst b/docs/source/api/distributions/timeseries.rst index fa79d5566d..8016b170f0 100644 --- a/docs/source/api/distributions/timeseries.rst +++ b/docs/source/api/distributions/timeseries.rst @@ -6,7 +6,6 @@ Timeseries .. autosummary:: :toctree: generated - AR1 AR GaussianRandomWalk GARCH11 diff --git a/docs/source/api/distributions/transforms.rst b/docs/source/api/distributions/transforms.rst index 494e447453..141e8c9dd7 100644 --- a/docs/source/api/distributions/transforms.rst +++ b/docs/source/api/distributions/transforms.rst @@ -16,8 +16,6 @@ Transform instances are the entities that should be used in the simplex logodds log_exp_m1 - ordered_univariate - ordered_multivariate log sum_to_1 circular diff --git a/docs/source/api/math.rst b/docs/source/api/math.rst index 5d1194cbb7..26c2f66370 100644 --- a/docs/source/api/math.rst +++ b/docs/source/api/math.rst @@ -48,7 +48,7 @@ Functions exposed in pymc.math where and_ or_ - abs_ + abs exp log cos diff --git a/docs/source/api/pytensorf.rst b/docs/source/api/pytensorf.rst index 4dd1dc6772..ac7760af48 100644 --- a/docs/source/api/pytensorf.rst +++ b/docs/source/api/pytensorf.rst @@ -21,6 +21,4 @@ PyTensor utils join_nonshared_inputs make_shared_replacements generator - set_at_rng - at_rng - pandas_to_array + convert_observed_data diff --git a/docs/source/api/samplers.rst b/docs/source/api/samplers.rst index 265462e10f..5e53a6518a 100644 --- a/docs/source/api/samplers.rst +++ b/docs/source/api/samplers.rst @@ -15,7 +15,6 @@ This submodule contains functions for MCMC and forward sampling. sample_posterior_predictive_w sampling.jax.sample_blackjax_nuts sampling.jax.sample_numpyro_nuts - iter_sample init_nuts draw diff --git a/docs/source/api/vi.rst b/docs/source/api/vi.rst index af3b6ccdd5..181e942500 100644 --- a/docs/source/api/vi.rst +++ b/docs/source/api/vi.rst @@ -9,7 +9,6 @@ Variational Inference ADVI ASVGD - NFVI SVGD FullRankADVI ImplicitGradient @@ -26,7 +25,6 @@ Approximations Empirical FullRank MeanField - NormalizingFlow sample_approx OPVI diff --git a/docs/source/conf.py b/docs/source/conf.py index bab7d9fbfd..71091a8d24 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -125,7 +125,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # configure notfound extension to not add any prefix to the urls notfound_urls_prefix = "/projects/docs/en/latest/" From 6b4d6491cb160e793a3d8905ee3f159ff90de8e1 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 20 Feb 2023 16:10:42 +0100 Subject: [PATCH 3/3] Remove private API section from docs --- Makefile | 3 --- docs/source/contributing/index.md | 1 - docs/source/contributing/private_api/index.md | 17 ----------------- docs/source/contributing/private_api/tests.rst | 17 ----------------- 4 files changed, 38 deletions(-) delete mode 100644 docs/source/contributing/private_api/index.md delete mode 100644 docs/source/contributing/private_api/tests.rst diff --git a/Makefile b/Makefile index 6ec20852c3..7385ec7957 100644 --- a/Makefile +++ b/Makefile @@ -55,9 +55,6 @@ clean: rm -rf $(SOURCEDIR)/api/generated rm -rf $(SOURCEDIR)/api/**/generated rm -rf $(SOURCEDIR)/api/**/classmethods - rm -rf $(SOURCEDIR)/contributing/private_api/generated - rm -rf $(SOURCEDIR)/contributing/private_api/**/generated - rm -rf $(SOURCEDIR)/contributing/private_api/**/classmethods rm -rf docs/jupyter_execute html: diff --git a/docs/source/contributing/index.md b/docs/source/contributing/index.md index d258cafb38..975135a517 100644 --- a/docs/source/contributing/index.md +++ b/docs/source/contributing/index.md @@ -101,7 +101,6 @@ review_pr_pymc_examples :maxdepth: 1 :caption: Reference content -private_api/index python_style jupyter_style pr_checklist diff --git a/docs/source/contributing/private_api/index.md b/docs/source/contributing/private_api/index.md deleted file mode 100644 index 6cffd5d186..0000000000 --- a/docs/source/contributing/private_api/index.md +++ /dev/null @@ -1,17 +0,0 @@ -# Private API - -:::{warning} -The private API pages reference parts of the PyMC API that are developer -facing only but still benefit from having their docstrings rendered here -to help both contributors and members of the PyMC team. - -If you are a PyMC user you should try to avoid using these objects. -As part of the private API, their changes may not appear in the release -notes and they can be modified or removed without warning at any time. -::: - -:::{toctree} -:maxdepth: 2 - -tests -::: diff --git a/docs/source/contributing/private_api/tests.rst b/docs/source/contributing/private_api/tests.rst deleted file mode 100644 index e34891cdc8..0000000000 --- a/docs/source/contributing/private_api/tests.rst +++ /dev/null @@ -1,17 +0,0 @@ -*************** -Testing helpers -*************** - -Fixtures --------- -These fixtures are used to configure test functions. - -.. currentmodule:: pymc.tests.conftest - -.. autosummary:: - :toctree: generated/ - - pytensor_config - exception_verbosity - strict_float32 - seeded_test