Skip to content

Conversation

brettviren
Copy link
Member

This is the start of an idea to better handle configuration. It's in the same vein as the moribund #105 but with more of an adiabatic plan. To start with, all this does is dump a JSON representation of component metadata:

wire-cell -a ConfigSchema \
    -p WireCellApps -p WireCellGen -p WireCellAux -p WireCellSigProc -p WireCellImg \
    | json_pp > schema.json

The JSON representation includes:

  • The WCT "type" name, C++ class name and names of all the interfaces
  • If the component is an IConfigurable then the schema describing the object returned by default_configuration() is generated, with the default values included.
  • If the component is an INode then the category, signature and data types passed by the input/output ports are included.

Note: since not all IConfigurable implementations return a full object from default_configuration() the dumped schema will not be complete.

Long term, the idea is that this dump can turn around and become human-developed and used to generate c++ config structs a'la #105. Until then there are plans to exploit the dump to generate some added value: documentation, Jsonnet helpers, graph validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant