Skip to content

Commit d4df94f

Browse files
authored
Merge branch 'pymc-devs:main' into debug_docs_and_function_helpers
2 parents eebac25 + 89f6fcf commit d4df94f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1655
-1762
lines changed

.github/workflows/devcontainer-docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
steps:
2525
- name: Checkout source
26-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
26+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
2727

2828
- name: Setup Docker buildx
29-
uses: docker/setup-buildx-action@v3.0.0
29+
uses: docker/setup-buildx-action@v3.2.0
3030

3131
- name: Prepare metadata
3232
id: meta
@@ -38,15 +38,15 @@ jobs:
3838
type=raw,value=latest
3939
4040
- name: Log into registry ${{ env.REGISTRY }}
41-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
41+
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
4242
with:
4343
registry: ${{ env.REGISTRY }}
4444
username: ${{ github.actor }}
4545
password: ${{ secrets.GITHUB_TOKEN }}
4646

4747
- name: Build and push Docker image
4848
id: docker_build
49-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
49+
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
5050
with:
5151
context: .
5252
file: scripts/dev.Dockerfile

.github/workflows/dispatched_pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runPreCommit:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
10+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
1111
with:
1212
repository: ${{github.event.client_payload.pull_request.head.repo.full_name}}
1313
ref: ${{github.event.client_payload.pull_request.head.ref}}

.github/workflows/docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
16+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
1717

1818
- name: Login to Docker Hub
19-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
19+
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
2020
with:
2121
username: ${{ secrets.DOCKERHUB_USERNAME }}
2222
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -34,7 +34,7 @@ jobs:
3434
type=semver,pattern={{major}}.{{minor}}
3535
3636
- name: Build and load image
37-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
37+
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
3838
with:
3939
context: .
4040
file: scripts/Dockerfile
@@ -46,7 +46,7 @@ jobs:
4646
docker run --rm ${{ env.CONTAINER_NAME }} conda run -n pymc-dev python -c 'import pymc;print(pymc.__version__)'
4747
4848
- name: Build and push
49-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
49+
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
5050
with:
5151
context: .
5252
push: true

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
env:
1212
SKIP: no-commit-to-branch
1313
steps:
14-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
14+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
1515
- uses: actions/setup-python@v5
1616
with:
1717
python-version: "3.9" # Run pre-commit on oldest supported Python version
@@ -22,7 +22,7 @@ jobs:
2222
run:
2323
shell: bash -l {0}
2424
steps:
25-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
25+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
2626
- name: Cache conda
2727
uses: actions/cache@v4
2828
env:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
env:
1212
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_PYMC }}
1313
steps:
14-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
14+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
1515
- name: Set up Python
1616
uses: actions/setup-python@v5
1717
with:

