Skip to content

Commit a677d2e

Browse files
authored
TST: refactor pip tests to use constraints files (#331)
* TST: refactor pip tests to use constraints files Realized that tests were failing on Python 3.5 with the specified versions and bumped the minimum pandas version to 0.20.1 (for [pandas.testing](https://stackoverflow.com/a/53631895/101923) support). Added tests to run against Python 3.8 (just in time for Python 3.9 to come out next week!) * update changelog * update circleci config
1 parent a9cd0fc commit a677d2e

File tree

9 files changed

+51
-20
lines changed

9 files changed

+51
-20
lines changed

.circleci/config.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,23 @@ jobs:
1515
steps:
1616
- checkout
1717
- run: ci/config_auth.sh
18-
- run: nox -s unit-3.6 system-3.6
18+
- run: nox -s unit-3.6
1919

2020
"pip-3.7":
2121
docker:
2222
- image: thekevjames/nox
2323
steps:
2424
- checkout
2525
- run: ci/config_auth.sh
26-
- run: nox -s unit-3.7 system-3.7 cover
26+
- run: nox -s unit-3.7
27+
28+
"pip-3.8":
29+
docker:
30+
- image: thekevjames/nox
31+
steps:
32+
- checkout
33+
- run: ci/config_auth.sh
34+
- run: nox -s unit-3.8 system-3.8 cover
2735

2836
"lint":
2937
docker:
@@ -47,11 +55,11 @@ jobs:
4755
- checkout
4856
- run: ci/config_auth.sh
4957
- run: ci/run_conda.sh
50-
"conda-3.7-NIGHTLY":
58+
"conda-3.8-NIGHTLY":
5159
docker:
5260
- image: continuumio/miniconda3
5361
environment:
54-
PYTHON: "3.7"
62+
PYTHON: "3.8"
5563
PANDAS: "NIGHTLY"
5664
steps:
5765
- checkout
@@ -65,6 +73,7 @@ workflows:
6573
- "pip-3.5"
6674
- "pip-3.6"
6775
- "pip-3.7"
76+
- "pip-3.8"
6877
- lint
6978
- "conda-3.6-0.20.1"
70-
- "conda-3.7-NIGHTLY"
79+
- "conda-3.8-NIGHTLY"

ci/requirements-3.5.pip renamed to ci/constraints-3.5.pip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
numpy==1.13.3
2-
pandas==0.19.0
2+
pandas==0.20.1
33
google-auth==1.4.1
44
google-auth-oauthlib==0.0.1
55
google-cloud-bigquery==1.11.1
File renamed without changes.
File renamed without changes.

ci/constraints-3.8.pip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pandas
File renamed without changes.

docs/source/changelog.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Changelog
22
=========
33

4+
.. _changelog-0.14.0:
5+
6+
0.14.0 / TBD
7+
------------
8+
9+
Dependency updates
10+
~~~~~~~~~~~~~~~~~~
11+
12+
- Update the minimum version of ``pandas`` to 0.20.1.
13+
(:issue:`331`)
14+
15+
Internal changes
16+
~~~~~~~~~~~~~~~~
17+
18+
- Update tests to run against for Python 3.8. (:issue:`331`)
19+
20+
421
.. _changelog-0.13.3:
522

623
0.13.3 / 2020-09-30
@@ -9,7 +26,6 @@ Changelog
926
- Include needed "extras" from ``google-cloud-bigquery`` package as
1027
dependencies. Exclude incompatible 2.0 version. (:issue:`324`, :issue:`329`)
1128

12-
1329
.. _changelog-0.13.2:
1430

1531
0.13.2 / 2020-05-14
@@ -26,7 +42,6 @@ Changelog
2642
- Fix ``AttributeError`` with BQ Storage API to download empty results.
2743
(:issue:`299`)
2844

29-
3045
.. _changelog-0.13.0:
3146

3247
0.13.0 / 2019-12-12

noxfile.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
import nox
1111

1212

13-
supported_pythons = ["3.5", "3.6", "3.7"]
14-
latest_python = "3.7"
13+
supported_pythons = ["3.5", "3.6", "3.7", "3.8"]
14+
system_test_pythons = ["3.5", "3.8"]
15+
latest_python = "3.8"
1516

1617
# Use a consistent version of black so CI is deterministic.
1718
black_package = "black==19.10b0"
@@ -35,7 +36,14 @@ def blacken(session):
3536
@nox.session(python=supported_pythons)
3637
def unit(session):
3738
session.install("pytest", "pytest-cov")
38-
session.install("-e", ".")
39+
session.install(
40+
"-e",
41+
".",
42+
# Use dependencies versions from constraints file. This enables testing
43+
# across a more full range of versions of the dependencies.
44+
"-c",
45+
os.path.join(".", "ci", "constraints-{}.pip".format(session.python)),
46+
)
3947
session.run(
4048
"pytest",
4149
os.path.join(".", "tests", "unit"),
@@ -77,19 +85,16 @@ def docs(session):
7785
)
7886

7987

80-
@nox.session(python=supported_pythons)
88+
@nox.session(python=system_test_pythons)
8189
def system(session):
8290
session.install("pytest", "pytest-cov")
83-
session.install(
84-
"-r",
85-
os.path.join(".", "ci", "requirements-{}.pip".format(session.python)),
86-
)
8791
session.install(
8892
"-e",
8993
".",
90-
# Use dependencies from requirements file instead.
91-
# This enables testing with specific versions of the dependencies.
92-
"--no-dependencies",
94+
# Use dependencies versions from constraints file. This enables testing
95+
# across a more full range of versions of the dependencies.
96+
"-c",
97+
os.path.join(".", "ci", "constraints-{}.pip".format(session.python)),
9398
)
9499

95100
# Skip local auth tests on CI.

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def readme():
1818

1919
INSTALL_REQUIRES = [
2020
"setuptools",
21-
"pandas>=0.19.0",
21+
"pandas>=0.20.1",
2222
"pydata-google-auth",
2323
"google-auth",
2424
"google-auth-oauthlib",
@@ -47,6 +47,7 @@ def readme():
4747
"Programming Language :: Python :: 3.5",
4848
"Programming Language :: Python :: 3.6",
4949
"Programming Language :: Python :: 3.7",
50+
"Programming Language :: Python :: 3.8",
5051
"Topic :: Scientific/Engineering",
5152
],
5253
keywords="data",

0 commit comments

Comments
 (0)