Open gilesknap opened 5 months ago
entities that have no id are not available to Jinja at this stage
What defines whether an Entity has an id or not?
entities that have no id are not available to Jinja at this stage
What defines whether an Entity has an id or not?
You define an id with an Arg like this:
You only need to make an ID if you want to refer to the thing from another entity.
I think that is going to be a common point of confusion, so should have a very clear explanation and maybe some examples of defining and referencing
Jinja rendering of parameters / defines now all happens in the Entity model validator during IOC instance deserialisation.
https://github.com/epics-containers/ibek/blob/list-arg2dict-param/src/ibek/ioc.py#L97-L122
The second phase of jinja rendering of pre_init, post_init, databases happens in ioc_commands.generate.
I have a good handle on the order of jinja rendering and it is relatively intuitive. Just need to write it up.
This needs adding to the docs as an essential guide to how your yaml gets turned into runtime assets.
That's it! (phew!). Although this reads as complicated it is essentially just saying everything happens top to bottom of the yaml.
UPDATE: Caveat: Values are always evalutated after Args - this might be an issue. Maybe we need a PreValues and a PostValues to support the Technosoft axis number field??