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

feat: add a http interface to plugins #814

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Conversation

alambare
Copy link
Collaborator

@alambare alambare commented Sep 7, 2023

this interface allow to transparently handle requests authentication within the Authentication plugin to lift the burden on search and download plugins.

Also it centralise authentication management and allow for more complexe authentication mechanisms like refresh when required, etc.

Your checklist for this pull request

Please review the guidelines for contributing to this repository.

  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Description

Please describe your pull request.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Thank you!

@alambare
Copy link
Collaborator Author

alambare commented Sep 7, 2023

This is only a first draft. @sbrunato wdyt ?

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

Test Results

    2 files   -        2    2 suites   - 2   27s ⏱️ - 5m 3s
  44 tests  -    369  22 ✔️  -    389  0 💤  -   2  0 ±0    22 🔥 +  22 
174 runs   - 1 478  44 ✔️  - 1 540  0 💤  - 68  0 ±0  130 🔥 +130 

For more details on these errors, see this check.

Results for commit 2b8f8c3. ± Comparison against base commit d0869f9.

This pull request removes 391 and adds 22 tests. Note that renamed tests count towards both.
tests.integration.test_config_ext_plugin.TestExternalPluginConfig ‑ test_update_providers_from_ext_plugin
tests.integration.test_core_config.TestCoreProductTypesConfig ‑ test_core_discover_product_types_auth
tests.integration.test_core_config.TestCoreProvidersConfig ‑ test_core_providers_config_update
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_buildpost
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_odata
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_postjson
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_qssearch
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_stacsearch
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_usgs
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_fallback_find_nothing
…
tests.context
tests.integration.test_config_ext_plugin
tests.integration.test_core_config
tests.integration.test_core_search
tests.integration.test_core_search_results
tests.integration.test_download_auth
tests.integration.test_search_stac_static
tests.test_cli
tests.test_config
tests.units.test_apis_plugins
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

Code Coverage (Ubuntu)

File Coverage
All files 16%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 2b8f8c3

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

Code Coverage (Windows)

File Coverage
All files 69%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against ceaf822

this interface allow to transparently handle requests authentication within the Authentication plugin to lift the burden on search and download plugins.

Also it centralise authentication management and allow for more complexe authentication mechanisms like refresh when required, etc.
- add ftp requests native support for http requests using format ftp://
- HttpResponse is now requests.Response
- simplify auth http requests handling
- sever aws download from aws auth
- remove calls from requests to use HttpRequest instead
- add some type hint
@sbrunato sbrunato added the pending Waiting for further information / action label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending Waiting for further information / action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants