Fix and silence warnings#578
Merged
Merged
Conversation
eddfe48 to
9a9929f
Compare
Created #575 to fix them.
This fixes the warning:
/home/thomas/devel/ipfx/ipfx/bin/make_stimulus_ontology.py:26: DeprecationWarning: invalid escape sequence \d
m = re.search("(.*)\d{6}$", scode)
The whole purpose of the tests is to trigger that case.
This avoids warnings. The additional dependency is already required by pynwb.
This ignores the following and similiar warnings:
tests/dataset/test_mies_nwb_data.py: 2 warnings
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/hdmf/build/objectmapper.py:267: DtypeConversionWarning: Spec 'CurrentClampSeries/sweep_number': Value with data type int64 is being converted to data type uint64 (min specification: uint32).
warnings.warn(full_warning_msg, DtypeConversionWarning)
tests/attach_metadata/test_nwb2_sink.py: 10 warnings
tests/dataset/test_ephys_nwb_data.py: 6 warnings
tests/dataset/test_hbg_nwb_data.py: 3 warnings
tests/dataset/test_mies_nwb_data.py: 2 warnings
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/hdmf/build/objectmapper.py:267: DtypeConversionWarning: Spec 'SweepTable/sweep_number': Value with data type int64 is being converted to data type uint64 (min specification: uint32).
warnings.warn(full_warning_msg, DtypeConversionWarning)
tests/dataset/test_ephys_nwb_data.py: 6 warnings
tests/dataset/test_hbg_nwb_data.py: 3 warnings
tests/dataset/test_mies_nwb_data.py: 2 warnings
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/hdmf/build/objectmapper.py:267: DtypeConversionWarning: Spec 'CurrentClampStimulusSeries/sweep_number': Value with data type int64 is being converted to data type uint64 (min specification: uint32).
warnings.warn(full_warning_msg, DtypeConversionWarning)
Both int64 and uint64 are big enough for our number of sweeps. In addition
this test is using existing files so even fixing/upgrading IPNWB would not
solve the issue.
This fixes the following warnings:
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/pynwb/base.py:87: DeprecationWarning: get_data_interface is deprecated and will be removed in PyNWB 4.0. Use get instead.
warn('get_data_interface is deprecated and will be removed in PyNWB 4.0. Use get instead.', DeprecationWarning)
tests/test_mies_nwb_pipeline_output.py: 127 warnings
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/pynwb/base.py:82: DeprecationWarning: add_data_interface is deprecated and will be removed in PyNWB 4.0. Use add instead.
warn('add_data_interface is deprecated and will be removed in PyNWB 4.0. Use add instead.', DeprecationWarning)
pynwb 3.1.2 does currently always output a warning about a missing .nwb ending in path even if path was not passed at all and is None. This will be fixed in [1], ignore the warning until we require that version. We also drop the path argument to NWBHDF5IO as that is not needed. [1]: NeurodataWithoutBorders/pynwb#2130
…_filtering This test uses existing files so even fixing/upgrading IPNWB would not solve the issue.
…ering This test uses existing files so even fixing/upgrading IPNWB would not solve the issue.
This is tracked in [1]. [1]: #576
This is tracked in [1]. [1]: #577
9a9929f to
05c14d1
Compare
Collaborator
Author
|
@gouwens Ready for review! |
gouwens
approved these changes
Sep 9, 2025
gouwens
left a comment
Collaborator
There was a problem hiding this comment.
It all looks good to me. I realized there was a way to avoid triggering one of the warnings by filtering out bad points first in the dv/dt calculation, so I fixed the underlying code and removed the filter (and pushed the commit).
Collaborator
Author
Perfect. That's even better than ignoring the warning. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #583