Closed plasorak closed 1 year ago
Hi @brettviren , Could you have another look at this PR? I think I would consider it basically done.
Hi @plasorak
Sorry, after our email discussion from last Dec it looks like this PR flew under my radar.
It looks good to me. I'll merge.
It would be nice to also include some tests and/or examples.
Ok, I think this is ready now. Basically this is adding 2 templates for generating python structures, one of them hold the python classes themselves, the other the way to serialise and deserialise json files. So with this, we should be able to generate python code at compile time in the DAQ, and have all of this loading quicker than the old way. This also simplifies quite a bit the user code needed to access the schema holding classes.
There is quite a bit of type checks (and they may not be the best way of doing things).
There is some unfinished business in daqconf that uses it. For example, this schema can be parsed: https://github.com/DUNE-DAQ/daqconf/blob/plasorak/python-codegen/schema/daqconf/confgen.jsonnet
I'm happy to receive comments!