If you have a complex workflow it can be difficult to see at a glance exactly what settings a particular task ends up with through inheritance.
- the
cylc config
command prints parsed settings after inheritance processing - the
cylc graph
command can show the runtime inheritance hierarchy, as well as the task graph
Example:
[scheduling]
[[graph]]
R1 = "foo => bar"
[runtime]
[[root]]
script = "echo my pet is a $PET"
[[[environment]]]
PET = "cat"
[[FAM1]]
[[[environment]]]
PET = "dog"
[[FAM2]]
[[[environment]]]
PET = "fish"
[[FAM3]]
inherit = FAM1, FAM2
[[[environment]]]
PET = "rock"
[[foo]]
inherit = FAM3
[[bar]]
inherit = FAM1, FAM2
Result:
$ cylc config . -i '[runtime][foo][environment]PET'
rock
$ cylc config . -i '[runtime][bar][environment]PET'
dog
And:
$ cylc graph -n .
Note Cylc allows multiple inheritance - i.e. you can inherit from multiple families at once. To work out the result, we use the method resolution order algorithm from Python’s class inheritance model.