Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve code coverage when gbq credentials are not provided #20

Closed
parthea opened this issue Mar 4, 2017 · 8 comments
Closed

Improve code coverage when gbq credentials are not provided #20

parthea opened this issue Mar 4, 2017 · 8 comments
Assignees
Labels
type: process A process-related concern. May include testing, release, or the like.

Comments

@parthea
Copy link
Contributor

parthea commented Mar 4, 2017

By default, the majority of pandas-gbq unit tests are skipped on forks of pandas-gbq because Google BigQuery integration testing requires credentials. This causes code coverage to appear low on pull requests from forks. One potential way to increase the code coverage reported in pull requests from forks is to use mock to stub external requests.
https://docs.python.org/3.6/library/unittest.mock.html

@parthea parthea self-assigned this Mar 4, 2017
@jreback
Copy link
Contributor

jreback commented Mar 4, 2017

yeah I realized that now :>

we have a very low check on the PR's anyhow

@jreback jreback added the type: process A process-related concern. May include testing, release, or the like. label Mar 11, 2017
@jreback jreback modified the milestone: 0.3.0 Mar 11, 2017
@jreback jreback removed this from the 0.3.0 milestone Nov 25, 2017
@max-sixty
Copy link
Contributor

max-sixty commented Jan 12, 2018

@tswast is there any interface that Google provides that would allow testing against BQ without an account / with a limited-google-provided-account? At the moment people can't run tests without a google account (and given #109, without downloading a json file and putting it in a specific path)

@tswast
Copy link
Collaborator

tswast commented Jan 16, 2018

A local emulator would be a good way to provide such a use-case. Google has them for some services like Bigtable and Cloud Pub/Sub, but there isn't one for BigQuery.

@max-sixty
Copy link
Contributor

OK thanks.
This might be a long-shot, but do you think Google might be willing to provide some keys we could put in the repository so, for example, any PR pushed to Travis would test?

@tswast
Copy link
Collaborator

tswast commented Jan 17, 2018

I believe this project already has some secret keys used to build on merge.

Some CI systems allow accessing secret keys after a PR from a fork has been manually reviewed by adding a GitHub tag/label to the PR. I don't believe Travis has this feature, though.

@max-sixty
Copy link
Contributor

ok thx

@tswast tswast mentioned this issue Jan 28, 2018
@max-sixty
Copy link
Contributor

Unfortunately I don't think there's a BigQuery mocking library like there is with some other Google products. I agree that would radically improve the testing iteration.

But until then, I propose to close this as out-of-scope; unless people think I'm overestimating how difficult it would be to build the mocks

@tswast
Copy link
Collaborator

tswast commented Aug 21, 2018

Yeah, no BigQuery emulator. It does make unit testing annoying / infeasible.

@tswast tswast closed this as completed Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

4 participants