# How to see the result of runtime inheritance

**URL:** https://cylc.discourse.group/t/how-to-see-the-result-of-runtime-inheritance/906
**Category:** Tips
**Created:** [February 27, 2024, 10:04pm UTC](https://cylc.discourse.group/t/how-to-see-the-result-of-runtime-inheritance/906 "2024-02-27T22:04:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)
#### Post date: [February 27, 2024, 10:04pm UTC](https://cylc.discourse.group/t/how-to-see-the-result-of-runtime-inheritance/906/1 "2024-02-27T22:04:34Z")

</div>

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:

```ini
[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:

```auto
$ cylc config . -i '[runtime][foo][environment]PET'
rock
$ cylc config . -i '[runtime][bar][environment]PET'
dog

```

And:

```auto
$ cylc graph -n .

```

![graph-n](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/af6017144392ae9ced92768e866d2425eded4c15.png)

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.

---

<div class="post-metadata">

### Author: ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)
#### Post date: [February 28, 2024, 9:48am UTC](https://cylc.discourse.group/t/how-to-see-the-result-of-runtime-inheritance/906/2 "2024-02-28T09:48:56Z")

</div>

For a walk-through of inheritance in Cylc, see the inheritance tutorial:

[https://cylc.github.io/cylc-doc/stable/html/tutorial/furthertopics/inheritance.html](https://cylc.github.io/cylc-doc/stable/html/tutorial/furthertopics/inheritance.html)

---

<div class="post-metadata">

### Author: ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)
#### Post date: [March 4, 2024, 8:01am UTC](https://cylc.discourse.group/t/how-to-see-the-result-of-runtime-inheritance/906/3 "2024-03-04T08:01:36Z")

</div>

A small follow-up.

> [@hilary.j.oliver](#):
>
> To work out the result, we use the _method resolution order_ algorithm from Python’s class inheritance model.

You can use `cylc list` to see this:

```auto
$ cylc list --mro .
bar bar FAM1 FAM2 root
foo foo FAM3 FAM1 FAM2 root

```
