@@ -105,10 +105,10 @@ want to clone your fork to your machine::
105
105
This creates the directory `pandas-gbq-yourname ` and connects your repository to
106
106
the upstream (main project) *pandas-gbq * repository.
107
107
108
- The testing suite will run automatically on Travis-CI once your pull request is submitted.
108
+ The testing suite will run automatically on CircleCI once your pull request is submitted.
109
109
However, if you wish to run the test suite on a branch prior to submitting the pull request,
110
- then Travis-CI needs to be hooked up to your GitHub repository. Instructions for doing so
111
- are `here <http ://about.travis-ci.org /docs/user /getting-started/ >`__.
110
+ then CircleCI needs to be hooked up to your GitHub repository. Instructions for doing so
111
+ are `here <https ://circleci.com /docs/2.0 /getting-started/ >`__.
112
112
113
113
Creating a branch
114
114
-----------------
@@ -214,11 +214,13 @@ the more common ``PEP8`` issues:
214
214
- we restrict line-length to 79 characters to promote readability
215
215
- passing arguments should have spaces after commas, e.g. ``foo(arg1, arg2, kw1='bar') ``
216
216
217
- Travis-CI will run the `flake8 <http://pypi.python.org/pypi/flake8 >`_ tool
218
- and report any stylistic errors in your code. Therefore, it is helpful before
219
- submitting code to run the check yourself on the diff::
217
+ CircleCI will run the `'black' code formatting tool
218
+ <https://black.readthedocs.io/> `_ and report any stylistic errors in your
219
+ code. Therefore, it is helpful before submitting code to run the formatter
220
+ yourself::
220
221
221
- git diff master | flake8 --diff
222
+ pip install black
223
+ black .
222
224
223
225
Backwards Compatibility
224
226
~~~~~~~~~~~~~~~~~~~~~~~
@@ -287,10 +289,12 @@ directory.
287
289
Running Google BigQuery Integration Tests
288
290
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
289
291
290
- You will need to create a Google BigQuery private key in JSON format in
291
- order to run Google BigQuery integration tests on your local machine and
292
- on Travis-CI. The first step is to create a `service account
293
- <https://console.cloud.google.com/iam-admin/serviceaccounts/> `__.
292
+ You will need to create a Google BigQuery private key in JSON format in order
293
+ to run Google BigQuery integration tests on your local machine and on
294
+ CircleCI. The first step is to create a `service account
295
+ <https://console.cloud.google.com/iam-admin/serviceaccounts/> `__. Grant the
296
+ service account permissions to run BigQuery queries and to create datasets
297
+ and tables.
294
298
295
299
To run the integration tests locally, set the following environment variables
296
300
before running ``pytest ``:
@@ -301,30 +305,30 @@ before running ``pytest``:
301
305
302
306
Integration tests are skipped in pull requests because the credentials that
303
307
are required for running Google BigQuery integration tests are
304
- `encrypted <https://docs.travis-ci.com/user/encrypting-files/ >`__
305
- on Travis-CI and are only accessible from the pydata/pandas-gbq repository. The
306
- credentials won't be available on forks of pandas-gbq. Here are the steps to run
307
- gbq integration tests on a forked repository:
308
-
309
- #. Go to `Travis CI <https://travis-ci.org/ >`__ and sign in with your GitHub
310
- account.
311
- #. Click on the ``+ `` icon next to the ``My Repositories `` list and enable
312
- Travis builds for your fork.
313
- #. Click on the gear icon to edit your travis build, and add two environment
308
+ `configured in the CircleCI web interface
309
+ <https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project> `_
310
+ and are only accessible from the pydata/pandas-gbq repository. The
311
+ credentials won't be available on forks of pandas-gbq. Here are the steps to
312
+ run gbq integration tests on a forked repository:
313
+
314
+ #. Go to `CircleCI <https://circleci.com/dashboard >`__ and sign in with your
315
+ GitHub account.
316
+ #. Switch to your personal account in the top-left organization switcher.
317
+ #. Use the "Add projects" tab to enable CircleCI for your fork.
318
+ #. Click on the gear icon to edit your CircleCI build, and add two environment
314
319
variables:
315
320
316
321
- ``GBQ_PROJECT_ID `` with the value being the ID of your BigQuery project.
317
322
318
- - ``SERVICE_ACCOUNT_KEY `` with the value being the *contents * of the JSON
319
- key that you downloaded for your service account. Use single quotes around
320
- your JSON key to ensure that it is treated as a string.
323
+ - ``SERVICE_ACCOUNT_KEY `` with the value being the base64-encoded
324
+ *contents * of the JSON key that you downloaded for your service account.
321
325
322
- For both environment variables, keep the "Display value in build log" option
323
- DISABLED. These variables contain sensitive data and you do not want their
324
- contents being exposed in build logs.
326
+ Keep the contents of these variables confidential. These variables contain
327
+ sensitive data and you do not want their contents being exposed in build
328
+ logs.
325
329
#. Your branch should be tested automatically once it is pushed. You can check
326
330
the status by visiting your Travis branches page which exists at the
327
- following location: https://travis-ci.org/ your-user-name /pandas-gbq/branches .
331
+ following location: https://circleci.com/gh/ your-username /pandas-gbq .
328
332
Click on a build job for your branch.
329
333
330
334
Documenting your code
0 commit comments