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

DOC: Improve the documentation for running integration tests locally #27

Closed
tswast opened this issue Apr 19, 2017 · 7 comments
Closed

Comments

@tswast
Copy link
Collaborator

tswast commented Apr 19, 2017

I'd love to see a TESTING.md file that showed how to run the tests locally before sending off a PR.

I can run pytest but is that running the integration tests, too? It seemed to run a bit fast for that to be the case.

@jreback
Copy link
Contributor

jreback commented Apr 20, 2017

http://pandas-gbq.readthedocs.io/en/latest/contributing.html

is pretty comprehensive

@jreback jreback closed this as completed Apr 20, 2017
@jreback
Copy link
Contributor

jreback commented Apr 20, 2017

of course if u think it needs updates then pls send a PR

@parthea
Copy link
Contributor

parthea commented Apr 20, 2017

I set the following when running integration tests locally:

PROJECT_ID = None
PRIVATE_KEY_JSON_PATH = None
PRIVATE_KEY_JSON_CONTENTS = None

I scanned through the contributing docs and it appears that this step is missing (it wasn't in the pandas contributing docs either). I'll re-open this issue so we can update the docs.

https://github.com/pydata/pandas-gbq/blob/master/pandas_gbq/tests/test_gbq.py#L22

@parthea parthea reopened this Apr 20, 2017
@parthea parthea changed the title How to run integration tests locally? DOC: Improve the documentation when running integration tests locally Apr 20, 2017
@parthea
Copy link
Contributor

parthea commented Apr 20, 2017

@tswast The integration tests are skipped if you do not provide credentials/project id . I'm open to improving the local integration testing process as well. Some users may not want to use their default gcloud credentials to run pandas-gbq integration tests but another alternative could be to use environment variables, or have a separate file for PROJECT_ID, PRIVATE_KEY_JSON_PATH and PRIVATE_KEY_JSON_CONTENTS . Thoughts?

@parthea parthea changed the title DOC: Improve the documentation when running integration tests locally DOC: Improve the documentation for running integration tests locally Apr 20, 2017
@tswast
Copy link
Collaborator Author

tswast commented Apr 20, 2017

That makes sense to skip, even if default gcloud credentials are available. I'll try running through the current workflow this morning to see how it goes.

@tswast
Copy link
Collaborator Author

tswast commented Apr 20, 2017

Question: Does it make any sense to populate PRIVATE_KEY_JSON_PATH but not PRIVATE_KEY_JSON_CONTENTS?

I'm thinking of always loading the contents of the key file in _get_private_key_contents.

@parthea
Copy link
Contributor

parthea commented Apr 20, 2017

@tswast You're right. It seems redundant to have PRIVATE_KEY_JSON_CONTENTS in test_gbq.py since we could read Json from the file in PRIVATE_KEY_JSON_PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants