Skip to content

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

Description

@jepegit

Problem

cellpy.readers.data_structures.instrument_configurations() is the right way to
discover loaders (it's what print_instruments uses), but for an app it has two
rough edges:

  1. It logs a WARNING per non-loader module on every callconfig_declarations,
    contract, hooks, declarations, registry, testing, and custom
    ("Missing instrument definition file"). A GUI calling it at startup has to
    bracket it with a log-level bump to keep the console clean.
  2. The result isn't display-ready — ids like maccor_txt / pec_csv need a
    human label, and the raw file suffix/extension isn't returned alongside the
    models, so apps keep their own label + extension map.

Suggestion

A quiet, app-facing helper, e.g.:

cellpy.list_instruments()
# -> [{"id": "maccor_txt", "label": "Maccor (text)",
#      "models": ["one","two","three", ...], "suffixes": [".txt"]}, ...]

that (a) does not emit warnings for skipped/non-loader modules, and (b) includes a
human label and the raw suffix(es). This would let apps build an instrument picker

  • ingestion form directly from cellpy.

Found while building cellpy-simple-gui on cellpy 2.1.0.post1. Full write-up with all items: CELLPY_PAINPOINTS.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementv2cellpy v2 work - PRs should target the master branch

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions