-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
category: enhancementimprovements of code or code behaviorimprovements of code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)
Description
What would you like to see added to HDMF?
During discussion of #1123, we thought it would be a nice-to-have to have a config class to handle backend-specific IO configurations. This provides more explicit guidance than the "storage_options" unstructured dict approach taken by fsspec.
Something like the following:
# class HDMFIOConfig(pydantic model / dataclass, frozen=True):
# # common arguments
# aws_region: str
# class HDF5IOConfig(HDMFIOConfig):
# driver: str
# def __init__(self, aws_region, driver):
# super().__init__(aws_region)
# if driver is not None:
# if driver is not "ros3" and aws_region is not None:
# raise ValueError("Incompatible configuration")
# self.driver = driver
# else:
# if aws_region is not None:
# # set driver to ros3 if region is provided and driver is not None
# self.driver = "ros3
# class ZarrIOConfig(HDMFIOConfig):
# pass
# class HDF5IO:
# # option 1
# def __init__(self, io_config: HDF5IOConfig):
# pass
# # option 2
# def __init__(self, path, io, driver, aws_region):
# # do stuff with HDF5IOConfig(path, io, driver, aws_region)
# h5py.File(..., driver=config.driver, aws_region=config.aws_region)
What solution would you like?
^
Do you have any interest in helping implement the feature?
Yes.
Metadata
Metadata
Assignees
Labels
category: enhancementimprovements of code or code behaviorimprovements of code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)