.github/workflows/tests.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
changes: ${{ steps.changes.outputs.src }}
2626
steps:
27-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
27+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
2828
with:
2929
fetch-depth: 0
3030
- uses: dorny/paths-filter@v3
@@ -48,7 +48,7 @@ jobs:
4848
matrix:
4949
os: [ubuntu-20.04]
5050
floatx: [float64]
51-
python-version: ["3.11"]
51+
python-version: ["3.12"]
5252
test-subset:
5353
- |
5454
tests/test_util.py
@@ -67,7 +67,6 @@ jobs:
6767
tests/distributions/test_multivariate.py
6868
6969
- |
70-
tests/distributions/test_bound.py
7170
tests/distributions/test_censored.py
7271
tests/distributions/test_simulator.py
7372
tests/sampling/test_forward.py
@@ -130,7 +129,7 @@ jobs:
130129
run:
131130
shell: bash -l {0}
132131
steps:
133-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
132+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
134133
- name: Cache conda
135134
uses: actions/cache@v4
136135
env:
@@ -174,7 +173,7 @@ jobs:
174173
conda activate pymc-test
175174
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
176175
- name: Upload coverage to Codecov
177-
uses: codecov/codecov-action@v3
176+
uses: codecov/codecov-action@v4
178177
with:
179178
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
180179
env_vars: TEST_SUBSET
@@ -204,7 +203,7 @@ jobs:
204203
run:
205204
shell: cmd
206205
steps:
207-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
206+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
208207
- name: Cache conda
209208
uses: actions/cache@v4
210209
env:
@@ -250,7 +249,7 @@ jobs:
250249
conda activate pymc-test &&
251250
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 %TEST_SUBSET%
252251
- name: Upload coverage to Codecov
253-
uses: codecov/codecov-action@v3
252+
uses: codecov/codecov-action@v4
254253
with:
255254
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
256255
env_vars: TEST_SUBSET
@@ -264,7 +263,7 @@ jobs:
264263
matrix:
265264
os: [macos-latest]
266265
floatx: [float64]
267-
python-version: ["3.10"]
266+
python-version: ["3.12"]
268267
test-subset:
269268
- |
270269
tests/sampling/test_parallel.py
@@ -287,7 +286,7 @@ jobs:
287286
run:
288287
shell: bash -l {0}
289288
steps:
290-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
289+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
291290
- name: Cache conda
292291
uses: actions/cache@v4
293292
env:
@@ -329,7 +328,7 @@ jobs:
329328
run: |
330329
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
331330
- name: Upload coverage to Codecov
332-
uses: codecov/codecov-action@v3
331+
uses: codecov/codecov-action@v4
333332
with:
334333
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
335334
env_vars: TEST_SUBSET
@@ -343,7 +342,7 @@ jobs:
343342
matrix:
344343
os: [ubuntu-20.04]
345344
floatx: [float64]
346-
python-version: ["3.11"]
345+
python-version: ["3.12"]
347346
test-subset:
348347
- tests/sampling/test_jax.py tests/sampling/test_mcmc_external.py
349348
fail-fast: false
@@ -355,7 +354,7 @@ jobs:
355354
run:
356355
shell: bash -l {0}
357356
steps:
358-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
357+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
359358
- name: Cache conda
360359
uses: actions/cache@v4
361360
env:
@@ -397,7 +396,7 @@ jobs:
397396
run: |
398397
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
399398
- name: Upload coverage to Codecov
400-
uses: codecov/codecov-action@v3
399+
uses: codecov/codecov-action@v4
401400
with:
402401
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
403402
env_vars: TEST_SUBSET
@@ -411,7 +410,7 @@ jobs:
411410
matrix:
412411
os: [windows-latest]
413412
floatx: [float32]
414-
python-version: ["3.11"]
413+
python-version: ["3.12"]
415414
test-subset:
416415
- tests/sampling/test_mcmc.py tests/ode/test_ode.py tests/ode/test_utils.py tests/distributions/test_transform.py
417416
fail-fast: false
@@ -423,7 +422,7 @@ jobs:
423422
run:
424423
shell: cmd
425424
steps:
426-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
425+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
427426
- name: Cache conda
428427
uses: actions/cache@v4
429428
env:
@@ -469,7 +468,7 @@ jobs:
469468
conda activate pymc-test &&
470469
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 %TEST_SUBSET%
471470
- name: Upload coverage to Codecov
472-
uses: codecov/codecov-action@v3
471+
uses: codecov/codecov-action@v4
473472
with:
474473
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
475474
env_vars: TEST_SUBSET

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
- --exclude=binder/
2828
- --exclude=versioneer.py
2929
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: v0.2.1
30+
rev: v0.3.4
3131
hooks:
3232
- id: ruff
3333
args: ["--fix", "--output-format=full"]

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
codecov:
22
require_ci_to_pass: yes
3+
notify:
4+
after_n_builds: 15 # This should be updated if number of test jobs changes
35

46
coverage:
57
precision: 2

conda-envs/environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- numpy>=1.15.0
1515
- pandas>=0.24.0
1616
- pip
17-
- pytensor>=2.18.1,<2.19
17+
- pytensor>=2.19,<2.20
1818
- python-graphviz
1919
- networkx
2020
- scipy>=1.4.1

