From a3a2d71bfa48bd428c12b66e12b0bb8da69a0be6 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 13:44:50 -0700 Subject: [PATCH 1/9] TST: add mocked job_id for google-cloud-bigquery 0.29 Closes GH#168. --- tests/unit/test_gbq.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_gbq.py b/tests/unit/test_gbq.py index b7febafd..ae1d35c1 100644 --- a/tests/unit/test_gbq.py +++ b/tests/unit/test_gbq.py @@ -20,6 +20,7 @@ def mock_bigquery_client(monkeypatch): mock_client = mock.create_autospec(google.cloud.bigquery.Client) # Mock out SELECT 1 query results. mock_query = mock.create_autospec(google.cloud.bigquery.QueryJob) + mock_query.job_id = 'some-random-id' mock_query.state = 'DONE' mock_rows = mock.create_autospec( google.cloud.bigquery.table.RowIterator) From da4a521d6ad27a2f979de09e3b66772e7a39a9a6 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 14:38:18 -0700 Subject: [PATCH 2/9] TST: upgrade setuptools for namespace package support --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 91287092..7d385a79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ install: # https://github.com/pre-commit/pre-commit/commit/e3ab8902692e896da9ded42bd4d76ea4e1de359d - pyenv install -s $PYENV_VERSION - pyenv global system $PYENV_VERSION + - pip install --upgrade setuptools - REQ="ci/requirements-${PYTHON}-${PANDAS}" ; if [ -f "$REQ.pip" ]; then pip install --upgrade nox-automation ; @@ -33,6 +34,7 @@ install: conda create -q -n test-environment python=$PYTHON ; source activate test-environment ; conda install -q pandas=$PANDAS; + pip install --upgrade setuptools pip install coverage pytest pytest-cov flake8 codecov ; conda install -q --file "$REQ.conda"; conda list ; From e9e6a6c039facd3af5a7eaa466a495174aa75df3 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 15:21:00 -0700 Subject: [PATCH 3/9] TST: upgrade pip for namespace package breakage. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7d385a79..9a62edc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,10 @@ install: # https://github.com/pre-commit/pre-commit/commit/e3ab8902692e896da9ded42bd4d76ea4e1de359d - pyenv install -s $PYENV_VERSION - pyenv global system $PYENV_VERSION + # Upgrade setuptools and pip to work around + # https://github.com/pypa/setuptools/issues/885 - pip install --upgrade setuptools + - pip install --upgrade pip - REQ="ci/requirements-${PYTHON}-${PANDAS}" ; if [ -f "$REQ.pip" ]; then pip install --upgrade nox-automation ; @@ -35,6 +38,7 @@ install: source activate test-environment ; conda install -q pandas=$PANDAS; pip install --upgrade setuptools + pip install --upgrade pip pip install coverage pytest pytest-cov flake8 codecov ; conda install -q --file "$REQ.conda"; conda list ; From d7ed8553b2168ead5f721720682236ae74552e76 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 16:20:22 -0700 Subject: [PATCH 4/9] TST: remove pip commands from conda test environment --- .travis.yml | 3 --- ci/requirements-3.6-0.20.1.conda | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a62edc8..779daf6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,6 @@ install: conda create -q -n test-environment python=$PYTHON ; source activate test-environment ; conda install -q pandas=$PANDAS; - pip install --upgrade setuptools - pip install --upgrade pip - pip install coverage pytest pytest-cov flake8 codecov ; conda install -q --file "$REQ.conda"; conda list ; python setup.py install ; diff --git a/ci/requirements-3.6-0.20.1.conda b/ci/requirements-3.6-0.20.1.conda index e51ca487..5e334ef4 100644 --- a/ci/requirements-3.6-0.20.1.conda +++ b/ci/requirements-3.6-0.20.1.conda @@ -1,3 +1,8 @@ google-auth google-auth-oauthlib google-cloud-bigquery +pytest +pytest-cov +codecov +coverage +flake8 From a2c9dfcacc406405dc27fd5f37b1e2cda760633a Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 16:31:10 -0700 Subject: [PATCH 5/9] TST: remove another pip command from conda tests --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 779daf6d..e6955f0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,6 @@ script: - if [[ $PYTHON == '3.6' ]] && [[ "$PANDAS" == "MASTER" ]]; then nox -s test36master ; fi - REQ="ci/requirements-${PYTHON}-${PANDAS}" ; if [ -f "$REQ.conda" ]; then - pip install pytest ; pytest -v tests ; fi - if [[ $COVERAGE == 'true' ]]; then nox -s cover ; fi From 6f01cf33c2461e9abfe9116b94929ab4d080c2c4 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 16:42:11 -0700 Subject: [PATCH 6/9] TST: add setuptools to conda installation --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e6955f0d..c310d8ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,7 @@ install: conda info -a ; conda create -q -n test-environment python=$PYTHON ; source activate test-environment ; + conda install -q setuptools ; conda install -q pandas=$PANDAS; conda install -q --file "$REQ.conda"; conda list ; From 81280b7361bf183214a11a3d53621e09cc75f257 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 17:48:20 -0700 Subject: [PATCH 7/9] TST: add explicit google-api-core dep to conda build --- ci/requirements-3.6-0.20.1.conda | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/requirements-3.6-0.20.1.conda b/ci/requirements-3.6-0.20.1.conda index 5e334ef4..f2da503e 100644 --- a/ci/requirements-3.6-0.20.1.conda +++ b/ci/requirements-3.6-0.20.1.conda @@ -1,5 +1,6 @@ google-auth google-auth-oauthlib +google-api-core google-cloud-bigquery pytest pytest-cov From 41821e31747f69a2f5b3e4482f8faa5f701d1ca5 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 20:09:28 -0700 Subject: [PATCH 8/9] TST: pin miniconda to specific version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c310d8ca..b30f79aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ install: if [ -f "$REQ.pip" ]; then pip install --upgrade nox-automation ; else - wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + wget http://repo.continuum.io/miniconda/Miniconda3-4.3.30-Linux-x86_64.sh -O miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda ; export PATH="$HOME/miniconda/bin:$PATH" ; hash -r ; From 044d9ac808195bb63d60c1a1a1e583f1bf351312 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 24 Apr 2018 20:21:32 -0700 Subject: [PATCH 9/9] TST: pin google-cloud-bigquery in conda build --- ci/requirements-3.6-0.20.1.conda | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/requirements-3.6-0.20.1.conda b/ci/requirements-3.6-0.20.1.conda index f2da503e..a057399d 100644 --- a/ci/requirements-3.6-0.20.1.conda +++ b/ci/requirements-3.6-0.20.1.conda @@ -1,7 +1,6 @@ google-auth google-auth-oauthlib -google-api-core -google-cloud-bigquery +google-cloud-bigquery==0.32.0 pytest pytest-cov codecov