Skip to content

Simplify downloader adapter and update documentation and tests#25

Merged
ecarrenolozano merged 4 commits intomainfrom
feat/improve-downloader-api
Mar 10, 2026
Merged

Simplify downloader adapter and update documentation and tests#25
ecarrenolozano merged 4 commits intomainfrom
feat/improve-downloader-api

Conversation

@ecarrenolozano
Copy link
Member

This pull request introduces improvements to how downloader backends are configured and used in the ClientCatalog and ClientOntology classes, making it easier to specify downloader adapters via string names or instances. Documentation and tests are updated to reflect and validate these changes. The most important updates are grouped below.

Downloader backend configuration improvements:

  • Added support for specifying downloader backends as strings (e.g., "pooch", "download_manager") at the client level in ClientCatalog and ClientOntology. A helper function _resolve_downloader handles resolution of string names to adapter instances. [1] [2] [3] [4] [5] [6]
  • Updated downloader handling in loader methods to consistently use resolved downloader adapters, ensuring correct behavior when loading from files, URLs, or catalogs. [1] [2] [3] [4]

Documentation updates:

  • Revised usage examples and explanations in README.md, tutorial, and reference docs to clarify how to specify downloader backends via string or adapter at the client level, and to note that lower-level components require adapter instances. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Testing enhancements:

  • Added tests to verify that passing a string backend to ClientCatalog and ClientOntology correctly resolves to the intended downloader adapter, using monkeypatching to simulate backend resolution.
  • Updated existing tests to reflect changes in the load method return values and downloader handling.

Logging and configuration tweaks:

  • Adjusted logging levels and logger configuration in 04_workdir.yaml for improved clarity and control.
  • Added downloader configuration to integration settings in 04_workdir.yaml.

Miscellaneous improvements:

  • Added an example in sandbox/use_case_downloaders.py for printing ontology roots after loading.
  • Minor import and code organization updates for clarity and maintainability. [1] [2]

These changes collectively make downloader configuration more flexible and user-friendly, and ensure that documentation and tests accurately reflect the new behavior.

@ecarrenolozano ecarrenolozano merged commit d2fba29 into main Mar 10, 2026
10 checks passed
@ecarrenolozano ecarrenolozano deleted the feat/improve-downloader-api branch March 10, 2026 15:30
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