Skip to content

Commit

Permalink
Merge branch 'dev' into improve_html_repr_of_data
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Oct 2, 2024
2 parents 5b235e0 + b78625b commit 3813723
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/project_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
- name: Add to Developer Board
env:
TOKEN: ${{ steps.generate_token.outputs.token }}
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
project-url: https://github.com/orgs/hdmf-dev/projects/7
github-token: ${{ env.TOKEN }}

- name: Add to Community Board
env:
TOKEN: ${{ steps.generate_token.outputs.token }}
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
project-url: https://github.com/orgs/hdmf-dev/projects/8
github-token: ${{ env.TOKEN }}
9 changes: 3 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# HDMF Changelog

## HDMF 3.14.6 (Upcoming)

### Bug fixes
- Fixed mamba-related error in conda-based GitHub Actions. @rly [#1194](https://github.com/hdmf-dev/hdmf/pull/1194)

## HDMF 3.14.5 (September 17, 2024)
## HDMF 3.14.5 (Upcoming)

### Enhancements
- Added support for overriding backend configurations of `h5py.Dataset` objects in `Container.set_data_io`. @pauladkisson [#1172](https://github.com/hdmf-dev/hdmf/pull/1172)

### Bug fixes
- Fixed bug in writing of string arrays to an HDF5 file that were read from an HDF5 file that was introduced in 3.14.4. @rly @stephprince
[#1189](https://github.com/hdmf-dev/hdmf/pull/1189)
- Fixed export of scalar datasets with a compound data type. @stephprince [#1185](https://github.com/hdmf-dev/hdmf/pull/1185)
- Fixed mamba-related error in conda-based GitHub Actions. @rly [#1194](https://github.com/hdmf-dev/hdmf/pull/1194)

## HDMF 3.14.4 (September 4, 2024)

Expand Down
4 changes: 4 additions & 0 deletions src/hdmf/backends/hdf5/h5tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,10 @@ def __read_dataset(self, h5obj, name=None):
kwargs['dtype'] = d.dtype
elif h5obj.dtype.kind == 'V': # scalar compound data type
kwargs['data'] = np.array(scalar, dtype=h5obj.dtype)
cpd_dt = h5obj.dtype
ref_cols = [check_dtype(ref=cpd_dt[i]) or check_dtype(vlen=cpd_dt[i]) for i in range(len(cpd_dt))]
d = BuilderH5TableDataset(h5obj, self, ref_cols)
kwargs['dtype'] = HDF5IO.__compound_dtype_to_list(h5obj.dtype, d.dtype)
else:
kwargs["data"] = scalar
else:
Expand Down
4 changes: 2 additions & 2 deletions src/hdmf/validate/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def get_type(data, builder_dtype=None):
# Case for h5py.Dataset and other I/O specific array types
else:
# Compound dtype
if builder_dtype and len(builder_dtype) > 1:
if builder_dtype and isinstance(builder_dtype, list):
dtypes = []
string_formats = []
for i in range(len(builder_dtype)):
Expand Down Expand Up @@ -441,7 +441,7 @@ def validate(self, **kwargs):
except EmptyArrayError:
# do not validate dtype of empty array. HDMF does not yet set dtype when writing a list/tuple
pass
if builder.dtype is not None and len(builder.dtype) > 1 and len(np.shape(builder.data)) == 0:
if isinstance(builder.dtype, list) and len(np.shape(builder.data)) == 0:
shape = () # scalar compound dataset
elif isinstance(builder.dtype, list):
shape = (len(builder.data), ) # only 1D datasets with compound types are supported
Expand Down

0 comments on commit 3813723

Please sign in to comment.