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

Add read_nwb_method for local paths in both hdf5 and zarr #1994

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

h-mayorquin
Copy link
Contributor

@h-mayorquin h-mayorquin commented Nov 16, 2024

Motivation

See #1974

How to test the behavior?

I added tests.

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 ruff check . && codespell 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.

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Project coverage is 91.39%. Comparing base (2c2bc85) to head (33847a6).

Files with missing lines Patch % Lines
src/pynwb/__init__.py 18.18% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1994      +/-   ##
==========================================
- Coverage   91.69%   91.39%   -0.30%     
==========================================
  Files          27       27              
  Lines        2708     2719      +11     
  Branches      707      710       +3     
==========================================
+ Hits         2483     2485       +2     
- Misses        149      158       +9     
  Partials       76       76              
Flag Coverage Δ
integration 72.60% <18.18%> (-0.23%) ⬇️
unit 82.38% <18.18%> (-0.27%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@h-mayorquin h-mayorquin marked this pull request as ready for review November 16, 2024 04:31
@rly rly requested a review from stephprince December 10, 2024 00:41
Copy link
Contributor

@stephprince stephprince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay @h-mayorquin! Added my review comments

src/pynwb/__init__.py Outdated Show resolved Hide resolved
tests/integration/io/test_read.py Show resolved Hide resolved
src/pynwb/__init__.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
docs/gallery/general/plot_read_basics.py Show resolved Hide resolved
@h-mayorquin
Copy link
Contributor Author

Is the sphinx links fail related to this PR? Given my experience with neuroconv is seldom is and I looked at the CI log but no luck.

Copy link
Contributor

@stephprince stephprince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks! Added a few more small suggestions related to the docstrings.

Comment on lines +599 to +601
f"Unable to read file: '{path}'. The file exists but is not recognized as "
"either a valid HDF5 or Zarr NWB file. Please ensure the file contains valid NWB data."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"Unable to read file: '{path}'. The file exists but is not recognized as "
"either a valid HDF5 or Zarr NWB file. Please ensure the file contains valid NWB data."
)
f"Unable to read file: '{path}'. The file is not recognized as "
"either a valid HDF5 or Zarr NWB file. Please ensure the file exists and contains valid NWB data."
)

I think this error will occur even if the file does not exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to modify the test though, so I am doing this into another commit.

src/pynwb/__init__.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants