Skip to content

Commit 25f6108

Browse files
Merge latest master & clean up release notes conflict
2 parents 3ff4959 + dbcc49e commit 25f6108

14 files changed

+76
-28
lines changed
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/pytest.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ jobs:
7070
- name: Cache conda
7171
uses: actions/cache@v1
7272
env:
73-
# Increase this value to reset cache if environment-dev-py36.yml has not changed
73+
# Increase this value to reset cache if environment-dev-py39.yml has not changed
7474
CACHE_NUMBER: 0
7575
with:
7676
path: ~/conda_pkgs_dir
7777
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
78-
hashFiles('conda-envs/environment-dev-py36.yml') }}
78+
hashFiles('conda-envs/environment-dev-py39.yml') }}
7979
- name: Cache multiple paths
8080
uses: actions/cache@v2
8181
env:
@@ -90,18 +90,18 @@ jobs:
9090
hashFiles('requirements.txt') }}
9191
- uses: conda-incubator/setup-miniconda@v2
9292
with:
93-
activate-environment: pymc3-dev-py36
93+
activate-environment: pymc3-dev-py39
9494
channel-priority: strict
95-
environment-file: conda-envs/environment-dev-py36.yml
95+
environment-file: conda-envs/environment-dev-py39.yml
9696
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
9797
- name: Install-pymc3
9898
run: |
99-
conda activate pymc3-dev-py36
99+
conda activate pymc3-dev-py39
100100
pip install -e .
101101
python --version
102102
- name: Run tests
103103
run: |
104-
conda activate pymc3-dev-py36
104+
conda activate pymc3-dev-py39
105105
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
106106
- name: Upload coverage to Codecov
107107
uses: codecov/codecov-action@v1

.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

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ repos:
1414
exclude: ^requirements-dev\.txt$
1515
- id: trailing-whitespace
1616
- repo: https://github.com/nbQA-dev/nbQA
17-
rev: 0.5.4
17+
rev: 0.5.5
1818
hooks:
1919
- id: nbqa-black
2020
additional_dependencies: [black==20.8b1]
2121
- id: nbqa-isort
2222
additional_dependencies: [isort==5.6.4]
2323
- id: nbqa-pyupgrade
2424
additional_dependencies: [pyupgrade==2.7.4]
25+
args: [--py37-plus]
2526
- repo: https://github.com/PyCQA/isort
2627
rev: 5.6.4
2728
hooks:
@@ -31,7 +32,7 @@ repos:
3132
rev: v2.7.4
3233
hooks:
3334
- id: pyupgrade
34-
args: [--py36-plus]
35+
args: [--py37-plus]
3536
- repo: https://github.com/psf/black
3637
rev: 20.8b1
3738
hooks:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ The preferred workflow for contributing to PyMC3 is to fork the [GitHub reposito
4848
4. Project requirements are in ``requirements.txt``, and libraries used for development are in ``requirements-dev.txt``. The easiest (and recommended) way to set up a development environment is via [miniconda](https://docs.conda.io/en/latest/miniconda.html):
4949

5050
```bash
51-
$ conda env create -f conda-envs/environment-dev-py36.yml # or py37 or py38
52-
$ conda activate pymc3-dev-py36
51+
$ conda env create -f conda-envs/environment-dev-py37.yml # or py38 or py39
52+
$ conda activate pymc3-dev-py37
5353
$ pip install -e .
5454
```
5555

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Dependencies
120120
============
121121

122122
PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__,
123-
NumPy, SciPy, and Pandas
123+
NumPy, SciPy, and pandas
124124
(see `requirements.txt <https://github.com/pymc-devs/pymc3/blob/master/requirements.txt>`__ for version
125125
information).
126126

RELEASE-NOTES.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@ This release breaks some APIs w.r.t. `3.10.0`.
55
It also brings some dreadfully awaited fixes, so be sure to go through the changes below.
66
(Or latest when you run into problems.)
77

8-
### Maintenance
8+
### Breaking Changes
9+
- Python 3.6 support was dropped (by no longer testing) and Python 3.9 was added (see [#4332](https://github.com/pymc-devs/pymc3/pull/4332)).
910
- Changed shape behavior: __No longer collapse length 1 vector shape into scalars.__ (see [#4206](https://github.com/pymc-devs/pymc3/issue/4206) and [#4214](https://github.com/pymc-devs/pymc3/pull/4214))
1011
- __Applies to random variables and also the `.random(size=...)` kwarg!__
1112
- To create scalar variables you must now use `shape=None` or `shape=()`.
1213
- __`shape=(1,)` and `shape=1` now become vectors.__ Previously they were collapsed into scalars
1314
- 0-length dimensions are now ruled illegal for random variables and raise a `ValueError`.
15+
- In `sample_prior_predictive` the `vars` kwarg was removed in favor of `var_names` (see [#4327](https://github.com/pymc-devs/pymc3/pull/4327)).
16+
- Removed `theanof.set_theano_config` because it illegally touched Theano's privates (see [#4329](https://github.com/pymc-devs/pymc3/pull/4329)).
17+
18+
### New Features
19+
- ...
20+
21+
### Maintenance
1422
- Fixed bug whereby partial traces returns after keyboard interrupt during parallel sampling had fewer draws than would've been available [#4318](https://github.com/pymc-devs/pymc3/pull/4318)
1523
- Make `sample_shape` same across all contexts in `draw_values` (see [#4305](https://github.com/pymc-devs/pymc3/pull/4305)).
16-
- Removed `theanof.set_theano_config` because it illegally touched Theano's privates (see [#4329](https://github.com/pymc-devs/pymc3/pull/4329)).
17-
- In `sample_prior_predictive` the `vars` kwarg was removed in favor of `var_names` (see [#4327](https://github.com/pymc-devs/pymc3/pull/4327))
1824

1925

2026
## PyMC3 3.10.0 (7 December 2020)

conda-envs/environment-dev-py36.yml renamed to conda-envs/environment-dev-py39.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: pymc3-dev-py36
1+
name: pymc3-dev-py39
22
channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- contextvars
7-
- dataclasses
86
- h5py>=2.7
97
- ipython>=7.16
108
- libblas=*=*mkl
@@ -15,7 +13,7 @@ dependencies:
1513
- pytest-cov>=2.5
1614
- pytest>=3.0
1715
- python-graphviz
18-
- python=3.6
16+
- python=3.9
1917
- recommonmark>=0.4
2018
- sphinx-autobuild>=0.7
2119
- sphinx>=1.5

pymc3/backends/tracetab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
def trace_to_dataframe(trace, chains=None, varnames=None, include_transformed=False):
29-
"""Convert trace to Pandas DataFrame.
29+
"""Convert trace to pandas DataFrame.
3030
3131
Parameters
3232
----------

pymc3/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class Data:
462462
A value to associate with this variable
463463
dims: {str, tuple of str}, optional, default=None
464464
Dimension names of the random variables (as opposed to the shapes of these
465-
random variables). Use this when `value` is a Pandas Series or DataFrame. The
465+
random variables). Use this when `value` is a pandas Series or DataFrame. The
466466
`dims` will then be the name of the Series / DataFrame's columns. See ArviZ
467467
documentation for more information about dimensions and coordinates:
468468
https://arviz-devs.github.io/arviz/notebooks/Introduction.html

pymc3/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ def init_value(self):
16821682

16831683

16841684
def pandas_to_array(data):
1685-
"""Convert a Pandas object to a NumPy array.
1685+
"""Convert a pandas object to a NumPy array.
16861686
16871687
XXX: When `data` is a generator, this will return a Theano tensor!
16881688

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ exclude_lines = [
1212
isort = 1
1313
black = 1
1414
pyupgrade = 1
15-
16-
[tool.nbqa.addopts]
17-
pyupgrade = ["--py36-plus"]

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
arviz>=0.9.0
2-
contextvars; python_version < '3.7'
3-
dataclasses; python_version < '3.7'
42
dill
53
fastprogress>=0.2.0
64
numpy>=1.13.0

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"Development Status :: 5 - Production/Stable",
3131
"Programming Language :: Python",
3232
"Programming Language :: Python :: 3",
33-
"Programming Language :: Python :: 3.6",
3433
"Programming Language :: Python :: 3.7",
3534
"Programming Language :: Python :: 3.8",
35+
"Programming Language :: Python :: 3.9",
3636
"License :: OSI Approved :: Apache Software License",
3737
"Intended Audience :: Science/Research",
3838
"Topic :: Scientific/Engineering",
@@ -82,7 +82,7 @@ def get_version():
8282
# package_data={'docs': ['*']},
8383
include_package_data=True,
8484
classifiers=classifiers,
85-
python_requires=">=3.6",
85+
python_requires=">=3.7",
8686
install_requires=install_reqs,
8787
tests_require=test_reqs,
8888
test_suite="nose.collector",

0 commit comments

Comments
 (0)