@@ -626,6 +626,44 @@ This will display stderr from the benchmarks, and use your local
626626Information on how to write a benchmark and how to use asv can be found in the
627627`asv documentation <http://asv.readthedocs.org/en/latest/writing_benchmarks.html >`_.
628628
629+ .. _contributing.gbq_integration_tests :
630+
631+ Running Google BigQuery Integration Tests
632+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
633+
634+ You will need to create a Google BigQuery private key in JSON format in
635+ order to run Google BigQuery integration tests on your local machine and
636+ on Travis-CI. The first step is to create a `service account
637+ <https://console.developers.google.com/iam-admin/serviceaccounts/> `__.
638+
639+ Integration tests for ``pandas.io.gbq `` are skipped in pull requests because
640+ the credentials that are required for running Google BigQuery integration
641+ tests are `encrypted <https://docs.travis-ci.com/user/encrypting-files/ >`__
642+ on Travis-CI and are only accessible from the pydata/pandas repository. The
643+ credentials won't be available on forks of pandas. Here are the steps to run
644+ gbq integration tests on a forked repository:
645+
646+ #. First, complete all the steps in the `Encrypting Files Prerequisites
647+ <https://docs.travis-ci.com/user/encrypting-files/> `__ section.
648+ #. Sign into `Travis <https://travis-ci.org/ >`__ using your GitHub account.
649+ #. Enable your forked repository of pandas for testing in `Travis
650+ <https://travis-ci.org/profile/> `__.
651+ #. Run the following command from terminal where the current working directory
652+ is the ``ci `` folder::
653+
654+ ./travis_encrypt_gbq.sh <gbq-json-credentials-file> <gbq-project-id>
655+
656+ #. Create a new branch from the branch used in your pull request. Commit the
657+ encrypted file called ``travis_gbq.json.enc `` as well as the file
658+ ``travis_gbq_config.txt ``, in an otherwise empty commit. DO NOT commit the
659+ ``*.json `` file which contains your unencrypted private key.
660+ #. Your branch should be tested automatically once it is pushed. You can check
661+ the status by visiting your Travis branches page which exists at the
662+ following location: https://travis-ci.org/your-user-name/pandas/branches .
663+ Click on a build job for your branch. Expand the following line in the
664+ build log: ``ci/print_skipped.py /tmp/nosetests.xml `` . Search for the
665+ term ``test_gbq `` and confirm that gbq integration tests are not skipped.
666+
629667Running the vbench performance test suite (phasing out)
630668~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
631669
@@ -814,6 +852,11 @@ updated. Pushing them to GitHub again is done by::
814852This will automatically update your pull request with the latest code and restart the
815853Travis-CI tests.
816854
855+ If your pull request is related to the ``pandas.io.gbq `` module, please see
856+ the section on :ref: `Running Google BigQuery Integration Tests
857+ <contributing.gbq_integration_tests>` to configure a Google BigQuery service
858+ account for your pull request on Travis-CI.
859+
817860Delete your merged branch (optional)
818861------------------------------------
819862
0 commit comments