Enable StorageProvider auto-selection on StorageClient API #5

Closed
opened 2025-09-23 20:52:26 +00:00 by CoreRasurae · 0 comments
Member

Currently list_files(), file_exists(), get_file_size(), get_file_metadata(), read_file(), write_file(), create_directory() and delete_directory() only work with the StorageClient pre-assigned StorageProviderInterface instance. However sometimes it would be handy if all those file operations could auto-select the provider if the pre-assigned one is not appropriate for the targeted file system.

Tasks to be done:

  • Modify the StorageClient (client.py) so that it can automatically check if the provider is suitable or not to handle the targeted file system and if not, temporarily instantiate a suitable provider if available, or default to the pre-assigned one, if no suitable provider exists.
  • Make sure to close existing connections if required on failure, or exit
  • Update the unit tests if required to keep the desired coverage of 85%

Definition of done:

  • Show that the StorageClient can now handle different file systems, other than the supported by the pre-assigned provider
  • Show that the unit tests coverage is at least 85%
Currently list_files(), file_exists(), get_file_size(), get_file_metadata(), read_file(), write_file(), create_directory() and delete_directory() only work with the StorageClient pre-assigned StorageProviderInterface instance. However sometimes it would be handy if all those file operations could auto-select the provider if the pre-assigned one is not appropriate for the targeted file system. Tasks to be done: - Modify the StorageClient (client.py) so that it can automatically check if the provider is suitable or not to handle the targeted file system and if not, temporarily instantiate a suitable provider if available, or default to the pre-assigned one, if no suitable provider exists. - Make sure to close existing connections if required on failure, or exit - Update the unit tests if required to keep the desired coverage of 85% Definition of done: - Show that the StorageClient can now handle different file systems, other than the supported by the pre-assigned provider - Show that the unit tests coverage is at least 85%
CoreRasurae added this to the v0.1 milestone 2025-09-24 18:28:38 +00:00
CoreRasurae 2025-09-29 20:30:13 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
You do not have permission to read 1 dependency
Reference: cleverlibre/clevercloud-storage#5
No description provided.