Skip to content

Commit 155200a

Browse files
authored
Merge pull request #68 from pymc-devs/main
Sync Fork from Upstream Repo
2 parents f977f57 + c9a2b40 commit 155200a

Some content is hidden

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

56 files changed

+1286
-927
lines changed

.github/ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
If you have questions about a specific use case, or you are not sure whether this is a bug or not, please post it to our discourse channel: https://discourse.pymc.io
1+
---
2+
name: 'Bug Report'
3+
about: Inform about bugs in the PyMC3 library
4+
5+
---
26

37
## Description of your problem
48

@@ -8,10 +12,15 @@ If you have questions about a specific use case, or you are not sure whether thi
812
```
913

1014
**Please provide the full traceback.**
15+
16+
<details><summary>Complete error traceback</summary>
17+
1118
```python
12-
[The error output here]
19+
[The complete error output here]
1320
```
1421

22+
</details>
23+
1524
**Please provide any additional information below.**
1625

1726

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: PyMC Discourse
4+
url: https://discourse.pymc.io/
5+
about: Ask usage questions about PyMC3
6+
- name: Example notebook error report
7+
url: https://github.com/pymc-devs/pymc-examples/issues
8+
about: Please report errors or desired extensions to the tutorials and examples here.

.github/workflows/pytest.yml

Lines changed: 85 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,37 @@ on:
55
push:
66
branches: [main]
77

8+
9+
# Tests are split into multiple jobs to accelerate the CI.
10+
# Different jobs should be organized to take approximately the same
11+
# time to complete (and not be prohibitely slow).
12+
# Because GitHub Actions don't support YAML anchors, we have to place the
13+
# splitting of testfiles into groups in the strategy/matrix/test-subset
14+
# and can't re-use the groups across jobs.
15+
# A pre-commit hook (scripts/check_all_tests_are_covered.py)
16+
# enforces that test run just once per OS / floatX setting.
17+
818
jobs:
9-
pytest:
19+
ubuntu:
1020
strategy:
1121
matrix:
1222
os: [ubuntu-18.04]
1323
floatx: [float32, float64]
1424
test-subset:
15-
# Tests are split into multiple jobs to accelerate the CI.
16-
# The first job (starting in the next block) shouldn't run any tests, but
17-
# just ignores tests because that don't work at all, or run in other jobs.'
18-
# Any test that was not ignored runs in the first job.
19-
# A pre-commit hook (scripts/check_all_tests_are_covered.py) enforces that
20-
# test run just once.
21-
22-
# Because YAML doesn't allow comments in the blocks below, here they are..
23-
# 1st block: These tests are temporarily disabled, because they are _very_ broken
24-
# 2nd block: The JAX tests run through their own workflow: jaxtests.yml
25-
# 3nd & 4rd: These tests are covered by other matrix jobs
26-
# 5th block: These tests PASS without a single XFAIL
27-
# 6th block: These have some XFAILs
25+
# How this works:
26+
# 1st block: Only passes --ignore parameters to pytest.
27+
# → pytest will run all test_*.py files that are NOT ignored.
28+
#
29+
# Subsequent blocks: Only pass paths to test files.
30+
# → pytest will run only these files
2831
- |
2932
--ignore=pymc3/tests/test_distributions_timeseries.py
30-
--ignore=pymc3/tests/test_missing.py
3133
--ignore=pymc3/tests/test_mixture.py
3234
--ignore=pymc3/tests/test_model_graph.py
3335
--ignore=pymc3/tests/test_modelcontext.py
3436
--ignore=pymc3/tests/test_parallel_sampling.py
3537
--ignore=pymc3/tests/test_profile.py
36-
--ignore=pymc3/tests/test_random.py
37-
--ignore=pymc3/tests/test_shared.py
38-
--ignore=pymc3/tests/test_smc.py
39-
--ignore=pymc3/tests/test_starting.py
4038
--ignore=pymc3/tests/test_step.py
41-
--ignore=pymc3/tests/test_tracetab.py
4239
--ignore=pymc3/tests/test_tuning.py
4340
--ignore=pymc3/tests/test_types.py
4441
--ignore=pymc3/tests/test_variational_inference.py
@@ -47,7 +44,6 @@ jobs:
4744
--ignore=pymc3/tests/test_minibatches.py
4845
--ignore=pymc3/tests/test_pickling.py
4946
--ignore=pymc3/tests/test_plots.py
50-
--ignore=pymc3/tests/test_special_functions.py
5147
--ignore=pymc3/tests/test_updates.py
5248
--ignore=pymc3/tests/test_examples.py
5349
--ignore=pymc3/tests/test_gp.py
@@ -67,7 +63,6 @@ jobs:
6763
pymc3/tests/test_minibatches.py
6864
pymc3/tests/test_pickling.py
6965
pymc3/tests/test_plots.py
70-
pymc3/tests/test_special_functions.py
7166
pymc3/tests/test_updates.py
7267
7368
- |
@@ -136,3 +131,71 @@ jobs:
136131
env_vars: OS,PYTHON
137132
name: codecov-umbrella
138133
fail_ci_if_error: false
134+
windows:
135+
strategy:
136+
matrix:
137+
os: [windows-latest]
138+
floatx: [float32, float64]
139+
test-subset:
140+
- |
141+
pymc3/tests/test_distributions_random.py
142+
- |
143+
pymc3/tests/test_sampling.py
144+
pymc3/tests/test_shared.py
145+
- |
146+
pymc3/tests/test_gp.py
147+
pymc3/tests/test_ode.py
148+
- |
149+
pymc3/tests/test_model.py
150+
pymc3/tests/test_model_func.py
151+
pymc3/tests/test_modelcontext.py
152+
pymc3/tests/test_pickling.py
153+
154+
fail-fast: false
155+
runs-on: ${{ matrix.os }}
156+
env:
157+
TEST_SUBSET: ${{ matrix.test-subset }}
158+
AESARA_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=core2'
159+
defaults:
160+
run:
161+
shell: cmd
162+
steps:
163+
- uses: actions/checkout@v2
164+
- name: Cache conda
165+
uses: actions/cache@v1
166+
env:
167+
# Increase this value to reset cache if conda-envs/environment-dev-py38.yml has not changed
168+
CACHE_NUMBER: 0
169+
with:
170+
path: ~/conda_pkgs_dir
171+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
172+
hashFiles('conda-envs/windows-environment-dev-py38.yml') }}
173+
- name: Cache multiple paths
174+
uses: actions/cache@v2
175+
env:
176+
# Increase this value to reset cache if requirements.txt has not changed
177+
CACHE_NUMBER: 0
178+
with:
179+
path: |
180+
~/.cache/pip
181+
$RUNNER_TOOL_CACHE/Python/*
182+
~\AppData\Local\pip\Cache
183+
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
184+
hashFiles('requirements.txt') }}
185+
- uses: conda-incubator/setup-miniconda@v2
186+
with:
187+
activate-environment: pymc3-dev-py38
188+
channel-priority: strict
189+
environment-file: conda-envs/windows-environment-dev-py38.yml
190+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
191+
- name: Install-pymc3
192+
run: |
193+
conda activate pymc3-dev-py38
194+
pip install -e .
195+
python --version
196+
- name: Run tests
197+
# This job uses a cmd shell, therefore the environment variable syntax is different!
198+
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
199+
run: >-
200+
conda activate pymc3-dev-py38 &&
201+
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%

.github/workflows/windows.yml

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

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: ^(docs/logos|pymc3/tests/data)/
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v3.4.0
4+
rev: v4.0.1
55
hooks:
66
- id: check-merge-conflict
77
- id: check-toml
@@ -14,28 +14,29 @@ repos:
1414
exclude: ^requirements-dev\.txt$
1515
- id: trailing-whitespace
1616
- repo: https://github.com/PyCQA/isort
17-
rev: 5.8.0
17+
rev: 5.9.0
1818
hooks:
1919
- id: isort
2020
name: isort
2121
- repo: https://github.com/asottile/pyupgrade
22-
rev: v2.11.0
22+
rev: v2.19.4
2323
hooks:
2424
- id: pyupgrade
2525
args: [--py37-plus]
2626
- repo: https://github.com/psf/black
27-
rev: 20.8b1
27+
rev: 21.6b0
2828
hooks:
2929
- id: black
3030
- repo: https://github.com/PyCQA/pylint
31-
rev: pylint-2.7.4
31+
rev: v2.8.3
3232
hooks:
3333
- id: pylint
3434
args: [--rcfile=.pylintrc]
3535
files: ^pymc3/
3636
- repo: local
3737
hooks:
3838
- id: check-no-tests-are-ignored
39+
additional_dependencies: [pandas,pyyaml]
3940
entry: python scripts/check_all_tests_are_covered.py
4041
files: ^\.github/workflows/pytest\.yml$
4142
language: python

RELEASE-NOTES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
- The GLM submodule has been removed, please use [Bambi](https://bambinos.github.io/bambi/) instead.
88
- The `Distribution` keyword argument `testval` has been deprecated in favor of `initval`.
99
- `pm.sample` now returns results as `InferenceData` instead of `MultiTrace` by default (see [#4744](https://github.com/pymc-devs/pymc3/pull/4744)).
10-
- ...
10+
- `pm.sample_prior_predictive` no longer returns transformed variable values by default. Pass them by name in `var_names` if you want to obtain these draws (see [4769](https://github.com/pymc-devs/pymc3/pull/4769)).
11+
...
1112

1213
### New Features
1314
- The `CAR` distribution has been added to allow for use of conditional autoregressions which often are used in spatial and network models.

conda-envs/environment-dev-py37.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,29 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6+
- aesara>=2.0.9
7+
- arviz>=0.11.2
8+
- cachetools>=4.2.1
9+
- dill
10+
- fastprogress>=0.2.0
611
- h5py>=2.7
712
- ipython>=7.16
813
- libblas=*=*mkl
914
- mkl-service
10-
- nbsphinx>=0.4
15+
- myst-nb
1116
- numpy=1.15
1217
- numpydoc>=0.9
1318
- pandas=0.24
1419
- pre-commit>=2.8.0
20+
- pydata-sphinx-theme
1521
- pytest-cov>=2.5
1622
- pytest>=3.0
1723
- python-graphviz
1824
- python=3.7
1925
- recommonmark>=0.4
20-
- scipy=1.2
26+
- scipy>1.4.1
2127
- sphinx-autobuild>=0.7
28+
- sphinx-panels
2229
- sphinx>=1.5
30+
- typing-extensions
2331
- watermark

conda-envs/environment-dev-py38.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,30 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6+
- aesara>=2.0.9
7+
- arviz>=0.11.2
8+
- cachetools>=4.2.1
9+
- dill
10+
- fastprogress>=0.2.0
611
- h5py>=2.7
712
- ipython>=7.16
813
- libblas=*=*mkl
914
- mkl-service
15+
- myst-nb
1016
- nbsphinx>=0.4
17+
- numpy>=1.15.0
1118
- numpydoc>=0.9
19+
- pandas
1220
- pre-commit>=2.8.0
21+
- pydata-sphinx-theme
1322
- pytest-cov>=2.5
1423
- pytest>=3.0
1524
- python-graphviz
1625
- python=3.8
1726
- recommonmark>=0.4
27+
- scipy>1.4.1
1828
- sphinx-autobuild>=0.7
29+
- sphinx-panels
1930
- sphinx>=1.5
31+
- typing-extensions>=3.7.4
2032
- watermark

conda-envs/environment-dev-py39.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,30 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6+
- aesara>=2.0.9
7+
- arviz>=0.11.2
8+
- cachetools>=4.2.1
9+
- dill
10+
- fastprogress>=0.2.0
611
- h5py>=2.7
712
- ipython>=7.16
813
- libblas=*=*mkl
914
- mkl-service
15+
- myst-nb
1016
- nbsphinx>=0.4
17+
- numpy>=1.15.0
1118
- numpydoc>=0.9
19+
- pandas>=0.24.0
1220
- pre-commit>=2.8.0
21+
- pydata-sphinx-theme
1322
- pytest-cov>=2.5
1423
- pytest>=3.0
1524
- python-graphviz
1625
- python=3.9
1726
- recommonmark>=0.4
27+
- scipy>1.4.1
1828
- sphinx-autobuild>=0.7
29+
- sphinx-panels
1930
- sphinx>=1.5
31+
- typing-extensions>=3.7.4
2032
- watermark

0 commit comments

Comments
 (0)