Skip to content

Commit 7cdc070

Browse files
authored
Merge branch 'pymc-devs:main' into main
2 parents eaca09f + 2db28f0 commit 7cdc070

File tree

180 files changed

+12803
-10703
lines changed

Some content is hidden

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

180 files changed

+12803
-10703
lines changed

.coveragerc

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Depending on what your PR does, here are a few things you might want to address
55
+ [ ] what are the (breaking) changes that this PR makes?
66
+ [ ] important background, or details about the implementation
77
+ [ ] are the changes—especially new features—covered by tests and docstrings?
8-
+ [ ] [linting/style checks have been run](https://github.com/pymc-devs/pymc3/wiki/PyMC3-Python-Code-Style)
8+
+ [ ] [linting/style checks have been run](https://docs.pymc.io/en/latest/contributing/python_style.html)
99
+ [ ] [consider adding/updating relevant example notebooks](https://github.com/pymc-devs/pymc-examples)
1010
+ [ ] right before it's ready to merge, mention the PR in the RELEASE-NOTES.md

.github/workflows/arviz_compat.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
pull_request:
55
push:
66
branches: [main]
7+
paths:
8+
- ".github/workflows/*"
9+
- "pymc/**"
10+
- "setup.py"
11+
- "pyproject.toml"
12+
- "buildosx"
13+
- "conda-envs/**"
14+
- "codecov.yml"
715

816
jobs:
917
pytest:
@@ -12,9 +20,18 @@ jobs:
1220
os: [ubuntu-latest, macos-latest]
1321
floatx: [float64]
1422
test-subset:
15-
- pymc/tests/test_distributions.py
16-
- pymc/tests/test_distributions_random.py
17-
- pymc/tests/test_sampling.py
23+
- |
24+
pymc/tests/test_parallel_sampling.py
25+
pymc/tests/test_posteriors.py
26+
pymc/tests/test_sampling.py
27+
28+
- |
29+
pymc/tests/test_data_container.py
30+
pymc/tests/test_idata_conversion.py
31+
pymc/tests/test_missing.py
32+
pymc/tests/test_model.py
33+
pymc/tests/test_shape_handling.py
34+
pymc/tests/test_shared.py
1835
fail-fast: false
1936
runs-on: ${{ matrix.os }}
2037
env:
@@ -28,12 +45,12 @@ jobs:
2845
- name: Cache conda
2946
uses: actions/cache@v1
3047
env:
31-
# Increase this value to reset cache if environment-dev-py39.yml has not changed
48+
# Increase this value to reset cache if environment-test-py39.yml has not changed
3249
CACHE_NUMBER: 0
3350
with:
3451
path: ~/conda_pkgs_dir
3552
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
36-
hashFiles('conda-envs/environment-dev-py39.yml') }}
53+
hashFiles('conda-envs/environment-test-py39.yml') }}
3754
- name: Cache multiple paths
3855
uses: actions/cache@v2
3956
env:
@@ -48,20 +65,24 @@ jobs:
4865
hashFiles('requirements.txt') }}
4966
- uses: conda-incubator/setup-miniconda@v2
5067
with:
51-
activate-environment: pymc-dev-py39
68+
miniforge-variant: Mambaforge
69+
miniforge-version: latest
70+
mamba-version: "*"
71+
activate-environment: pymc-test-py39
5272
channel-priority: strict
53-
environment-file: conda-envs/environment-dev-py39.yml
73+
environment-file: conda-envs/environment-test-py39.yml
74+
use-mamba: true
5475
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
5576
- name: Install pymc
5677
run: |
57-
conda activate pymc-dev-py39
78+
conda activate pymc-test-py39
5879
pip install -e .
5980
python --version
6081
- name: Install latest arviz
6182
run: |
62-
conda activate pymc-dev-py39
83+
conda activate pymc-test-py39
6384
pip uninstall arviz -y
64-
pip install git+git://github.com/arviz-devs/arviz.git
85+
pip install git+https://github.com/arviz-devs/arviz
6586
- name: Run tests
6687
run: |
6788
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET

.github/workflows/jaxtests.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
pull_request:
55
push:
66
branches: [main]
7+
paths:
8+
- ".github/workflows/*"
9+
- "pymc/**"
10+
- "setup.py"
11+
- "pyproject.toml"
12+
- "buildosx"
13+
- "conda-envs/**"
14+
- "codecov.yml"
715

816
jobs:
917
pytest:
@@ -26,12 +34,12 @@ jobs:
2634
- name: Cache conda
2735
uses: actions/cache@v1
2836
env:
29-
# Increase this value to reset cache if environment-dev-py39.yml has not changed
37+
# Increase this value to reset cache if environment-test-py39.yml has not changed
3038
CACHE_NUMBER: 0
3139
with:
3240
path: ~/conda_pkgs_dir
3341
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
34-
hashFiles('conda-envs/environment-dev-py39.yml') }}
42+
hashFiles('conda-envs/environment-test-py39.yml') }}
3543
- name: Cache multiple paths
3644
uses: actions/cache@v2
3745
env:
@@ -46,19 +54,24 @@ jobs:
4654
hashFiles('requirements.txt') }}
4755
- uses: conda-incubator/setup-miniconda@v2
4856
with:
49-
activate-environment: pymc-dev-py39
57+
miniforge-variant: Mambaforge
58+
miniforge-version: latest
59+
mamba-version: "*"
60+
activate-environment: pymc-test-py39
5061
channel-priority: strict
51-
environment-file: conda-envs/environment-dev-py39.yml
62+
environment-file: conda-envs/environment-test-py39.yml
63+
use-mamba: true
5264
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
5365
- name: Install pymc
5466
run: |
55-
conda activate pymc-dev-py39
67+
conda activate pymc-test-py39
5668
pip install -e .
5769
python --version
5870
- name: Install jax specific dependencies
5971
run: |
60-
conda activate pymc-dev-py39
72+
conda activate pymc-test-py39
6173
pip install "numpyro>=0.8.0"
74+
pip install git+https://github.com/blackjax-devs/blackjax.git@main
6275
- name: Run tests
6376
run: |
6477
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET

.github/workflows/nightly.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: nightly
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
build-and-publish-nightly:
9+
name: Build source distribution
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.9
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install -U pip
21+
python -m pip install build
22+
- name: Build the sdist
23+
run: python -m build --sdist .
24+
env:
25+
BUILD_PYMC_NIGHTLY: true
26+
- name: Publish to PyPI
27+
uses: pypa/[email protected]
28+
with:
29+
user: __token__
30+
password: ${{ secrets.PYPI_TOKEN_PYMC_NIGHTLY }}
31+
test-install-job:
32+
needs: build-and-publish-nightly
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Set up Python
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: 3.9
40+
- name: Give PyPI a chance to update the index
41+
run: sleep 240
42+
- name: Install from PyPI
43+
run: |
44+
pip install pymc-nightly==$(grep 'version' pymc/__init__.py | awk '{print $3}' | tr -d '"').dev$(date +"%Y%m%d")

.github/workflows/pytest.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
pull_request:
55
push:
66
branches: [main]
7+
paths:
8+
- ".github/workflows/*"
9+
- "pymc/**"
10+
- "setup.py"
11+
- "pyproject.toml"
12+
- "buildosx"
13+
- "conda-envs/**"
14+
- "codecov.yml"
715

816