conda-envs/environment-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- numpy>=1.15.0
1313
- pandas>=0.24.0
1414
- pip
15-
- pytensor>=2.18.1,<2.19
15+
- pytensor>=2.19,<2.20
1616
- python-graphviz
1717
- scipy>=1.4.1
1818
- typing-extensions>=3.7.4
@@ -28,6 +28,7 @@ dependencies:
2828
- sphinx-copybutton
2929
- sphinx-design
3030
- sphinx-notfound-page
31+
- sphinx-sitemap
3132
- sphinx>=5
3233
- sphinxext-rediraffe
3334
- watermark

conda-envs/environment-jax.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ dependencies:
1313
- h5py>=2.7
1414
# Jaxlib version must not be greater than jax version!
1515
- blackjax>=1.0.0
16-
- jaxlib==0.4.14
17-
- jax==0.4.16
16+
- jaxlib==0.4.23
17+
- jax==0.4.23
1818
- libblas=*=*mkl
1919
- mkl-service
2020
- numpy>=1.15.0
2121
- numpyro>=0.8.0
2222
- pandas>=0.24.0
2323
- pip
24-
- pytensor>=2.18.1,<2.19
24+
- pytensor>=2.19,<2.20
2525
- python-graphviz
2626
- networkx
2727
- scipy>=1.4.1

conda-envs/environment-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies:
1717
- numpy>=1.15.0
1818
- pandas>=0.24.0
1919
- pip
20-
- pytensor>=2.18.1,<2.19
20+
- pytensor>=2.19,<2.20
2121
- python-graphviz
2222
- networkx
2323
- scipy>=1.4.1

conda-envs/windows-environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- numpy>=1.15.0
1515
- pandas>=0.24.0
1616
- pip
17-
- pytensor>=2.18.1,<2.19
17+
- pytensor>=2.19,<2.20
1818
- python-graphviz
1919
- networkx
2020
- scipy>=1.4.1

conda-envs/windows-environment-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies:
1717
- numpy>=1.15.0
1818
- pandas>=0.24.0
1919
- pip
20-
- pytensor>=2.18.1,<2.19
20+
- pytensor>=2.19,<2.20
2121
- python-graphviz
2222
- networkx
2323
- scipy>=1.4.1

docs/source/conf.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" Sphinx configuration file.
2-
3-
"""
1+
"""Sphinx configuration file."""
42
#!/usr/bin/env python3
53
#
64
# pymc documentation build configuration file, created by
@@ -46,6 +44,7 @@
4644
"sphinx_remove_toctrees",
4745
"jupyter_sphinx",
4846
"sphinxext.rediraffe",
47+
"sphinx_sitemap",
4948
]
5049

5150
# Don't auto-generate summary for class members.
@@ -108,8 +107,8 @@
108107

109108
version = pymc.__version__
110109
on_readthedocs = os.environ.get("READTHEDOCS", False)
110+
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
111111
if on_readthedocs:
112-
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
113112
if rtd_version.lower() == "stable":
114113
version = pymc.__version__.split("+")[0]
115114
elif rtd_version.lower() == "latest":
@@ -337,6 +336,8 @@ def setup(app):
337336
# The theme to use for HTML and HTML Help pages. See the documentation for
338337
# a list of builtin themes.
339338
html_theme = "pymc_sphinx_theme"
339+
html_baseurl = "https://www.pymc.io/projects/docs/"
340+
sitemap_url_scheme = f"{{lang}}{rtd_version}/{{link}}"
340341

341342

342343
# Theme options are theme-specific and customize the look and feel of a theme

docs/source/contributing/developer_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ We can, of course, also work out the math by hand:
6666
$$
6767
\begin{aligned}
6868
pdf_{\mathcal{N}}(\mu, \sigma, x) &= \frac{1}{\sigma \sqrt{2 \pi}} \exp^{- 0.5 (\frac{x - \mu}{\sigma})^2} \\
69-
pdf_{\mathcal{N}}(0, 5, 0.3) &= 0.070413 \\
69+
pdf_{\mathcal{N}}(0, 5, 2.5) &= 0.070413 \\
7070
ln(0.070413) &= -2.6533
7171
\end{aligned}
7272
$$

0 commit comments

Comments
 (0)