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:
- It logs a
WARNING per non-loader module on every call — config_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.
- 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.
Problem
cellpy.readers.data_structures.instrument_configurations()is the right way todiscover loaders (it's what
print_instrumentsuses), but for an app it has tworough edges:
WARNINGper non-loader module on every call —config_declarations,contract,hooks,declarations,registry,testing, andcustom("Missing instrument definition file"). A GUI calling it at startup has to
bracket it with a log-level bump to keep the console clean.
maccor_txt/pec_csvneed ahuman 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.:
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
Found while building cellpy-simple-gui on cellpy 2.1.0.post1. Full write-up with all items: CELLPY_PAINPOINTS.md.