dandi / dandi-cli

DANDI command line client to facilitate common operations
https://dandi.readthedocs.io/
Apache License 2.0
22 stars 27 forks source link

Audit warning filter #1534

Open asmacdo opened 3 days ago

asmacdo commented 3 days ago

I've tested locally with python 3.9 and 3.12.

I ran the tests with tox -e 39 and tox -e 312. Since this was sufficient for both, I figure lets let the automation run to see where we are-- I'm surprised that we dont need more filters tbh.

FWIW, there were ~20 warnings when I was testing without the error in filterwarnings. I was quite surprised that adding this in removed all but 1 of those warnings (the one filtered here). (I had expected that those warnings would be promoted to errors).

Warnings without `filterwarnings == error` ============================================================ warnings summary ============================================================= dandi/tests/test_download.py::test_DownloadDirectory_basic dandi/tests/test_download.py::test_DownloadDirectory_basic /usr/lib64/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=753514) is multi-threaded, use of fork() may lead to deadlocks in the child. self.pid = os.fork() dandi/tests/test_fixtures.py: 20 warnings dandi/tests/test_organize.py: 20 warnings /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/joblib/externals/loky/backend/fork_exec.py:38: DeprecationWarning: This process (pid=753514) is multi-threaded, use of fork() may lead to deadlocks in the child. pid = os.fork() dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ecephys.py:223: DeprecationWarning: use pynwb.misc.Units or NWBFile.units instead warnings.warn("use pynwb.misc.Units or NWBFile.units instead", DeprecationWarning) dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ecephys.py:257: DeprecationWarning: use pynwb.misc.Units or NWBFile.units instead warnings.warn("use pynwb.misc.Units or NWBFile.units instead", DeprecationWarning) dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampSeries 'ccs' is ignored and will be set to 'volts' as per NWB 2.1.0. warnings.warn( dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampStimulusSeries 'ccss' is ignored and will be set to 'amperes' as per NWB 2.1.0. warnings.warn( dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:226: UserWarning: Stimulus description 'NA' for IZeroClampSeries 'izcs' is ignored and will be set to 'N/A' as per NWB 2.3.0. warnings.warn( dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for IZeroClampSeries 'izcs' is ignored and will be set to 'volts' as per NWB 2.1.0. warnings.warn( dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:341: DeprecationWarning: Use of SweepTable is deprecated. Use the IntracellularRecordingsTable instead. See also the NWBFile.add_intracellular_recordings function. warnings.warn("Use of SweepTable is deprecated. Use the IntracellularRecordingsTable " dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ophys.py:116: DeprecationWarning: The 'manifold' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'. warnings.warn("The 'manifold' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'.", dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ophys.py:119: DeprecationWarning: The 'conversion' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'. warnings.warn("The 'conversion' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'.", dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ophys.py:122: DeprecationWarning: The 'unit' argument is deprecated in favor of 'origin_coords_unit' and 'grid_spacing_unit'. warnings.warn("The 'unit' argument is deprecated in favor of 'origin_coords_unit' and 'grid_spacing_unit'.", dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': The number of frame indices in 'starting_frame' should have the same length as 'external_file'. warn(error_msg) dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': Format must be 'external' when external_file is specified. warn(error_msg) dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/image.py:106: UserWarning: TwoPhotonSeries 'test_2ps': Length of data does not match length of timestamps. Your data may be transposed. Time should be on the 0th dimension warnings.warn( dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for VoltageClampSeries 'vcs' is ignored and will be set to 'amperes' as per NWB 2.1.0. warnings.warn( dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry] /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for VoltageClampStimulusSeries 'vcss' is ignored and will be set to 'volts' as per NWB 2.1.0. warnings.warn( dandi/tests/test_pynwb_utils.py::test_nwb_has_external_links /home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/hdmf/build/objectmapper.py:264: DtypeConversionWarning: Spec 'TimeSeries/timestamps': Value with data type int64 is being converted to data type float64 as specified. warnings.warn(full_warning_msg, DtypeConversionWarning)
codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.53%. Comparing base (ca1f575) to head (02dae51). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1534 +/- ## ======================================= Coverage 88.53% 88.53% ======================================= Files 78 78 Lines 10691 10691 ======================================= Hits 9465 9465 Misses 1226 1226 ``` | [Flag](https://app.codecov.io/gh/dandi/dandi-cli/pull/1534/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dandi/dandi-cli/pull/1534/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | `88.53% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

asmacdo commented 2 days ago

FWIW, the no-longer-filtered warnings show up as noise in the test run on CI (its a very noisy run , but do NOT cause failures. @yarikoptic is it sufficient to filter only warnings that are escalated to failures, or are we aiming to slightly reduce the noise?

Some warnings in CI logs https://github.com/dandi/dandi-cli/actions/runs/11946325336/job/33300465114?pr=1534 /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampStimulusSeries 'ccss' is ignored and will be set to 'amperes' as per NWB 2.1.0. warnings.warn( /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': The number of frame indices in 'starting_frame' should have the same length as 'external_file'. warn(error_msg) /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': Format must be 'external' when external_file is specified. warn(error_msg) /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/image.py:106: UserWarning: TwoPhotonSeries 'test_2ps': Length of data does not match length of timestamps. Your data may be transposed. Time should be on the 0th dimension warnings.warn( /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for VoltageClampStimulusSeries 'vcss' is ignored and will be set to 'volts' as per NWB 2.1.0. warnings.warn( /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampSeries 'ccs' is ignored and will be set to 'volts' as per NWB 2.1.0. warnings.warn( /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': The number of frame indices in 'starting_frame' should have the same length as 'external_file'. warn(error_msg) /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': Format must be 'external' when external_file is specified. warn(error_msg) /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for VoltageClampSeries 'vcs' is ignored and will be set to 'amperes' as per NWB 2.1.0. warnings.warn( /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:226: UserWarning: Stimulus description 'NA' for IZeroClampSeries 'izcs' is ignored and will be set to 'N/A' as per NWB 2.3.0. warnings.warn( /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for IZeroClampSeries 'izcs' is ignored and will be set to 'volts' as per NWB 2.1.0. warnings.warn(