[BUG]: Add timeseries_2d as valid input type for HDF5FeatureStorage #444

Merged
fraimondo merged 3 commits from patch/timeseries_2d into main 2025-04-25 12:54:39 +00:00
3 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1 @@
Allow ``timeseries_2d`` storage for :class:`.HDF5FeatureStorage` by `Fede Raimondo`_

View file

@ -157,7 +157,13 @@ class HDF5FeatureStorage(BaseFeatureStorage):
uri.parent.mkdir(parents=True, exist_ok=True) uri.parent.mkdir(parents=True, exist_ok=True)
# Available storage kinds # Available storage kinds
storage_types = ["vector", "timeseries", "matrix", "scalar_table"] storage_types = [
"vector",
"timeseries",
"matrix",
"scalar_table",
"timeseries_2d",
]
super().__init__( super().__init__(
uri=uri, uri=uri,
@ -180,7 +186,13 @@ class HDF5FeatureStorage(BaseFeatureStorage):
storage. storage.
""" """
return ["matrix", "vector", "timeseries", "scalar_table"] return [
"matrix",
"vector",
"timeseries",
"scalar_table",
"timeseries_2d",
]
def _fetch_correct_uri_for_io(self, element: Optional[dict]) -> str: def _fetch_correct_uri_for_io(self, element: Optional[dict]) -> str:
"""Return proper URI for I/O based on `element`. """Return proper URI for I/O based on `element`.

View file

@ -29,6 +29,7 @@ def test_get_valid_inputs() -> None:
"vector", "vector",
"timeseries", "timeseries",
"scalar_table", "scalar_table",
"timeseries_2d",
] ]