diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a92996cd..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-language: python
-
-matrix:
- include:
- - os: linux
- python: 2.7
- env: PYTHON=2.7 PANDAS=0.19.2 COVERAGE='false' LINT='false'
- - os: linux
- python: 3.5
- env: PYTHON=3.5 PANDAS=0.18.1 COVERAGE='true' LINT='false'
- # https://github.com/pydata/pandas-gbq/issues/189
- # - os: linux
- # python: 3.6
- # env: PYTHON=3.6 PANDAS=0.20.1 COVERAGE='false' LINT='false'
- - os: linux
- python: 3.6
- env: PYTHON=3.6 PANDAS=MASTER COVERAGE='false' LINT='true'
-env:
-
-before_install:
- - echo "before_install"
- - source ci/travis_process_gbq_encryption.sh
-
-install:
- # 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 ;
- else
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda ;
- export PATH="$HOME/miniconda/bin:$PATH" ;
- hash -r ;
- conda config --set always_yes yes --set changeps1 no ;
- conda config --add channels pandas ;
- conda config --add channels conda-forge ;
- conda update -q conda ;
- 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 ;
- python setup.py install ;
- fi
-
-script:
- - if [[ $PYTHON == '2.7' ]]; then
- pip install -r ci/requirements-2.7-0.19.2.pip ;
- pip install -e . ;
- pytest tests/unit ;
- fi
- - if [[ $PYTHON == '3.5' ]]; then nox -s test_earliest_deps ; fi
- - if [[ $PYTHON == '3.6' ]] && [[ "$PANDAS" == "MASTER" ]]; then nox -s test_latest_deps ; fi
- - REQ="ci/requirements-${PYTHON}-${PANDAS}" ;
- if [ -f "$REQ.conda" ]; then
- pytest --quiet -m 'not local_auth' -v tests ;
- fi
- - if [[ $COVERAGE == 'true' ]]; then nox -s cover ; fi
- - if [[ $LINT == 'true' ]]; then nox -s lint ; fi
diff --git a/README.rst b/README.rst
index 87a1cbdc..93c87f39 100644
--- a/README.rst
+++ b/README.rst
@@ -37,8 +37,8 @@ Usage
See the `pandas-gbq documentation `_ for more details.
-.. |Build Status| image:: https://travis-ci.org/pydata/pandas-gbq.svg?branch=master
- :target: https://travis-ci.org/pydata/pandas-gbq
+.. |Build Status| image:: https://circleci.com/gh/pydata/pandas-gbq/tree/master.svg?style=svg
+ :target: https://circleci.com/gh/pydata/pandas-gbq/tree/master
.. |Version Status| image:: https://img.shields.io/pypi/v/pandas-gbq.svg
:target: https://pypi.python.org/pypi/pandas-gbq/
.. |Coverage Status| image:: https://img.shields.io/codecov/c/github/pydata/pandas-gbq.svg
diff --git a/ci/travis_encrypt_gbq.sh b/ci/travis_encrypt_gbq.sh
deleted file mode 100755
index e404ca73..00000000
--- a/ci/travis_encrypt_gbq.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-GBQ_JSON_FILE=$1
-
-if [[ $# -ne 1 ]]; then
- echo -e "Too few arguments.\nUsage: ./travis_encrypt_gbq.sh "\
- ""
- exit 1
-fi
-
-if [[ $GBQ_JSON_FILE != *.json ]]; then
- echo "ERROR: Expected *.json file"
- exit 1
-fi
-
-if [[ ! -f $GBQ_JSON_FILE ]]; then
- echo "ERROR: File $GBQ_JSON_FILE does not exist"
- exit 1
-fi
-
-echo "Encrypting $GBQ_JSON_FILE..."
-read -d "\n" TRAVIS_KEY TRAVIS_IV <<<$(travis encrypt-file $GBQ_JSON_FILE \
-travis_gbq.json.enc -f | grep -o "\w*_iv\|\w*_key");
-
-echo "Adding your secure key to travis_gbq_config.txt ..."
-echo -e "TRAVIS_IV_ENV=$TRAVIS_IV\nTRAVIS_KEY_ENV=$TRAVIS_KEY"\
-> travis_gbq_config.txt
-
-echo "Done. Removing file $GBQ_JSON_FILE"
-rm $GBQ_JSON_FILE
-
-echo -e "Created encrypted credentials file travis_gbq.json.enc.\n"\
- "NOTE: Do NOT commit the *.json file containing your unencrypted" \
- "private key"
diff --git a/ci/travis_gbq.json.enc b/ci/travis_gbq.json.enc
deleted file mode 100644
index 6c6735b1..00000000
Binary files a/ci/travis_gbq.json.enc and /dev/null differ
diff --git a/ci/travis_gbq_config.txt b/ci/travis_gbq_config.txt
deleted file mode 100644
index fe22dbed..00000000
--- a/ci/travis_gbq_config.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-TRAVIS_IV_ENV=encrypted_53f0a3897064_iv
-TRAVIS_KEY_ENV=encrypted_53f0a3897064_key
diff --git a/ci/travis_process_gbq_encryption.sh b/ci/travis_process_gbq_encryption.sh
deleted file mode 100644
index 9967d40e..00000000
--- a/ci/travis_process_gbq_encryption.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-source ci/travis_gbq_config.txt
-
-if [[ -n ${SERVICE_ACCOUNT_KEY} ]]; then
- echo "${SERVICE_ACCOUNT_KEY}" > ci/travis_gbq.json;
-elif [[ -n ${!TRAVIS_IV_ENV} ]]; then
- openssl aes-256-cbc -K ${!TRAVIS_KEY_ENV} -iv ${!TRAVIS_IV_ENV} \
- -in ci/travis_gbq.json.enc -out ci/travis_gbq.json -d;
- export GBQ_PROJECT_ID='pandas-travis';
- echo 'Successfully decrypted gbq credentials'
-fi
-
diff --git a/tests/system/conftest.py b/tests/system/conftest.py
index cd5a89be..5091d717 100644
--- a/tests/system/conftest.py
+++ b/tests/system/conftest.py
@@ -16,11 +16,7 @@ def project_id():
@pytest.fixture(scope="session")
def private_key_path():
path = None
- if "TRAVIS_BUILD_DIR" in os.environ:
- path = os.path.join(
- os.environ["TRAVIS_BUILD_DIR"], "ci", "travis_gbq.json"
- )
- elif "GBQ_GOOGLE_APPLICATION_CREDENTIALS" in os.environ:
+ if "GBQ_GOOGLE_APPLICATION_CREDENTIALS" in os.environ:
path = os.environ["GBQ_GOOGLE_APPLICATION_CREDENTIALS"]
elif "GOOGLE_APPLICATION_CREDENTIALS" in os.environ:
path = os.environ["GOOGLE_APPLICATION_CREDENTIALS"]
diff --git a/tests/system/test_gbq.py b/tests/system/test_gbq.py
index 9ae1fbf2..dde34cb1 100644
--- a/tests/system/test_gbq.py
+++ b/tests/system/test_gbq.py
@@ -297,14 +297,16 @@ def test_should_properly_handle_nullable_doubles(self, project_id):
)
def test_should_properly_handle_null_floats(self, project_id):
- query = "SELECT FLOAT(NULL) AS null_float"
+ query = """SELECT null_float
+ FROM UNNEST(ARRAY[NULL, 1.0]) AS null_float
+ """
df = gbq.read_gbq(
query,
project_id=project_id,
credentials=self.credentials,
- dialect="legacy",
+ dialect="standard",
)
- tm.assert_frame_equal(df, DataFrame({"null_float": [np.nan]}))
+ tm.assert_frame_equal(df, DataFrame({"null_float": [np.nan, 1.0]}))
def test_should_properly_handle_timestamp_unix_epoch(self, project_id):
query = 'SELECT TIMESTAMP("1970-01-01 00:00:00") AS unix_epoch'