h5netcdf 1.6.0__py3-none-any.whl → 1.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of h5netcdf might be problematic. Click here for more details.

h5netcdf/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.6.0'
21
- __version_tuple__ = version_tuple = (1, 6, 0)
20
+ __version__ = version = '1.6.1'
21
+ __version_tuple__ = version_tuple = (1, 6, 1)
h5netcdf/core.py CHANGED
@@ -608,6 +608,11 @@ class BaseVariable(BaseObject):
608
608
  class Variable(BaseVariable):
609
609
  @property
610
610
  def chunks(self):
611
+ if self.shape == ():
612
+ # In HSDS, the layout can be chunked even for scalar datasets, but with only a single chunk.
613
+ # Return None for scalar datasets since they shall be handled as non-chunked.
614
+ assert self._h5ds.chunks in (None, (), (1,))
615
+ return None
611
616
  return self._h5ds.chunks
612
617
 
613
618
  @property
@@ -2757,3 +2757,19 @@ def test_h5pyd_driver(hsds_up):
2757
2757
  with h5netcdf.File(fname, "w", driver="h5pyd") as ds:
2758
2758
  assert ds._h5py == h5pyd
2759
2759
  assert isinstance(ds._h5file, h5pyd.File)
2760
+
2761
+
2762
+ def test_h5pyd_nonchunked_scalars(hsds_up):
2763
+ if without_h5pyd:
2764
+ pytest.skip("h5pyd package not available")
2765
+ elif not hsds_up:
2766
+ pytest.skip("HSDS service not running")
2767
+ rnd = "".join(random.choice(string.ascii_uppercase) for _ in range(5))
2768
+ fname = f"hdf5://testfile{rnd}.nc"
2769
+ with h5pyd.File(fname, "w") as ds:
2770
+ ds.create_dataset("foo", data=b"1234")
2771
+ with h5netcdf.File(fname, "r", driver="h5pyd") as ds:
2772
+ # HSDS stores this as a chunked dataset, but only with a single chunk
2773
+ assert ds["foo"]._h5ds.chunks == (1,)
2774
+ # However, since it is a scalar dataset, we should not expose the chunking
2775
+ assert ds["foo"].chunks is None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: h5netcdf
3
- Version: 1.6.0
3
+ Version: 1.6.1
4
4
  Summary: netCDF4 via h5py
5
5
  Author-email: Stephan Hoyer <shoyer@gmail.com>, Kai Mühlbauer <kmuehlbauer@wradlib.org>
6
6
  Maintainer-email: h5netcdf developers <devteam@h5netcdf.org>
@@ -1,16 +1,16 @@
1
1
  h5netcdf/__init__.py,sha256=Y0EBCcmlJctwl1kCmj7yLijTVy9AioBTr2091vInAtw,456
2
- h5netcdf/_version.py,sha256=5FGJNp9Lkk9uOxeCjXpoCGBF79Ar6LGPOR7-atBqb_4,511
2
+ h5netcdf/_version.py,sha256=vFpyllSQPpQuwzP7Cf743S6HuWgZRMOD31pPfh-WoZM,511
3
3
  h5netcdf/attrs.py,sha256=4IvV4ULLWkz4igFsvu9S2LB745wgUKrIdIuSeO5kpX8,3581
4
- h5netcdf/core.py,sha256=fU4uOfrGf0n-C6QmtNw-SJXv1WFmmue0dekba_6HUW4,62819
4
+ h5netcdf/core.py,sha256=jIzkOpoZncik2mvLC-aCv7x5QxiBcMPjIRdjKEu9SVA,63124
5
5
  h5netcdf/dimensions.py,sha256=2g0p9DOAC0hhQ94spIAjWeKC1qyhzzO0s15xCFYSscM,7803
6
6
  h5netcdf/legacyapi.py,sha256=MIZlht5Ad4hDFF1Slz2vXmKkgbv7Fhhf2YwNIe16Lfk,7682
7
7
  h5netcdf/utils.py,sha256=6E-HAIE0ONMyL4SxI3oUyQvrDgDWifR5EPde91V9rT0,674
8
8
  h5netcdf/tests/conftest.py,sha256=l6bOQyqe4gcdKHSNNijeWlFYTpEZse4QEUWbUntAIf4,1825
9
9
  h5netcdf/tests/pytest.ini,sha256=ruJxrLdCIA4bCPVuPQjxsLSlvVxuIsIakK6iQOmz-ak,107
10
- h5netcdf/tests/test_h5netcdf.py,sha256=fB-4-FxhuvqibPBFQzrS-niAZDLzXr7oIauRGqYQWSU,107713
11
- h5netcdf-1.6.0.dist-info/AUTHORS.txt,sha256=LTKzUh9o4Wc_oT3aFC48cyDCCP6tdm6VEV_6RrNy4uo,272
12
- h5netcdf-1.6.0.dist-info/LICENSE,sha256=Xer1Jg8iL_n9Da0xt0S99blk6tsg9tee_JdgH1rWTjs,1505
13
- h5netcdf-1.6.0.dist-info/METADATA,sha256=Lnov_mrz4uS67oVyS16m1zXhVz4nO55NqLOPaIQDGzY,13366
14
- h5netcdf-1.6.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
15
- h5netcdf-1.6.0.dist-info/top_level.txt,sha256=Fb_KIpOE6MBqjSvxV1Ay7oYce1mdmQ1pO9JQJPDeGqg,9
16
- h5netcdf-1.6.0.dist-info/RECORD,,
10
+ h5netcdf/tests/test_h5netcdf.py,sha256=OeEF7NrTfd5PMGzIPg2zeIUyTFKX9ZVoiLtvE3XO9sA,108407
11
+ h5netcdf-1.6.1.dist-info/AUTHORS.txt,sha256=LTKzUh9o4Wc_oT3aFC48cyDCCP6tdm6VEV_6RrNy4uo,272
12
+ h5netcdf-1.6.1.dist-info/LICENSE,sha256=Xer1Jg8iL_n9Da0xt0S99blk6tsg9tee_JdgH1rWTjs,1505
13
+ h5netcdf-1.6.1.dist-info/METADATA,sha256=x81zx4yWKM52EMDfghLa6CvFYbPytMRXrk8uZi7cPug,13366
14
+ h5netcdf-1.6.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
15
+ h5netcdf-1.6.1.dist-info/top_level.txt,sha256=Fb_KIpOE6MBqjSvxV1Ay7oYce1mdmQ1pO9JQJPDeGqg,9
16
+ h5netcdf-1.6.1.dist-info/RECORD,,