Skip to content

Commit fe39189

Browse files
authored
Merge branch 'main' into discrete-distributions-type-hints
2 parents 6f6b416 + 56a1d56 commit fe39189

File tree

232 files changed

+16670
-13824
lines changed

Some content is hidden

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

232 files changed

+16670
-13824
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@d632683dd7b4114ad314bca15554477dd762a938
2727

2828
- name: Setup Docker buildx
29-
uses: docker/setup-buildx-action@v3.0.0
29+
uses: docker/setup-buildx-action@v3.4.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@9780b0c442fbb1117ed29e0efdff1e18412f7567
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@32945a339266b759abcbdc89316275140b0fc960
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@d632683dd7b4114ad314bca15554477dd762a938
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@d632683dd7b4114ad314bca15554477dd762a938
1717

1818
- name: Login to Docker Hub
19-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
19+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
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@32945a339266b759abcbdc89316275140b0fc960
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@32945a339266b759abcbdc89316275140b0fc960
5050
with:
5151
context: .
5252
push: true
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
1-
name: pre-commit
1+
name: mypy
22

33
on:
44
pull_request:
55
push:
66
branches: [main]
77

88
jobs:
9-
pre-commit:
10-
runs-on: ubuntu-latest
11-
env:
12-
SKIP: no-commit-to-branch
13-
steps:
14-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
15-
- uses: actions/setup-python@v5
16-
with:
17-
python-version: "3.9" # Run pre-commit on oldest supported Python version
18-
- uses: pre-commit/[email protected]
199
mypy:
2010
runs-on: ubuntu-latest
2111
defaults:
2212
run:
2313
shell: bash -l {0}
2414
steps:
25-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
15+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
2616
- name: Cache conda
2717
uses: actions/cache@v4
2818
env:
@@ -52,7 +42,7 @@ jobs:
5242
activate-environment: pymc-test
5343
channel-priority: strict
5444
environment-file: conda-envs/environment-test.yml
55-
python-version: "3.9" # Run pre-commit on oldest supported Python version
45+
python-version: "3.10" # Run pre-commit on oldest supported Python version
5646
use-mamba: true
5747
use-only-tar-bz2: false # IMPORTANT: This may break caching of conda packages! See https://github.com/conda-incubator/setup-miniconda/issues/267
5848
- name: Install-pymc and mypy dependencies

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
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@d632683dd7b4114ad314bca15554477dd762a938
1515
- name: Set up Python
1616
uses: actions/setup-python@v5
1717
with:
@@ -26,10 +26,10 @@ jobs:
2626
# pytest --cov=./pymc --cov-report term-missing pymc/
2727
- name: Install release tooling
2828
run: |
29-
pip install twine wheel
29+
pip install build twine
3030
- name: Build package
3131
run: |
32-
python setup.py sdist bdist_wheel
32+
python -m build
3333
- name: Check version number match
3434
run: |
3535
echo "GITHUB_REF: ${GITHUB_REF}"

.github/workflows/tests.yml

Lines changed: 32 additions & 20 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@d632683dd7b4114ad314bca15554477dd762a938
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
@@ -65,10 +65,13 @@ jobs:
6565
- |
6666
tests/distributions/test_continuous.py
6767
tests/distributions/test_multivariate.py
68+
tests/distributions/moments/test_means.py
6869
6970
- |
7071
tests/distributions/test_censored.py
72+
tests/distributions/test_custom.py
7173
tests/distributions/test_simulator.py
74+
tests/sampling/test_deterministic.py
7275
tests/sampling/test_forward.py
7376
tests/sampling/test_population.py
7477
tests/stats/test_convergence.py
@@ -96,10 +99,12 @@ jobs:
9699
tests/model/test_fgraph.py
97100
tests/model/transform/test_basic.py
98101
tests/model/transform/test_conditioning.py
102+
tests/model/transform/test_optimization.py
99103
tests/test_model_graph.py
100104
tests/ode/test_ode.py
101105
tests/ode/test_utils.py
102106
tests/step_methods/hmc/test_quadpotential.py
107+
tests/step_methods/test_state.py
103108
104109
- |
105110
tests/backends/test_mcbackend.py
@@ -111,6 +116,7 @@ jobs:
111116
tests/logprob/test_censoring.py
112117
tests/logprob/test_composite_logprob.py
113118
tests/logprob/test_cumsum.py
119+
tests/logprob/test_linalg.py
114120
tests/logprob/test_mixture.py
115121
tests/logprob/test_order.py
116122
tests/logprob/test_rewriting.py
@@ -129,7 +135,7 @@ jobs:
129135
run:
130136
shell: bash -l {0}
131137
steps:
132-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
138+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
133139
- name: Cache conda
134140
uses: actions/cache@v4
135141
env:
@@ -166,14 +172,16 @@ jobs:
166172
run: |
167173
conda activate pymc-test
168174
pip install -e .
169-
pip install --pre -U polyagamma
175+
# TODO: https://github.com/pymc-devs/pymc/issues/7417
176+
pip install --pre -U 'polyagamma<1.3.7'
170177
python --version
178+
conda list
171179
- name: Run tests
172180
run: |
173181
conda activate pymc-test
174182
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
175183
- name: Upload coverage to Codecov
176-
uses: codecov/codecov-action@v3
184+
uses: codecov/codecov-action@v4
177185
with:
178186
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
179187
env_vars: TEST_SUBSET
@@ -187,12 +195,12 @@ jobs:
187195
matrix:
188196
os: [windows-latest]
189197
floatx: [float64]
190-
python-version: ["3.9"]
198+
python-version: ["3.10"]
191199
test-subset:
192200
- tests/variational/test_approximations.py tests/variational/test_callbacks.py tests/variational/test_inference.py tests/variational/test_opvi.py tests/test_initial_point.py
193201
- tests/model/test_core.py tests/sampling/test_mcmc.py
194202
- tests/gp/test_cov.py tests/gp/test_gp.py tests/gp/test_mean.py tests/gp/test_util.py tests/ode/test_ode.py tests/ode/test_utils.py tests/smc/test_smc.py tests/sampling/test_parallel.py
195-
- tests/step_methods/test_metropolis.py tests/step_methods/test_slicer.py tests/step_methods/hmc/test_nuts.py tests/step_methods/test_compound.py tests/step_methods/hmc/test_hmc.py
203+
- tests/step_methods/test_metropolis.py tests/step_methods/test_slicer.py tests/step_methods/hmc/test_nuts.py tests/step_methods/test_compound.py tests/step_methods/hmc/test_hmc.py tests/step_methods/test_state.py
196204

