Summary
InstanceLibrary.createInstanceTable currently relies on hardcoded folder-name branching and emits warnings for unmapped folders:
- File:
code/internal/+openminds/+internal/@InstanceLibrary/InstanceLibrary.m
- Warning ID:
OPENMINDS:InstanceLibrary:createInstanceTable:MissingTypeMapping
This should be made more automatic and covered by CI to catch regressions earlier.
Current pain point
When a new instance folder appears without an explicit mapping, runtime warnings are raised instead of the mapping being handled by a formalized mechanism. This is easy to miss until late and can drift over time.
Requested improvements
- Formalize mapping
- Replace/augment ad-hoc branching with a formalized mapping source (e.g., JSON config and/or deterministic mapping rules).
- Ensure mapping updates are maintainable and reviewable outside deeply nested conditionals.
- Add regression workflow
- Add automated workflow/test that regularly verifies this class can be instantiated without emitting
MissingTypeMapping warnings for supported data layouts.
- Fail CI when new unmapped folders introduce this warning unexpectedly.
Acceptance criteria
- Mapping behavior is driven by explicit config/rules, not only hardcoded conditional branches.
InstanceLibrary instantiation path is exercised in automated checks.
- CI detects and fails on unexpected
OPENMINDS:InstanceLibrary:createInstanceTable:MissingTypeMapping warnings.
- Documentation (or comments) explains how to extend mapping when new folders are introduced.
Summary
InstanceLibrary.createInstanceTablecurrently relies on hardcoded folder-name branching and emits warnings for unmapped folders:code/internal/+openminds/+internal/@InstanceLibrary/InstanceLibrary.mOPENMINDS:InstanceLibrary:createInstanceTable:MissingTypeMappingThis should be made more automatic and covered by CI to catch regressions earlier.
Current pain point
When a new instance folder appears without an explicit mapping, runtime warnings are raised instead of the mapping being handled by a formalized mechanism. This is easy to miss until late and can drift over time.
Requested improvements
MissingTypeMappingwarnings for supported data layouts.Acceptance criteria
InstanceLibraryinstantiation path is exercised in automated checks.OPENMINDS:InstanceLibrary:createInstanceTable:MissingTypeMappingwarnings.