Add the steps to setup gbq integration testing to the contributing docs
State: closed

Pull requests from forked repositories cannot access the existing secure Google BigQuery credentials which are on Travis at pydata/pandas. In order for contributors to run Google BigQuery integration tests on Travis, they need to create a pull request on their forked repository of pandas with their own secure Google BigQuery credentials. 

I've updated the contributing documentation to include the steps required to run Google BigQuery integration tests on a forked repository of pandas.


Labels:

Comments:
any easier way to do this?

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/14144?src=pr) is 85.25% (diff: 100%)

> Merging [#14144](https://codecov.io/gh/pydata/pandas/pull/14144?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #14144   diff @@
==========================================
  Files           139        139          
  Lines         50496      50502     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43049      43058     +9   
+ Misses         7447       7444     -3   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [8023029...6383bba](https://codecov.io/gh/pydata/pandas/compare/80230292e19e377f5b11409e112500b6a180e18a...6383bbafed08b6fb10f333dbc2bb30c216cd5f3f?src=pr)

> any easier way to do this?

The easiest way is to use the existing encrypted credentials that are already on Travis, but we would need to create a branch from master each time. If we don't use existing credentials, then we need to ask contributors to create their own encrypted credentials. Should I consolidate text and reduce the number of steps? (For example, assume that users already know how to create BigQuery credentials in JSON format?)

> The easiest way is to use the existing encrypted credentials that are already on Travis, but we would need to create a branch from master each time. 

what does this mean? most branches are forks of master

Sorry that I wasn't clear.  I meant to say that we would need to create a branch from pydata/pandas which is not on a fork. The credentials can only be encrypted/decrypted from the same repo (not fork).

For example: 
The credentials can be decrypted when the PR shows:
`parthea  wants to merge 2 commits into master from enable-gbq-unit-tests`
but cannot be decrypted when the PR shows:
`parthea  wants to merge 2 commits into pydata:master from parthea:enable-gbq-unit-tests`

ok I c. another (maybe easier option), is to have the travis secure key embedded in a file, then we _could_ have a script which a user could run to take there credentials and update the encoded credentials file and the key very easily. (and of course make sure to exclude them from being added to the repo).

is this the 'name' of the secure key that we have? "$encrypted_1d9d7b1f171b_iv" 

Yes, that is the name of the environment variables `encrypted_1d9d7b1f171b_iv` and `encrypted_1d9d7b1f171b_key` which contain the private iv and key, which is only available on the travis repo that encrypted the file. Each repo has a different environment variable.

You're right. It makes sense to automate these steps. I'll put together a script in order to reduce the steps.

@parthea Good to document this!

Some general comments:
-  can you clarify that we only expect to do this from contributors if they are doing a PR related to the gbq module
- I would make it a separate section (and maybe put it at the end), and then refer to this section from the sections on running tests

this is not mergeable ATM / see above comments

@jreback @jorisvandenbossche All gbq tests passed at parthea/pandas#3. I've moved gbq integration testing to a separate section in the contributing docs. Please take a look.

lgtm.

Small further question, otherwise looks good!

Here is a link to the build from my branch which has my encrypted credentials so that gbq test are not skipped.  https://travis-ci.org/parthea/pandas/jobs/158060278

@parthea Nice, thanks a lot!