File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Write the date in place of the "Unreleased" in the case a new version is release
13
13
- Make ` tiled.client ` accept a Python dictionary when fed to ` write_dataframe() ` .
14
14
- The ` generated_minimal ` example no longer requires pandas and instead uses a Python dict.
15
15
- Remove unused pytest-warning ignores from ` test_writing.py ` .
16
+ - Rename argument in ` hdf5_lookup ` function from ` path ` to ` dataset ` to reflect change in ` ophyd_async `
16
17
17
18
### Fixed
18
19
- A bug in ` Context.__getstate__ ` caused picking to fail if applied twice.
Original file line number Diff line number Diff line change @@ -384,6 +384,7 @@ def hdf5_lookup(
384
384
libver : str = "latest" ,
385
385
specs : Optional [List [Spec ]] = None ,
386
386
access_policy : Optional [AccessPolicy ] = None ,
387
+ dataset : Optional [Union [List [Path ], List [str ]]] = None ,
387
388
path : Optional [Union [List [Path ], List [str ]]] = None ,
388
389
) -> Union [HDF5Adapter , ArrayAdapter ]:
389
390
"""
@@ -397,13 +398,18 @@ def hdf5_lookup(
397
398
libver :
398
399
specs :
399
400
access_policy :
401
+ dataset :
400
402
path :
401
403
402
404
Returns
403
405
-------
404
406
405
407
"""
406
- path = path or []
408
+
409
+ if dataset is not None and path is not None :
410
+ raise ValueError ("dataset and path kwargs should not both be set!" )
411
+
412
+ dataset = dataset or path or []
407
413
adapter = HDF5Adapter .from_uri (
408
414
data_uri ,
409
415
structure = structure ,
@@ -413,7 +419,7 @@ def hdf5_lookup(
413
419
specs = specs ,
414
420
access_policy = access_policy ,
415
421
)
416
- for segment in path :
422
+ for segment in dataset :
417
423
adapter = adapter .get (segment ) # type: ignore
418
424
if adapter is None :
419
425
raise KeyError (segment )
You can’t perform that action at this time.
0 commit comments