There should be a basic schema and example that can be used for YAML files if no customization is needed. If people have specific needs, then they can re-implement Instrument.parse_yaml_file() or Instrument.parse_config().
Current Behavior
There is a stub Instrument.parse_yaml_file() that raises NotImplementedError if Instrument.load() is given a .yaml file.
Possible Solution
We can implement Instrument.parse_yaml_file(). I think the proposed YAML schema below fits nicely with the internal definitions used by Guarneri, so shouldn't be too hard to do.
We should make sure there aren't any common use cases that aren't met, though. Certainly open to discussion.
Here is some example YAML that would parse easily into Guarneri's internal device list.
We should implement the YAML parser as well as the TOML parser.
I included a candidate YAML schema below. Does this meet the general use case, and is there anything common that wouldn't fit?
It would be nice if we could maintain some level of similarity with the existing TOML schema: https://github.com/spc-group/guarneri/blob/sansio/src/guarneri/iconfig_example.toml
Expected Behavior
There should be a basic schema and example that can be used for YAML files if no customization is needed. If people have specific needs, then they can re-implement
Instrument.parse_yaml_file()
orInstrument.parse_config()
.Current Behavior
There is a stub
Instrument.parse_yaml_file()
that raisesNotImplementedError
ifInstrument.load()
is given a.yaml
file.Possible Solution
We can implement
Instrument.parse_yaml_file()
. I think the proposed YAML schema below fits nicely with the internal definitions used by Guarneri, so shouldn't be too hard to do.We should make sure there aren't any common use cases that aren't met, though. Certainly open to discussion.
Here is some example YAML that would parse easily into Guarneri's internal device list.