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

Check nwb_version on read #1612

Merged
merged 9 commits into from
Dec 18, 2022
Merged

Check nwb_version on read #1612

merged 9 commits into from
Dec 18, 2022

Conversation

oruebel
Copy link
Contributor

@oruebel oruebel commented Dec 16, 2022

Motivation

Fix #1609

This PR:

  • Adds the function NWBHDF5IO.nwb_version to check the nwb_version of an HDF5 file (i.e., before reading the file)
  • Adds checking of nwb_version to NWBHDF5IO.read to raise a more informative error in case unsupported in case that unsupported file versions (i.e., NWB 1 files) are found
  • Adds tests for the new functions

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

@oruebel oruebel added category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users labels Dec 16, 2022
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #1612 (a5619e9) into dev (0d42132) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #1612      +/-   ##
==========================================
+ Coverage   91.25%   91.31%   +0.06%     
==========================================
  Files          25       25              
  Lines        2515     2534      +19     
  Branches      477      481       +4     
==========================================
+ Hits         2295     2314      +19     
  Misses        139      139              
  Partials       81       81              
Flag Coverage Δ
integration 70.44% <100.00%> (+0.22%) ⬆️
unit 84.37% <68.42%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pynwb/__init__.py 78.66% <100.00%> (+3.09%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@oruebel oruebel marked this pull request as ready for review December 16, 2022 11:38
@oruebel
Copy link
Contributor Author

oruebel commented Dec 16, 2022

@rly this PR is ready for review

@oruebel oruebel merged commit a1f472b into dev Dec 18, 2022
@oruebel oruebel deleted the add/check_nwb_version branch December 18, 2022 19:23
mavaylon1 added a commit that referenced this pull request Jan 17, 2023
* Check nwb_version on read (#1612)

* Added NWBHDF5IO.nwb_version property and check for version on NWBHDF5IO.read
* Updated icephys tests to skip version check when writing non NWBFile container
* Add tests for NWB version check on read
* Add unit tests for NWBHDF5IO.nwb_version property
* Updated changelog

Co-authored-by: Ryan Ly <[email protected]>

* Bump setuptools from 65.4.1 to 65.5.1 (#1614)

Bumps [setuptools](https://github.com/pypa/setuptools) from 65.4.1 to 65.5.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](pypa/setuptools@v65.4.1...v65.5.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* modify export.rst to have proper links to the NWBFile API docs (#1615)

* Create project_action.yml (#1617)

* Create project_action.yml

* Update project_action.yml

* Update project_action.yml

* Update project_action.yml (#1620)

* Update project_action.yml (#1623)

* Project action (#1626)

* Create project_action.yml

* Update project_action.yml

* Update project_action.yml

* Update project_action.yml

* Show recommended usaege for hdf5plugin in tutorial (#1630)

* Show recommended usaege for hdf5plugin in tutorial

* Update docs/gallery/advanced_io/h5dataio.py

* Update docs/gallery/advanced_io/h5dataio.py

Co-authored-by: Heberto Mayorquin <[email protected]>

Co-authored-by: Ben Dichter <[email protected]>
Co-authored-by: Heberto Mayorquin <[email protected]>

* Update iterative write and parallel I/O tutorial (#1633)

* Update iterative write tutorial
* Update doc makefiles to clean up files created by the advanced io tutorial
* Fix #1514  Update parallel I/O tutorial to use H5DataIO instead of DataChunkIterator to setup data for parallel write
* Update changelog
* Fix flake8
* Fix broken external links
* Update make.bat
* Update CHANGELOG.md
* Update plot_iterative_write.py
* Update docs/gallery/advanced_io/plot_iterative_write.py

Co-authored-by: Ryan Ly <[email protected]>

* Update project_action.yml (#1632)

* nwb_schema_2.6.0

* Update CHANGELOG.md

* remove

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Oliver Ruebel <[email protected]>
Co-authored-by: Ryan Ly <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Dichter <[email protected]>
Co-authored-by: Heberto Mayorquin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Enhance NWBHDF5IO to check NWB version
2 participants