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

Resolve GitHub timeouts #232

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Resolve GitHub timeouts #232

wants to merge 21 commits into from

Conversation

tgrandje
Copy link
Collaborator

  • create a class to manage every http requests (wether to the INSEE APIs, the IGN's or anything else) ;
  • set a default timeout for each query (might be needed to extend this timeout later, but this seems ok in regard to existing tests)
  • run all test on any python version
  • run tests only on py 3.9 & 3.12
  • add a version for pynsee, for 2 reasons :
    • traceability (giving the extension of current changes, I suggest the 0.2.0 version for pynsee)
    • and the IGN's geoplatform doesn't allow for a User-Agent without a "/blah" part, which is usually reserved to the current application's version.
  • alter utils tests
  • remove 404 tracking from INSEE's API results as this is a "no result found" code, not an error

I might have blundered here or there on the display of log entries, but I hope not too much.
This should be checked thoroughly and the black formatting will not make this an easy task, sorry about that...

@tgrandje
Copy link
Collaborator Author

Just added resolution to #231

@tgrandje
Copy link
Collaborator Author

Just in case we agree on that, I've also opened another branch which allows to track each API's current rate separatly using requests_ratelimiter.

@tgrandje
Copy link
Collaborator Author

Also :

  • take care of need to allow pynsee usage without sirene's credentials #238
  • fix some paths, still displaying version number in URLs, which are not displayed in the current portal (anymore ?)
  • prune some unnecessary code while testing the API's correct access and make use of the new session object's built-in exception

@tgrandje
Copy link
Collaborator Author

Not a 100% sure of the latest commit.
I sure resolved some bugs, but I'm currently not working with a static proxy and cannot be certain of the proper proxy behaviour (I'll try to reinstall the environment on another machine). Please fill free to advice on it!

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

Successfully merging this pull request may close these issues.

1 participant