Closed andreamoro closed 4 years ago
Hey @andreamoro, really interesting point to touch on.
The auth.creds
module contains the credentials (including the webproperty_uri
string and client_secrets
and credentials
dictionaries) used in the tests in tests.py
.
If you want to run the tests on your local computer, you would need to create your own auth
package and include a creds
module with your own credentials:
"""
Example auth.creds.py
"""
webproperty_uri = 'https://www.example.com'
client_secrets = {
'installed': {
...
}
}
credentials = {
'token': 'xxxxxxxxxxxx',
...
}
Here, the tests run whenever something is merged onto the master branch using Travis CI. I obviously want to keep the credentials I'm using secret so the auth
package is encrypted to auth.tar.enc
and decrypted by Travis CI when it runs.
Does that make sense?
Haven't really plaid with Travis my end ... though I'm not sure this was the problem as I did create the auth token file. By just playing around beyond the test app and recreating a minimal script I was able to use the wrapper u created, so the issue somewhere is in the Demo package?
Yeah, you only really need to know about the auth
package if you want to run the tests in tests.py
. Those are unit tests checking that the package works correctly, as opposed to being a demo. I could definitely improve the documentation to make that and the above clearer.
If you just want to make queries from a script, I'd encourage you to install the package with pip rather than cloning the repository. Is that what you're doing?
Not sure it's just me being a dumb, but I can't see any reference to a auth.creds package not a webproperty_uri module. Not even sure what they are meant to do, but a raw clone of this repo doesn't run out of the box.