Skip to content

fix: silence list_instruments probe warnings (#786) - #807

Merged
cursor[bot] merged 5 commits into
masterfrom
cursor/786-list-instruments-warnings-5e1f
Jul 30, 2026
Merged

fix: silence list_instruments probe warnings (#786)#807
cursor[bot] merged 5 commits into
masterfrom
cursor/786-list-instruments-warnings-5e1f

Conversation

@jepegit

@jepegit jepegit commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Reopens the warnings-only half of #786: cellpy.list_instruments() already returns id / label / models / suffixes, but probe failures still called bare logging.warning(...) (root logger), so silencing only logging.getLogger("cellpy") was ineffective.

  • InstrumentFactory.create_all(quiet=...): expected discovery skips (no DataLoader / missing custom def) → DEBUG on the module logger; other failures → WARNING on that logger (filterable), not root.
  • list_instruments() uses create_all(quiet=True) so the public helper is quiet by contract.
  • Caplog-based quiet regression marked @pytest.mark.essential.
  • Agents guide notes the quiet contract.
  • HISTORY.md promoted to 2.1.1.post3 (planned tag v2.1.1.post3 on master).

Test plan

  • uv run pytest tests/test_instrument_registering.py::test_list_instruments_is_quiet (+ shape test)
  • Manual: logging.basicConfig(level=logging.INFO); cellpy.list_instruments() → no Could not create loader WARNINGs
  • CI essential gate
  • After merge: gh release create v2.1.1.post3 --target master --generate-notes

Closes #786

Open in Web Open in Cursor 

cursoragent and others added 5 commits July 30, 2026 18:17
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>
@cursor
cursor Bot marked this pull request as ready for review July 30, 2026 18:26
@cursor
cursor Bot merged commit c1e02af into master Jul 30, 2026
9 checks passed
@cursor
cursor Bot deleted the cursor/786-list-instruments-warnings-5e1f branch July 30, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

list_instruments() still logs loader-probe warnings on every call

2 participants