917
# Tests are split into multiple jobs to accelerate the CI.
@@ -30,7 +38,6 @@ jobs:
3038
# → pytest will run only these files
3139
- |
3240
--ignore=pymc/tests/test_distributions_timeseries.py
33-
--ignore=pymc/tests/test_initial_point.py
3441
--ignore=pymc/tests/test_mixture.py
3542
--ignore=pymc/tests/test_model_graph.py
3643
--ignore=pymc/tests/test_modelcontext.py
@@ -41,25 +48,24 @@ jobs:
4148
--ignore=pymc/tests/test_step.py
4249
--ignore=pymc/tests/test_tuning.py
4350
--ignore=pymc/tests/test_transforms.py
44-
--ignore=pymc/tests/test_variational_inference.py
4551
--ignore=pymc/tests/test_sampling_jax.py
4652
--ignore=pymc/tests/test_dist_math.py
4753
--ignore=pymc/tests/test_minibatches.py
4854
--ignore=pymc/tests/test_pickling.py
4955
--ignore=pymc/tests/test_updates.py
5056
--ignore=pymc/tests/test_gp.py
5157
--ignore=pymc/tests/test_model.py
52-
--ignore=pymc/tests/test_model_func.py
5358
--ignore=pymc/tests/test_ode.py
5459
--ignore=pymc/tests/test_posdef_sym.py
5560
--ignore=pymc/tests/test_quadpotential.py
5661
--ignore=pymc/tests/test_shape_handling.py
5762
--ignore=pymc/tests/test_distributions.py
5863
--ignore=pymc/tests/test_distributions_random.py
5964
--ignore=pymc/tests/test_idata_conversion.py
65+
--ignore=pymc/tests/test_smc.py
66+
--ignore=pymc/tests/test_missing.py
6067
6168
- |
62-
pymc/tests/test_initial_point.py
6369
pymc/tests/test_distributions.py
6470
6571
- |
@@ -69,27 +75,29 @@ jobs:
6975
pymc/tests/test_pickling.py
7076
pymc/tests/test_updates.py
7177
pymc/tests/test_transforms.py
78+
pymc/tests/test_smc.py
79+
pymc/tests/test_mixture.py
7280
7381
- |
7482
pymc/tests/test_parallel_sampling.py
7583
pymc/tests/test_sampling.py
7684
pymc/tests/test_tuning.py
7785
pymc/tests/test_posteriors.py
86+
pymc/tests/test_step.py
7887
7988
- |
8089
pymc/tests/test_idata_conversion.py
8190
pymc/tests/test_distributions_random.py
8291
pymc/tests/test_distributions_timeseries.py
8392
pymc/tests/test_gp.py
8493
pymc/tests/test_model.py
85-
pymc/tests/test_model_func.py
8694
pymc/tests/test_model_graph.py
8795
pymc/tests/test_ode.py
8896
pymc/tests/test_posdef_sym.py
8997
pymc/tests/test_profile.py
9098
pymc/tests/test_quadpotential.py
9199
pymc/tests/test_shape_handling.py
92-
pymc/tests/test_step.py
100+
pymc/tests/test_missing.py
93101
94102
fail-fast: false
95103
runs-on: ${{ matrix.os }}
@@ -124,9 +132,13 @@ jobs:
124132
hashFiles('requirements.txt') }}
125133
- uses: conda-incubator/setup-miniconda@v2
126134
with:
135+
miniforge-variant: Mambaforge
136+
miniforge-version: latest
137+
mamba-version: "*"
127138
activate-environment: pymc-test-py37
128139
channel-priority: strict
129140
environment-file: conda-envs/environment-test-py37.yml
141+
use-mamba: true
130142
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
131143
- name: Install-pymc
132144
run: |
@@ -155,6 +167,7 @@ jobs:
155167
pymc/tests/test_distributions_random.py
156168
pymc/tests/test_distributions_moments.py
157169
pymc/tests/test_distributions_timeseries.py
170+
pymc/tests/test_variational_inference.py
158171
- |
159172
pymc/tests/test_parallel_sampling.py
160173
pymc/tests/test_sampling.py
@@ -166,7 +179,6 @@ jobs:
166179
pymc/tests/test_ode.py
167180
- |
168181
pymc/tests/test_model.py
169-
pymc/tests/test_model_func.py
170182
pymc/tests/test_modelcontext.py
171183
pymc/tests/test_model_graph.py
172184
pymc/tests/test_pickling.py
@@ -205,9 +217,13 @@ jobs:
205217
hashFiles('requirements.txt') }}
206218
- uses: conda-incubator/setup-miniconda@v2
207219
with:
220+
miniforge-variant: Mambaforge
221+
miniforge-version: latest
222+
mamba-version: "*"
208223
activate-environment: pymc-test-py38
209224
channel-priority: strict
210225
environment-file: conda-envs/windows-environment-test-py38.yml
226+
use-mamba: true
211227
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
212228
- name: Install-pymc
213229
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Publish to PyPI
4040
run: |
4141
twine check dist/*
42-
twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN_PYMC} dist/*
42+
twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/*
4343
test-install-job:
4444
needs: release-job
4545
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)