197205
fail-fast: false
198206
runs-on: ${{ matrix.os }}
@@ -203,7 +211,7 @@ jobs:
203211
run:
204212
shell: cmd
205213
steps:
206-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
214+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
207215
- name: Cache conda
208216
uses: actions/cache@v4
209217
env:
@@ -240,16 +248,17 @@ jobs:
240248
run: |
241249
conda activate pymc-test
242250
pip install -e .
243-
pip install --pre -U polyagamma
251+
pip install --pre -U 'polyagamma<1.3.7'
244252
python --version
253+
conda list
245254
- name: Run tests
246255
# This job uses a cmd shell, therefore the environment variable syntax is different!
247256
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
248257
run: >-
249258
conda activate pymc-test &&
250259
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 %TEST_SUBSET%
251260
- name: Upload coverage to Codecov
252-
uses: codecov/codecov-action@v3
261+
uses: codecov/codecov-action@v4
253262
with:
254263
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
255264
env_vars: TEST_SUBSET
@@ -263,7 +272,7 @@ jobs:
263272
matrix:
264273
os: [macos-latest]
265274
floatx: [float64]
266-
python-version: ["3.10"]
275+
python-version: ["3.12"]
267276
test-subset:
268277
- |
269278
tests/sampling/test_parallel.py
@@ -286,7 +295,7 @@ jobs:
286295
run:
287296
shell: bash -l {0}
288297
steps:
289-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
298+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
290299
- name: Cache conda
291300
uses: actions/cache@v4
292301
env:
@@ -324,11 +333,12 @@ jobs:
324333
conda activate pymc-test
325334
pip install -e .
326335
python --version
336+
conda list
327337
- name: Run tests
328338
run: |
329339
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
330340
- name: Upload coverage to Codecov
331-
uses: codecov/codecov-action@v3
341+
uses: codecov/codecov-action@v4
332342
with:
333343
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
334344
env_vars: TEST_SUBSET
@@ -342,7 +352,7 @@ jobs:
342352
matrix:
343353
os: [ubuntu-20.04]
344354
floatx: [float64]
345-
python-version: ["3.11"]
355+
python-version: ["3.12"]
346356
test-subset:
347357
- tests/sampling/test_jax.py tests/sampling/test_mcmc_external.py
348358
fail-fast: false
@@ -354,7 +364,7 @@ jobs:
354364
run:
355365
shell: bash -l {0}
356366
steps:
357-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
367+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
358368
- name: Cache conda
359369
uses: actions/cache@v4
360370
env:
@@ -392,11 +402,12 @@ jobs:
392402
conda activate pymc-test
393403
pip install -e .
394404
python --version
405+
conda list
395406
- name: Run tests
396407
run: |
397408
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 $TEST_SUBSET
398409
- name: Upload coverage to Codecov
399-
uses: codecov/codecov-action@v3
410+
uses: codecov/codecov-action@v4
400411
with:
401412
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
402413
env_vars: TEST_SUBSET
@@ -410,7 +421,7 @@ jobs:
410421
matrix:
411422
os: [windows-latest]
412423
floatx: [float32]
413-
python-version: ["3.11"]
424+
python-version: ["3.12"]
414425
test-subset:
415426
- tests/sampling/test_mcmc.py tests/ode/test_ode.py tests/ode/test_utils.py tests/distributions/test_transform.py
416427
fail-fast: false
@@ -422,7 +433,7 @@ jobs:
422433
run:
423434
shell: cmd
424435
steps:
425-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
436+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
426437
- name: Cache conda
427438
uses: actions/cache@v4
428439
env:
@@ -459,16 +470,17 @@ jobs:
459470
run: |
460471
conda activate pymc-test
461472
pip install -e .
462-
pip install --pre -U polyagamma
473+
pip install --pre -U 'polyagamma<1.3.7'
463474
python --version
475+
conda list
464476
- name: Run tests
465477
# This job uses a cmd shell, therefore the environment variable syntax is different!
466478
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
467479
run: >-
468480
conda activate pymc-test &&
469481
python -m pytest -vv --cov=pymc --cov-report=xml --no-cov-on-fail --cov-report term --durations=50 %TEST_SUBSET%
470482
- name: Upload coverage to Codecov
471-
uses: codecov/codecov-action@v3
483+
uses: codecov/codecov-action@v4
472484
with:
473485
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
474486
env_vars: TEST_SUBSET

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ pythonenv*
4949
env/
5050
venv/
5151
.venv/
52+
pixi.toml
53+
pixi.lock
54+
.pixi/

0 commit comments

Comments
 (0)