Skip to content

Commit 9e012fb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into extend-plot_posterior_predictive_glm
2 parents 3fe8210 + b7b145d commit 9e012fb

File tree

194 files changed

+4223
-1760
lines changed

Some content is hidden

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

194 files changed

+4223
-1760
lines changed

.codecov.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
codecov:
22
require_ci_to_pass: no
33
notify:
4-
after_n_builds: 7
4+
after_n_builds: 9
55

66
coverage:
77
precision: 2
@@ -13,13 +13,13 @@ coverage:
1313
# basic
1414
target: auto
1515
threshold: 1%
16-
base: auto
16+
base: auto
1717
patch:
1818
default:
1919
# basic
2020
target: 50%
2121
threshold: 1%
22-
base: auto
22+
base: auto
2323

2424
comment:
2525
layout: "reach, diff, flags, files"

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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+
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
22

33
## Description of your problem
44

.github/workflows/arviz_compat.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: arviz-compatibility
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pytest:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest]
13+
floatx: [float64]
14+
test-subset:
15+
- pymc3/tests/test_distributions_random.py
16+
- pymc3/tests/test_sampling.py
17+
fail-fast: false
18+
runs-on: ${{ matrix.os }}
19+
env:
20+
TEST_SUBSET: ${{ matrix.test-subset }}
21+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
22+
defaults:
23+
run:
24+
shell: bash -l {0}
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Cache conda
28+
uses: actions/cache@v1
29+
env:
30+
# Increase this value to reset cache if environment-dev-py38.yml has not changed
31+
CACHE_NUMBER: 0
32+
with:
33+
path: ~/conda_pkgs_dir
34+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
35+
hashFiles('conda-envs/environment-dev-py38.yml') }}
36+
- name: Cache multiple paths
37+
uses: actions/cache@v2
38+
env:
39+
# Increase this value to reset cache if requirements.txt has not changed
40+
CACHE_NUMBER: 0
41+
with:
42+
path: |
43+
~/.cache/pip
44+
$RUNNER_TOOL_CACHE/Python/*
45+
~\AppData\Local\pip\Cache
46+
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
47+
hashFiles('requirements.txt') }}
48+
- uses: conda-incubator/setup-miniconda@v2
49+
with:
50+
activate-environment: pymc3-dev-py38
51+
channel-priority: strict
52+
environment-file: conda-envs/environment-dev-py38.yml
53+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
54+
- name: Install pymc3
55+
run: |
56+
conda activate pymc3-dev-py38
57+
pip install -e .
58+
python --version
59+
- name: Install latest arviz
60+
run: |
61+
conda activate pymc3-dev-py38
62+
pip uninstall arviz -y
63+
pip install git+git://github.com/arviz-devs/arviz.git
64+
- name: Run tests
65+
run: |
66+
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Update pre-commit config"
2+
3+
on:
4+
schedule:
5+
- cron: "0 7 * * 1" # At 07:00 on each Monday.
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-pre-commit:
10+
if: github.repository_owner == 'pymc-devs'
11+
name: Autoupdate pre-commit config
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
- name: Cache multiple paths
17+
uses: actions/cache@v2
18+
with:
19+
path: |
20+
~/.cache/pre-commit
21+
~/.cache/pip
22+
key: pre-commit-autoupdate-${{ runner.os }}-build
23+
- name: Update pre-commit config packages
24+
uses: technote-space/create-pr-action@v2
25+
with:
26+
GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }}
27+
EXECUTE_COMMANDS: |
28+
pip install pre-commit
29+
pre-commit autoupdate || (exit 0);
30+
pre-commit run -a || (exit 0);
31+
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
32+
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
33+
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: run pre-commit
2+
3+
on:
4+
repository_dispatch:
5+
types: [pre-commit-run-command]
6+
jobs:
7+
runPreCommit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
repository: ${{github.event.client_payload.pull_request.head.repo.full_name}}
13+
ref: ${{github.event.client_payload.pull_request.head.ref}}
14+
token: ${{ secrets.ACTION_TRIGGER_TOKEN }}
15+
- name: Cache multiple paths
16+
uses: actions/cache@v2
17+
with:
18+
path: |
19+
~/.cache/pre-commit
20+
~/.cache/pip
21+
key: pre-commit-dispatched-${{ runner.os }}-build
22+
- uses: actions/setup-python@v2
23+
with:
24+
python-version: 3.8
25+
- name: install-pre-commit
26+
run: python -m pip install --upgrade pre-commit
27+
- name: Slash Command Dispatch
28+
run: pre-commit run --all-files || (exit 0)
29+
- run: |
30+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
git config --local user.name "github-actions[bot]"
32+
git commit -m "Run pre-commit" -a
33+
git push

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
11+
env:
12+
SKIP: no-commit-to-branch
1113
steps:
1214
- uses: actions/checkout@v2
1315
- uses: actions/setup-python@v2

.github/workflows/pytest.yml

Lines changed: 56 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,59 @@ jobs:
99
pytest:
1010
strategy:
1111
matrix:
12-
python-version: ["3.6"]
1312
os: [ubuntu-18.04]
1413
floatx: [float32, float64]
1514
test-subset:
1615
- |
17-
--ignore=pymc3/tests/test_examples.py
18-
--ignore=pymc3/tests/test_distributions_random.py
19-
--ignore=pymc3/tests/test_variational_inference.py
20-
--ignore=pymc3/tests/test_shared.py
21-
--ignore=pymc3/tests/test_smc.py
22-
--ignore=pymc3/tests/test_updates.py
23-
--ignore=pymc3/tests/test_posteriors.py
24-
--ignore=pymc3/tests/test_sampling.py
25-
--ignore=pymc3/tests/test_parallel_sampling.py
2616
--ignore=pymc3/tests/test_dist_math.py
2717
--ignore=pymc3/tests/test_distribution_defaults.py
18+
--ignore=pymc3/tests/test_distributions.py
19+
--ignore=pymc3/tests/test_distributions_random.py
2820
--ignore=pymc3/tests/test_distributions_timeseries.py
29-
--ignore=pymc3/tests/test_random.py
21+
--ignore=pymc3/tests/test_examples.py
3022
--ignore=pymc3/tests/test_gp.py
31-
--ignore=pymc3/tests/test_shape_handling
23+
--ignore=pymc3/tests/test_mixture.py
24+
--ignore=pymc3/tests/test_ode.py
25+
--ignore=pymc3/tests/test_parallel_sampling.py
26+
--ignore=pymc3/tests/test_posteriors.py
3227
--ignore=pymc3/tests/test_quadpotential.py
28+
--ignore=pymc3/tests/test_random.py
29+
--ignore=pymc3/tests/test_sampling.py
30+
--ignore=pymc3/tests/test_shape_handling.py
31+
--ignore=pymc3/tests/test_shared.py
32+
--ignore=pymc3/tests/test_smc.py
33+
--ignore=pymc3/tests/test_step.py
34+
--ignore=pymc3/tests/test_updates.py
35+
--ignore=pymc3/tests/test_variational_inference.py
3336
- |
34-
pymc3/tests/test_distributions_random.py
35-
pymc3/tests/test_shared.py
36-
pymc3/tests/test_smc.py
37-
pymc3/tests/test_sampling.py
38-
pymc3/tests/test_parallel_sampling.py
3937
pymc3/tests/test_dist_math.py
4038
pymc3/tests/test_distribution_defaults.py
41-
pymc3/tests/test_distributions_timeseries.py
39+
pymc3/tests/test_distributions_random.py
40+
pymc3/tests/test_parallel_sampling.py
4241
pymc3/tests/test_random.py
42+
pymc3/tests/test_shared.py
43+
pymc3/tests/test_smc.py
4344
- |
4445
pymc3/tests/test_examples.py
46+
pymc3/tests/test_mixture.py
47+
pymc3/tests/test_ode.py
4548
pymc3/tests/test_posteriors.py
46-
pymc3/tests/test_gp.py
4749
pymc3/tests/test_quadpotential.py
4850
- |
49-
pymc3/tests/test_variational_inference.py
50-
pymc3/tests/test_updates.py
51+
pymc3/tests/test_distributions_timeseries.py
5152
pymc3/tests/test_shape_handling.py
53+
pymc3/tests/test_step.py
54+
pymc3/tests/test_updates.py
55+
pymc3/tests/test_variational_inference.py
56+
- |
57+
pymc3/tests/test_distributions.py
58+
pymc3/tests/test_gp.py
59+
pymc3/tests/test_sampling.py
60+
fail-fast: false
5261
runs-on: ${{ matrix.os }}
5362
env:
5463
TEST_SUBSET: ${{ matrix.test-subset }}
55-
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
64+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
5665
defaults:
5766
run:
5867
shell: bash -l {0}
@@ -61,21 +70,39 @@ jobs:
6170
- name: Cache conda
6271
uses: actions/cache@v1
6372
env:
64-
# Increase this value to reset cache if environment-dev.yml has not changed
73+
# Increase this value to reset cache if environment-dev-py39.yml has not changed
6574
CACHE_NUMBER: 0
6675
with:
6776
path: ~/conda_pkgs_dir
6877
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
69-
hashFiles('environment-dev.yml') }}
78+
hashFiles('conda-envs/environment-dev-py39.yml') }}
79+
- name: Cache multiple paths
80+
uses: actions/cache@v2
81+
env:
82+
# Increase this value to reset cache if requirements.txt has not changed
83+
CACHE_NUMBER: 0
84+
with:
85+
path: |
86+
~/.cache/pip
87+
$RUNNER_TOOL_CACHE/Python/*
88+
~\AppData\Local\pip\Cache
89+
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
90+
hashFiles('requirements.txt') }}
7091
- uses: conda-incubator/setup-miniconda@v2
7192
with:
72-
activate-environment: testenv
93+
activate-environment: pymc3-dev-py39
7394
channel-priority: strict
74-
environment-file: environment-dev.yml
95+
environment-file: conda-envs/environment-dev-py39.yml
7596
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
76-
- run: |
77-
conda activate testenv
78-
python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto
97+
- name: Install-pymc3
98+
run: |
99+
conda activate pymc3-dev-py39
100+
pip install -e .
101+
python --version
102+
- name: Run tests
103+
run: |
104+
conda activate pymc3-dev-py39
105+
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
79106
- name: Upload coverage to Codecov
80107
uses: codecov/codecov-action@v1
81108
with:

.github/workflows/slash_dispatch.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Slash Command Dispatch
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
slashCommandDispatch:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Slash Command Dispatch
10+
uses: peter-evans/slash-command-dispatch@v2
11+
with:
12+
token: ${{ secrets.ACTION_TRIGGER_TOKEN }}
13+
issue-type: pull-request
14+
commands: |
15+
pre-commit-run

.github/workflows/windows.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: windows
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pytest:
10+
strategy:
11+
matrix:
12+
os: [windows-latest]
13+
floatx: [float64]
14+
test-subset:
15+
- pymc3/tests/test_distributions_random.py
16+
- pymc3/tests/test_sampling.py
17+
runs-on: ${{ matrix.os }}
18+
env:
19+
TEST_SUBSET: ${{ matrix.test-subset }}
20+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=core2'
21+
defaults:
22+
run:
23+
shell: bash -l {0}
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Cache conda
27+
uses: actions/cache@v1
28+
env:
29+
# Increase this value to reset cache if conda-envs/environment-dev-py37.yml has not changed
30+
CACHE_NUMBER: 0
31+
with:
32+
path: ~/conda_pkgs_dir
33+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
34+
hashFiles('conda-envs/environment-dev-py37.yml') }}
35+
- name: Cache multiple paths
36+
uses: actions/cache@v2
37+
env:
38+
# Increase this value to reset cache if requirements.txt has not changed
39+
CACHE_NUMBER: 0
40+
with:
41+
path: |
42+
~/.cache/pip
43+
$RUNNER_TOOL_CACHE/Python/*
44+
~\AppData\Local\pip\Cache
45+
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
46+
hashFiles('requirements.txt') }}
47+
- uses: conda-incubator/setup-miniconda@v2
48+
with:
49+
activate-environment: pymc3-dev-py37
50+
channel-priority: strict
51+
environment-file: conda-envs/environment-dev-py37.yml
52+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
53+
- name: Install-pymc3
54+
run: |
55+
conda activate pymc3-dev-py37
56+
pip install -e .
57+
python --version
58+
- run: |
59+
conda activate pymc3-dev-py37
60+
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET

0 commit comments

Comments
 (0)