From 9160dd9a3b603205bae655b83be365130c9938f0 Mon Sep 17 00:00:00 2001 From: jreadey Date: Thu, 28 Mar 2024 06:04:08 -0700 Subject: [PATCH 1/2] report layout chunk prop, not cpl if both present --- h5pyd/_hl/objectid.py | 11 +++++++---- test/apps/config.py | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/h5pyd/_hl/objectid.py b/h5pyd/_hl/objectid.py index 0a7baf1..227046f 100644 --- a/h5pyd/_hl/objectid.py +++ b/h5pyd/_hl/objectid.py @@ -191,11 +191,14 @@ def rank(self): @property def layout(self): layout = None - dcpl = self.dcpl_json - if dcpl and 'layout' in dcpl: - layout = dcpl['layout'] - elif 'layout' in self.obj_json: + + if 'layout' in self.obj_json: layout = self.obj_json['layout'] + else: + dcpl = self.dcpl_json + if dcpl and 'layout' in dcpl: + layout = dcpl['layout'] + return layout @property diff --git a/test/apps/config.py b/test/apps/config.py index 6be930a..65b04aa 100755 --- a/test/apps/config.py +++ b/test/apps/config.py @@ -22,7 +22,9 @@ def get_test_filenames(): "scale_offset.h5", "fletcher32.h5", "undecodable_attr.h5", - "diamond.h5" + "diamond.h5", + "small1dchunk.h5", + "small2dchunk.h5" ) From 1da9e7f7fee864d3d1dde5339a573b97989103f9 Mon Sep 17 00:00:00 2001 From: jreadey Date: Fri, 29 Mar 2024 05:30:38 -0700 Subject: [PATCH 2/2] fix flake8 errors --- h5pyd/_hl/objectid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5pyd/_hl/objectid.py b/h5pyd/_hl/objectid.py index 227046f..120fe60 100644 --- a/h5pyd/_hl/objectid.py +++ b/h5pyd/_hl/objectid.py @@ -191,7 +191,7 @@ def rank(self): @property def layout(self): layout = None - + if 'layout' in self.obj_json: layout = self.obj_json['layout'] else: