fluves / pywaterinfo

Python package to download time series data from waterinfo.be
https://fluves.github.io/pywaterinfo/
MIT License
17 stars 9 forks source link

Fix requests retention #41

Closed stijnvanhoey closed 3 years ago

stijnvanhoey commented 3 years ago

Current weekly builds fail due to updates in the requests-cache package to cache the URL's. This PR updates the unit tests and make sure current code is in line with the new version while keeping the functionality for pywaterinfo the same.

github-actions[bot] commented 3 years ago

Binder :point_left: Launch a binder notebook on this branch

stijnvanhoey commented 3 years ago

@binomaiheu currently, the tests fail due to exceedence of token credit, https://github.com/fluves/pywaterinfo/runs/3597334032?check_suite_focus=true#step:6:252 something you can help with? ;-)

binomaiheu commented 3 years ago

Sure, let me check internally here, don't know all the buttons & switches yet ;-).

binomaiheu commented 3 years ago

Ok, increased the daily limit 10-fold (and renamed the key internally to pywaterinfo, so we can trace it more easily), the packages was using a rather limited key. So should be ok now probably.

Did notice that the base64 encoded version is included in the test_waterinfo.py, may want to put that into a gh secret if possible. Might try to have a look myself.

stijnvanhoey commented 3 years ago

Thanks!

Did notice that the base64 encoded version is included in the test_waterinfo.py, may want to put that into a gh secret if possible. Might try to have a look myself.

A was discussed by Willem earlier, this was not an issue before (as it was limited). However, I propose to:

1/ create a new token (as now removing this one is a bit late; its everywhere in history) 2/ use the approach from HIC token for VMM as well, see https://github.com/fluves/pywaterinfo/blob/master/tests/test_waterinfo.py#L88 where I get it as an environmental variable. For the CI to work, make sure to add this in the settings/secrets/actions as well.

binomaiheu commented 3 years ago

Don't seem to have access to the repository settings to add the secret, could you give me permission ? Or perhaps I'm looking in the wrong place (not very familiar with that part, but eager to learn ;-).

stijnvanhoey commented 3 years ago

I adjusted the access settings, you should be able to adjust in settings > secrets

stijnvanhoey commented 3 years ago

would this also affect pydov?

No, the cache of pydov is not relying on the requests-cache package.