Skip to content

TST: refactor pip tests to use constraints files #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ jobs:
steps:
- checkout
- run: ci/config_auth.sh
- run: nox -s unit-3.6 system-3.6
- run: nox -s unit-3.6

"pip-3.7":
docker:
- image: thekevjames/nox
steps:
- checkout
- run: ci/config_auth.sh
- run: nox -s unit-3.7 system-3.7 cover
- run: nox -s unit-3.7

"pip-3.8":
docker:
- image: thekevjames/nox
steps:
- checkout
- run: ci/config_auth.sh
- run: nox -s unit-3.8 system-3.8 cover

"lint":
docker:
Expand All @@ -47,11 +55,11 @@ jobs:
- checkout
- run: ci/config_auth.sh
- run: ci/run_conda.sh
"conda-3.7-NIGHTLY":
"conda-3.8-NIGHTLY":
docker:
- image: continuumio/miniconda3
environment:
PYTHON: "3.7"
PYTHON: "3.8"
PANDAS: "NIGHTLY"
steps:
- checkout
Expand All @@ -65,6 +73,7 @@ workflows:
- "pip-3.5"
- "pip-3.6"
- "pip-3.7"
- "pip-3.8"
- lint
- "conda-3.6-0.20.1"
- "conda-3.7-NIGHTLY"
- "conda-3.8-NIGHTLY"
2 changes: 1 addition & 1 deletion ci/requirements-3.5.pip → ci/constraints-3.5.pip
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy==1.13.3
pandas==0.19.0
pandas==0.20.1
google-auth==1.4.1
google-auth-oauthlib==0.0.1
google-cloud-bigquery==1.11.1
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions ci/constraints-3.8.pip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pandas
File renamed without changes.
19 changes: 17 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Changelog
=========

.. _changelog-0.14.0:

0.14.0 / TBD
------------

Dependency updates
~~~~~~~~~~~~~~~~~~

- Update the minimum version of ``pandas`` to 0.20.1.
(:issue:`331`)

Internal changes
~~~~~~~~~~~~~~~~

- Update tests to run against for Python 3.8. (:issue:`331`)


.. _changelog-0.13.3:

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


.. _changelog-0.13.2:

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


.. _changelog-0.13.0:

0.13.0 / 2019-12-12
Expand Down
27 changes: 16 additions & 11 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
import nox


supported_pythons = ["3.5", "3.6", "3.7"]
latest_python = "3.7"
supported_pythons = ["3.5", "3.6", "3.7", "3.8"]
system_test_pythons = ["3.5", "3.8"]
latest_python = "3.8"

# Use a consistent version of black so CI is deterministic.
black_package = "black==19.10b0"
Expand All @@ -35,7 +36,14 @@ def blacken(session):
@nox.session(python=supported_pythons)
def unit(session):
session.install("pytest", "pytest-cov")
session.install("-e", ".")
session.install(
"-e",
".",
# Use dependencies versions from constraints file. This enables testing
# across a more full range of versions of the dependencies.
"-c",
os.path.join(".", "ci", "constraints-{}.pip".format(session.python)),
)
session.run(
"pytest",
os.path.join(".", "tests", "unit"),
Expand Down Expand Up @@ -77,19 +85,16 @@ def docs(session):
)


@nox.session(python=supported_pythons)
@nox.session(python=system_test_pythons)
def system(session):
session.install("pytest", "pytest-cov")
session.install(
"-r",
os.path.join(".", "ci", "requirements-{}.pip".format(session.python)),
)
session.install(
"-e",
".",
# Use dependencies from requirements file instead.
# This enables testing with specific versions of the dependencies.
"--no-dependencies",
# Use dependencies versions from constraints file. This enables testing
# across a more full range of versions of the dependencies.
"-c",
os.path.join(".", "ci", "constraints-{}.pip".format(session.python)),
)

# Skip local auth tests on CI.
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def readme():

INSTALL_REQUIRES = [
"setuptools",
"pandas>=0.19.0",
"pandas>=0.20.1",
"pydata-google-auth",
"google-auth",
"google-auth-oauthlib",
Expand Down Expand Up @@ -47,6 +47,7 @@ def readme():
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
],
keywords="data",
Expand Down