[BUG]: Add timeseries_2d as valid input type for HDF5FeatureStorage #444
3 changed files with 16 additions and 2 deletions
1
docs/changes/newsfragments/444.bugfix
Normal file
1
docs/changes/newsfragments/444.bugfix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Allow ``timeseries_2d`` storage for :class:`.HDF5FeatureStorage` by `Fede Raimondo`_
|
||||||
|
|
@ -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`.
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ def test_get_valid_inputs() -> None:
|
||||||
"vector",
|
"vector",
|
||||||
"timeseries",
|
"timeseries",
|
||||||
"scalar_table",
|
"scalar_table",
|
||||||
|
"timeseries_2d",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue