caracal-pipeline / stimela

Stimela 2.0
GNU General Public License v2.0
5 stars 4 forks source link

Attempt at making substitutions work inside dicts and lists. #269

Closed JSKenyon closed 7 months ago

JSKenyon commented 8 months ago

This PR aims to improve substitutions by supporting them inside compound types. This probably needs extensive testing, but the following should now work:

inputs:
  foo:  # foo is Dict[str, Tuple[File, float, str]] type.
    bar: [=expression_with_substitution, 1, example]  

or equivalently:

inputs:
  foo:   # foo is Dict[str, Tuple[File, float, str]] type.
    bar: =LIST(substitution, 1, "example")

This should also support more complicated cases e.g.:

inputs:
  foo:   # foo is List[Dict[str, Tuple[File, float, str]]] type.
    bar: 
      - baz: [=expression_with_substitution, 1, example]