fix: silence list_instruments probe warnings (#786) - #807
Merged
Conversation
Expected discovery skips (no DataLoader / missing custom def) log at DEBUG via the module logger; list_instruments() uses create_all(quiet=True) so the public helper stays quiet even when the root logger is at INFO. Harden the quiet regression with caplog + essential marker. Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Promote Unreleased to 2.1.1.post3 for the quiet list_instruments probe fix, archive the issue-flow group, and plan tag v2.1.1.post3 on master. Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
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.
Summary
Reopens the warnings-only half of #786:
cellpy.list_instruments()already returnsid/label/models/suffixes, but probe failures still called barelogging.warning(...)(root logger), so silencing onlylogging.getLogger("cellpy")was ineffective.InstrumentFactory.create_all(quiet=...): expected discovery skips (noDataLoader/ missing custom def) → DEBUG on the module logger; other failures → WARNING on that logger (filterable), notroot.list_instruments()usescreate_all(quiet=True)so the public helper is quiet by contract.@pytest.mark.essential.HISTORY.mdpromoted to 2.1.1.post3 (planned tagv2.1.1.post3onmaster).Test plan
uv run pytest tests/test_instrument_registering.py::test_list_instruments_is_quiet(+ shape test)logging.basicConfig(level=logging.INFO); cellpy.list_instruments()→ noCould not create loaderWARNINGsgh release create v2.1.1.post3 --target master --generate-notesCloses #786