pcdshub / BEAMS

Beamline Engineering Automation Management Systems
Other
1 stars 2 forks source link

JSON generated trees #8

Closed joshc-slac closed 1 month ago

joshc-slac commented 4 months ago

The best structure of the actual configuration file is slightly eluding me.

For real, interesting, multilayered trees we probably will just need to explicitly have a list of node objects within the json document that specify their parent child relationships within the tree.

This likely looks like adding: parent and child fields to the: CheckAndDoNodeEntry class. https://github.com/pcdshub/BEAMS/blob/0460058cdb1c1447cea7db0cc3b6a5dc12786d32/beams/tree_generator/TreeSerializer.py#L81-L85

Then making the notion of config document able to hold multiple of these classes. My unfamiliarity with apischema is throwing me off the scent here.

tangkong commented 3 months ago

It shouldn't be a problem to have any given _NodeEntry hold "children" that are also _NodeEntry subclasses. We do this in atef (link) and in the new superscore (link)

When you say apischema is throwing you, I take that to mean there's something in deserialization / serialization that's giving you trouble? If you just create the data structure without caring about apischema, what do you get?

joshc-slac commented 1 month ago

This an #18 seem very related.

tangkong commented 1 month ago

closed by #30