Skip to content

Commit 7a0f30a

Browse files
authored
Merge branch 'pymc-devs:main' into rename-twitter-to-x
2 parents 40b8ced + 3ce284c commit 7a0f30a

File tree

84 files changed

+2136
-2069
lines changed

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

+2136
-2069
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ jobs:
2828
persist-credentials: false
2929

3030
- name: Setup Docker buildx
31-
uses: docker/setup-buildx-action@v3.7.1
31+
uses: docker/setup-buildx-action@v3.10.0
3232

3333
- name: Prepare metadata
3434
id: meta
35-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
35+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
3636
with:
3737
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3838
tags: |
3939
type=sha,enable=true,prefix=git-
4040
type=raw,value=latest
4141
4242
- name: Log into registry ${{ env.REGISTRY }}
43-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
43+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
4444
with:
4545
registry: ${{ env.REGISTRY }}
4646
username: ${{ github.actor }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848

4949
- name: Build and push Docker image
5050
id: docker_build
51-
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960
51+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
5252
with:
5353
context: .
5454
file: scripts/dev.Dockerfile

.github/workflows/docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
persist-credentials: false
1919

2020
- name: Login to Docker Hub
21-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
21+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
2222
with:
2323
username: ${{ secrets.DOCKERHUB_USERNAME }}
2424
password: ${{ secrets.DOCKERHUB_TOKEN }}
2525

2626
- name: Extract metadata (tags, labels) for Docker
2727
id: meta
28-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
28+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
2929
with:
3030
images: |
3131
name=pymc/pymc,enable=true
@@ -36,7 +36,7 @@ jobs:
3636
type=semver,pattern={{major}}.{{minor}}
3737
3838
- name: Build and load image
39-
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960
39+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
4040
with:
4141
context: .
4242
file: scripts/Dockerfile
@@ -48,7 +48,7 @@ jobs:
4848
docker run --rm ${{ env.CONTAINER_NAME }} conda run -n pymc-dev python -c 'import pymc;print(pymc.__version__)'
4949
5050
- name: Build and push
51-
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960
51+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
5252
with:
5353
context: .
5454
push: true

.github/workflows/mypy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
- name: Install-pymc and mypy dependencies
2727
run: |
2828
pip install -e .
29-
pip install --pre -U polyagamma
3029
python --version
3130
- name: Run mypy
3231
run: |

.github/workflows/pr-auto-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Sync labels with closing issues
13-
uses: wd60622/[email protected].3
13+
uses: williambdean/[email protected].4
1414
with:
1515
exclude: "help wanted,needs info,beginner friendly"
1616
env:

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222
persist-credentials: false
23-
- uses: hynek/build-and-inspect-python-package@14c7e53f5d033cfa99f7af916fa59a6f7f356394 # v2.11.0
23+
- uses: hynek/build-and-inspect-python-package@b5076c307dc91924a82ad150cdd1533b444d3310 # v2.12.0
2424
with:
2525
# Prove that the packages were built in the context of this workflow.
2626
attest-build-provenance-github: true
@@ -38,12 +38,12 @@ jobs:
3838
id-token: write
3939
steps:
4040
- name: Download Distribution Artifacts
41-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
41+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
4242
with:
4343
# The build-and-inspect-python-package action invokes upload-artifact.
4444
# These are the correct arguments from that action.
4545
name: Packages
4646
path: dist
4747
- name: Publish Package to PyPI
48-
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3
48+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
4949
# Implicitly attests that the packages were uploaded in the context of this workflow.

.github/workflows/tests.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454
if: ${{ needs.changes.outputs.changes == 'true' }}
5555
strategy:
5656
matrix:
57-
os: [ubuntu-20.04]
57+
os: [ubuntu-latest]
5858
floatx: [float64]
59-
python-version: ["3.12"]
59+
python-version: ["3.13"]
6060
test-subset:
6161
- |
6262
tests/test_util.py
@@ -158,15 +158,13 @@ jobs:
158158
- name: Install-pymc
159159
run: |
160160
pip install -e .
161-
# TODO: https://github.com/pymc-devs/pymc/issues/7417
162-
pip install --pre -U 'polyagamma<1.3.7'
163161
python --version
164162
micromamba list
165163
- name: Run tests
166164
run: |
167165
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
168166
- name: Upload coverage to Codecov
169-
uses: codecov/codecov-action@v4
167+
uses: codecov/codecov-action@v5
170168
with:
171169
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
172170
env_vars: TEST_SUBSET
@@ -210,7 +208,6 @@ jobs:
210208
- name: Install-pymc
211209
run: |
212210
pip install -e .
213-
pip install --pre -U 'polyagamma<1.3.7'
214211
python --version
215212
micromamba list
216213
- name: Run tests
@@ -219,7 +216,7 @@ jobs:
219216
run: >-
220217
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 %TEST_SUBSET%
221218
- name: Upload coverage to Codecov
222-
uses: codecov/codecov-action@v4
219+
uses: codecov/codecov-action@v5
223220
with:
224221
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
225222
env_vars: TEST_SUBSET
@@ -233,7 +230,7 @@ jobs:
233230
matrix:
234231
os: [macos-latest]
235232
floatx: [float64]
236-
python-version: ["3.12"]
233+
python-version: ["3.13"]
237234
test-subset:
238235
- |
239236
tests/sampling/test_parallel.py
@@ -277,23 +274,27 @@ jobs:
277274
run: |
278275
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
279276
- name: Upload coverage to Codecov
280-
uses: codecov/codecov-action@v4
277+
uses: codecov/codecov-action@v5
281278
with:
282279
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
283280
env_vars: TEST_SUBSET
284281
name: ${{ matrix.os }} ${{ matrix.floatx }}
285282
fail_ci_if_error: false
286283

287-
external_samplers:
284+
alternative_backends:
288285
needs: changes
289286
if: ${{ needs.changes.outputs.changes == 'true' }}
290287
strategy:
291288
matrix:
292-
os: [ubuntu-20.04]
289+
os: [ubuntu-latest]
293290
floatx: [float64]
294-
python-version: ["3.12"]
291+
python-version: ["3.13"]
295292
test-subset:
296-
- tests/sampling/test_jax.py tests/sampling/test_mcmc_external.py
293+
- |
294+
tests/distributions/test_random_alternative_backends.py
295+
tests/sampling/test_jax.py
296+
tests/sampling/test_mcmc_external.py
297+
297298
fail-fast: false
298299
runs-on: ${{ matrix.os }}
299300
env:
@@ -308,7 +309,7 @@ jobs:
308309
persist-credentials: false
309310
- uses: mamba-org/setup-micromamba@v2
310311
with:
311-
environment-file: conda-envs/environment-jax.yml
312+
environment-file: conda-envs/environment-alternative-backends.yml
312313
create-args: >-
313314
python=${{matrix.python-version}}
314315
environment-name: pymc-test
@@ -323,11 +324,11 @@ jobs:
323324
run: |
324325
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
325326
- name: Upload coverage to Codecov
326-
uses: codecov/codecov-action@v4
327+
uses: codecov/codecov-action@v5
327328
with:
328329
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
329330
env_vars: TEST_SUBSET
330-
name: JAX tests - ${{ matrix.os }} ${{ matrix.floatx }}
331+
name: Alternative backend tests - ${{ matrix.os }} ${{ matrix.floatx }}
331332
fail_ci_if_error: false
332333

333334
float32:
@@ -337,7 +338,7 @@ jobs:
337338
matrix:
338339
os: [windows-latest]
339340
floatx: [float32]
340-
python-version: ["3.12"]
341+
python-version: ["3.13"]
341342
test-subset:
342343
- tests/sampling/test_mcmc.py tests/ode/test_ode.py tests/ode/test_utils.py tests/distributions/test_transform.py
343344
fail-fast: false
@@ -363,7 +364,6 @@ jobs:
363364
- name: Install-pymc
364365
run: |
365366
pip install -e .
366-
pip install --pre -U 'polyagamma<1.3.7'
367367
python --version
368368
micromamba list
369369
- name: Run tests
@@ -372,7 +372,7 @@ jobs:
372372
run: >-
373373
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 %TEST_SUBSET%
374374
- name: Upload coverage to Codecov
375-
uses: codecov/codecov-action@v4
375+
uses: codecov/codecov-action@v5
376376
with:
377377
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
378378
env_vars: TEST_SUBSET
@@ -382,13 +382,13 @@ jobs:
382382
all_tests:
383383
if: ${{ always() }}
384384
runs-on: ubuntu-latest
385-
needs: [ changes, ubuntu, windows, macos, external_samplers, float32 ]
385+
needs: [ changes, ubuntu, windows, macos, alternative_backends, float32 ]
386386
steps:
387387
- name: Check build matrix status
388388
if: ${{ needs.changes.outputs.changes == 'true' &&
389389
( needs.ubuntu.result != 'success' ||
390390
needs.windows.result != 'success' ||
391391
needs.macos.result != 'success' ||
392-
needs.external_samplers.result != 'success' ||
392+
needs.alternative_backends.result != 'success' ||
393393
needs.float32.result != 'success' ) }}
394394
run: exit 1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ venv/
5252
pixi.toml
5353
pixi.lock
5454
.pixi/
55+
56+
.jupyter/
57+
.claude/

.mailmap

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

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
- id: sphinx-lint
3939
args: ["."]
4040
- repo: https://github.com/lucianopaz/head_of_apache
41-
rev: "0.1.0"
41+
rev: "0.1.1"
4242
hooks:
4343
- id: head_of_apache
4444
args:
@@ -49,7 +49,7 @@ repos:
4949
- --exclude=versioneer.py
5050
- --last-year-present
5151
- repo: https://github.com/astral-sh/ruff-pre-commit
52-
rev: v0.9.2
52+
rev: v0.11.7
5353
hooks:
5454
- id: ruff
5555
args: [--fix, --show-fixes]

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ Thanks to our contributors
296296

297297
.. |Binder| image:: https://mybinder.org/badge_logo.svg
298298
:target: https://mybinder.org/v2/gh/pymc-devs/pymc/main?filepath=%2Fdocs%2Fsource%2Fnotebooks
299-
.. |Build Status| image:: https://github.com/pymc-devs/pymc/workflows/pytest/badge.svg
300-
:target: https://github.com/pymc-devs/pymc/actions
299+
.. |Build Status| image:: https://github.com/pymc-devs/pymc/workflows/tests/badge.svg
300+
:target: https://github.com/pymc-devs/pymc/actions?query=workflow%3Atests+branch%3Amain
301301
.. |Coverage| image:: https://codecov.io/gh/pymc-devs/pymc/branch/main/graph/badge.svg
302302
:target: https://codecov.io/gh/pymc-devs/pymc
303303
.. |Dockerhub| image:: https://img.shields.io/docker/automated/pymc/pymc.svg

0 commit comments

Comments
 (0)