Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrongly triggered compression check #552

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### Deprecation
* Remove s3fs dependency, which was causing dependency management issues [#549](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/549)

### Fixes
* Fix wrongly triggered compression check [#552](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/552)

## Improvements
* Added a section for describing the issues with negative timestamps in `TimeSeries` [#545](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/545)

Expand Down
3 changes: 2 additions & 1 deletion src/nwbinspector/checks/_nwb_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def check_large_dataset_compression(
elif isinstance(field, zarr.Array):
compression_indicator = field.compressor

if compression_indicator is not None and field.size * field.dtype.itemsize > gb_lower_bound * 1e9:
field_size_bytes = field.size * field.dtype.itemsize
if compression_indicator is None and field_size_bytes > gb_lower_bound * 1e9:
return InspectorMessage(
severity=Severity.HIGH,
message=f"{os.path.split(field.name)[1]} is a large uncompressed dataset! Please enable compression.",
Expand Down
Loading