Skip to content

Commit

Permalink
Merge branch 'dev' into path
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 authored Nov 6, 2024
2 parents d9fb0c9 + e5c2e9e commit ebd5950
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl
- name: Upload distribution as a workspace artifact
if: ${{ matrix.upload-wheels }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: distributions
path: dist
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
python-version: '3.11'

- name: Download wheel and source distributions from artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: distributions
path: dist
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# HDMF-ZARR Changelog

## 0.9.0 (Upcoming)
## 1.0.0 (Upcoming)
### Enhancements
* Added support for Pathlib paths. @mavaylon1 [#212](https://github.com/hdmf-dev/hdmf-zarr/pull/212)

## 0.9.0 (September 16, 2024)
### Enhancements
* Added support for appending a dataset of references. @mavaylon1 [#203](https://github.com/hdmf-dev/hdmf-zarr/pull/203)
* NWBZarrIO load_namespaces=True by default. @mavaylon1 [#204](https://github.com/hdmf-dev/hdmf-zarr/pull/204)
* Added test for opening file with consolidated metadata from DANDI. @mavaylon1 [#206](https://github.com/hdmf-dev/hdmf-zarr/pull/206)
* Add dimension labels compatible with xarray. @mavaylon1 [#207](https://github.com/hdmf-dev/hdmf-zarr/pull/207)
* Added support for Pathlib paths. @mavaylon1 [#212](https://github.com/hdmf-dev/hdmf-zarr/pull/212)
* Added link_data --> clear_cache relationship to support repacking zarr nwbfiles: [#215](https://github.com/hdmf-dev/hdmf-zarr/pull/215)

## 0.8.0 (June 4, 2024)
### Bug Fixes
Expand Down
9 changes: 9 additions & 0 deletions src/hdmf_zarr/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ def export(self, **kwargs):
write_args['export_source'] = src_io.source # pass export_source=src_io.source to write_builder
ckwargs = kwargs.copy()
ckwargs['write_args'] = write_args
if not write_args.get('link_data', True):
ckwargs['clear_cache'] = True
super().export(**ckwargs)
if cache_spec:
self.__cache_spec()
Expand Down Expand Up @@ -1310,6 +1312,13 @@ def __list_fill__(self, parent, name, data, options=None): # noqa: C901
except ValueError:
for i in range(len(data)):
dset[i] = data[i]
except TypeError: # If data is an h5py.Dataset with strings, they may need to be decoded
for c in np.ndindex(data_shape):
o = data
for i in c:
o = o[i]
# bytes are not JSON serializable
dset[c] = o if not isinstance(o, (bytes, np.bytes_)) else o.decode("utf-8")
return dset

def __scalar_fill__(self, parent, name, data, options=None):
Expand Down
7 changes: 7 additions & 0 deletions test_gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def _import_from_file(script):
_deprecation_warning_zarr_store = (
r"The NestedDirectoryStore is deprecated *"
)
_deprecation_warning_numpy = (
"__array__ implementation doesn't accept a copy keyword, so passing copy=False failed. "
"__array__ must implement 'dtype' and 'copy' keyword arguments."
)

def run_gallery_tests():
global TOTAL, FAILURES, ERRORS
Expand Down Expand Up @@ -149,6 +153,9 @@ def run_gallery_tests():
warnings.filterwarnings(
"ignore", message=_deprecation_warning_zarr_store, category=FutureWarning
)
warnings.filterwarnings(
"ignore", message=_deprecation_warning_numpy, category=DeprecationWarning
)
_import_from_file(script_abs)
except Exception:
print(traceback.format_exc())
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_io_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def __get_data_array(self, foo_container):

def test_maxshape(self):
"""test when maxshape is set for the dataset"""
data = H5DataIO(data=list(range(5)), maxshape=(None,))
data = H5DataIO(data=list(range(5)), maxshape=(5,))
self.__roundtrip_data(data=data)
self.assertContainerEqual(self.out_container, self.read_container, ignore_hdmf_attrs=True)

Expand Down

0 comments on commit ebd5950

Please sign in to comment.