-
Notifications
You must be signed in to change notification settings - Fork 38
Fix and silence warnings #578
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
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
|
@gouwens Ready for review! |
gouwens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
Perfect. That's even better than ignoring the warning. |
Close #583