Right now, Guarneri iterates through it's mapping of device class names to device classes and checks if that name is present in the internal dictionary.
New Behavior
Based on discussion with @MDecarabas and @prjemian, we should flip this. Instead, let's create an internal structure from the TOML file that looks something like:
then we can iterate through this structure and construct the devices accordingly.
Benefits
1) Mistyped classes can be identified when parsing, and raise exceptions.
2) Device class aliases can be optional. If a device class is not in the initial mapping, but is still importable by Guarneri, it can still be added. No coding necessary.
Current Behavior
The main internal structure for Guarneri is like:
Right now, Guarneri iterates through it's mapping of device class names to device classes and checks if that name is present in the internal dictionary.
New Behavior
Based on discussion with @MDecarabas and @prjemian, we should flip this. Instead, let's create an internal structure from the TOML file that looks something like:
then we can iterate through this structure and construct the devices accordingly.
Benefits
1) Mistyped classes can be identified when parsing, and raise exceptions. 2) Device class aliases can be optional. If a device class is not in the initial mapping, but is still importable by Guarneri, it can still be added. No coding necessary.