h5netcdf 1.6.0__tar.gz → 1.6.1__tar.gz

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.

Files changed (33) hide show
  1. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/CHANGELOG.rst +6 -0
  2. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/PKG-INFO +1 -1
  3. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/devguide.rst +2 -0
  4. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/index.rst +1 -1
  5. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/_version.py +2 -2
  6. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/core.py +5 -0
  7. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/tests/test_h5netcdf.py +16 -0
  8. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf.egg-info/PKG-INFO +1 -1
  9. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/.pre-commit-config.yaml +0 -0
  10. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/AUTHORS.txt +0 -0
  11. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/LICENSE +0 -0
  12. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/README.rst +0 -0
  13. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/Makefile +0 -0
  14. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/api.rst +0 -0
  15. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/changelog.rst +0 -0
  16. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/conf.py +0 -0
  17. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/feature.rst +0 -0
  18. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/doc/legacyapi.rst +0 -0
  19. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/__init__.py +0 -0
  20. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/attrs.py +0 -0
  21. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/dimensions.py +0 -0
  22. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/legacyapi.py +0 -0
  23. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/tests/conftest.py +0 -0
  24. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/tests/pytest.ini +0 -0
  25. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf/utils.py +0 -0
  26. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf.egg-info/SOURCES.txt +0 -0
  27. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf.egg-info/dependency_links.txt +0 -0
  28. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf.egg-info/requires.txt +0 -0
  29. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/h5netcdf.egg-info/top_level.txt +0 -0
  30. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/licenses/H5PY_LICENSE.txt +0 -0
  31. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/licenses/PSF_LICENSE.txt +0 -0
  32. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/pyproject.toml +0 -0
  33. {h5netcdf-1.6.0 → h5netcdf-1.6.1}/setup.cfg +0 -0
@@ -1,6 +1,12 @@
1
1
  Change Log
2
2
  ----------
3
3
 
4
+ Version 1.6.1 (March 7th, 2025):
5
+
6
+ - Let Variable.chunks return None for scalar variables, independent of what the underlying
7
+ h5ds object returns ({pull}`259`).
8
+ By `Rickard Holmberg <https://github.com/rho-novatron>`_
9
+
4
10
  Version 1.6.0 (March 7th, 2025):
5
11
 
6
12
  - Allow specifying `h5netcdf.File(driver="h5pyd")` to force the use of h5pyd ({issue}`255`, {pull}`256`).
@@ -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>
@@ -18,10 +18,12 @@ Contributors
18
18
  - `Ezequiel Cimadevilla Alvarez <https://github.com/zequihg50>`_
19
19
  - `Frédéric Laliberté <https://github.com/laliberte>`_
20
20
  - `Ghislain Vaillant <https://github.com/ghisvail>`_
21
+ - `John Readey <https://github.com/jreadey>`_
21
22
  - `Lion Krischer <https://github.com/krischer>`_
22
23
  - `Mark Harfouche <https://github.com/hmaarrfk>`_
23
24
  - `Martin Raspaud <https://github.com/mraspaud>`_
24
25
  - `Pierre Augier <https://github.com/paugier>`_
26
+ - `Rickard Holmberg <https://github.com/rho-novatron>`_
25
27
  - `Ryan Grout <https://github.com/groutr>`_
26
28
  - `Scott Henderson <https://github.com/scottyhq>`_
27
29
  - `Thomas Kluyver <https://github.com/takluyver>`_
@@ -50,7 +50,7 @@ by Stephan Hoyer. The first `official` ``h5netcdf`` announcement was made by Ste
50
50
  `xarray issue tracker`_ only one day later.
51
51
 
52
52
  The library evolved constantly over the years (fixing bugs and adding enhancements)
53
- and gained contributions from 17 other :ref:`contributors` so far. The library is widely used,
53
+ and gained contributions from 19 other :ref:`contributors` so far. The library is widely used,
54
54
  especially as backend within `xarray`_.
55
55
 
56
56
  Early 2020 Kai Mühlbauer started to add contributions and after some time he volunteered
@@ -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)
@@ -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>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes