Skip to content

Commit 15f7a81

Browse files
committed
⬆️ support py39, drop py36
1 parent 70fdcf9 commit 15f7a81

File tree

11 files changed

+18
-24
lines changed

11 files changed

+18
-24
lines changed

.github/workflows/pytest.yml

+6-6
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

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ repos:
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

+2-2
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

+1-1
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

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

+2-4
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

+1-1
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

+1-1
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

+1-1
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

-3
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

-2
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

+2-2
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)