Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1534 +/- ##
==========================================
- Coverage 69.92% 69.67% -0.25%
==========================================
Files 117 117
Lines 14424 14554 +130
==========================================
+ Hits 10086 10141 +55
- Misses 4338 4413 +75
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| table_results_paths = list( | ||
| chain( | ||
| *[ | ||
| part_parent_table.fetch("results_path").tolist() |
There was a problem hiding this comment.
This fetch was causing FileNotFoundError on pytest teardown
There was a problem hiding this comment.
Pull request overview
This pull request addresses failing tests by implementing test output denoising, splitting tri-part makes to prevent deprecation warnings, and fixing various test-related issues. The PR migrates print statements in install.py to a Console class with quiet mode support, adds monkeypatching for external package warnings, sets environment variables to suppress verbose output during tests, and refactors logger usage to respect test mode.
Changes:
- Denoise test output by demoting logger messages to debug level during tests, migrating
install.pyprint statements to Console class, monkeypatching pynwb Device warnings and datajoint file handle issues, and setting environment variables for TensorFlow/tqdm/Qt - Refactor spikesorting v1 tables to use tri-part make pattern (make_fetch, make_compute, make_insert) to avoid transaction-related deprecation warnings
- Fix test infrastructure including dj_config fixture extraction, stdin handling for subprocess calls, and test changes to avoid checking for specific log messages
Reviewed changes
Copilot reviewed 60 out of 61 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/conftest.py | Add environment variable setup, monkeypatch pynwb/datajoint warnings, refactor dj_config fixture |
| tests/setup/conftest.py | Add Console._quiet patch for install.py output suppression |
| tests/setup/test_install.py | Add stdin=subprocess.DEVNULL, use dj_config fixture for DB connection |
| tests/utils/test_mixin.py | Temporarily set logger level to INFO for cautious_delete test |
| tests/utils/test_graph.py | Remove verbose parameters, update test assertions to avoid log checks |
| tests/position/v1/conftest.py | Migrate deprecated pandas applymap to map |
| tests/position/v1/test_pos_merge.py | Ensure trodes_pos_v1 fixture is populated |
| tests/decoding/conftest.py | Add mkdir parents for netcdf mock, handle file errors during cleanup |
| tests/container.py | Reduce container startup logging verbosity |
| tests/common/test_video_import_fail.py | Remove model parameter from CameraDevice (NWB 2.9 compat) |
| tests/common/test_task_epoch_tags.py | Remove caplog assertions, simplify test logic |
| src/spyglass/utils/mixins/base.py | Add _info_msg and _warn_msg helpers that respect test mode |
| src/spyglass/utils/mixins/*.py | Replace direct logger calls with _info_msg/_warn_msg |
| src/spyglass/spikesorting/v1/sorting.py | Split make into make_fetch, make_compute, make_insert |
| src/spyglass/spikesorting/v1/recording.py | Split make into make_fetch, make_compute, make_insert |
| src/spyglass/spikesorting/v1/metric_curation.py | Update waveform extraction to load existing waveforms |
| src/spyglass/common/*.py | Replace logger.info/warning with _info_msg/_warn_msg |
| src/spyglass/position/*.py | Replace logger.info/warning with _info_msg/_warn_msg |
| src/spyglass/position/utils_dlc.py | Refactor suppress_print_from_package to filter stdout/stderr |
| src/spyglass/decoding/decoding_merge.py | Add FileNotFoundError handling in cleanup |
| src/spyglass/utils/database_settings.py | Add "figurl" to shared modules list |
| scripts/install.py | Migrate all print statements to Console class with quiet mode support |
| scripts/validate.py | Add exception handling for database connection errors during import |
| pyproject.toml | Add FutureWarning/PerformanceWarning filters, suppress thread exception warnings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Samuel Bray <sam.bray@ucsf.edu>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 61 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 82 out of 82 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
I saw some failing tests in another PR that seemed unrelated an may have crept in while #1521 was failing tests. In this PR, I...
jsonspecificationsas an editable package - because something else in the pynwb ecosystem is installing it as suchFileNotFounderror launched bydecoding_merge.pyfetching processinstall.pyprintstatements toConsoleclass, that can set aquietmode attributeuuid_from_streamfailing to close open files)tqdmlines during test modeChecklist:
CITATION.cffaltersnippet for release notes.CHANGELOG.mdwith PR number and description.