Skip to content

template variables: tables and duplicates #419

@oliver-sanders

Description

@oliver-sanders

With namelists we can configure "tables" (i.e, basic mappings):

[namelist:foo]
A=1
B=2
C=3

This also works (in the GUI) with template variables:

[template variables:foo]
A=1
B=2
C=3

And it makes sense here (in the context of template vars, we are configuring a dictionary), however, no template variable is created (this is a configuration dud, it does nothing).

Duplicate settings are equally valid here, they translate to lists.

Given this configuration:

[namelist:foo(1)]
A=1
B=2
C=3

[namelist:foo(2)]
A=4
B=5
C=6

I would expect Cylc Rose to provide a variable equivalent to:

{% set foo=[
  {"A": 1, "B": 2, "C": 3},
  {"A": 4, "B": 5, "C": 6},
] %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFlag this as a question for the next Cylc project meeting.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions