Skip to content

Bare bones support for introspection of suite definitions #3843

@TomekTrzeciak

Description

@TomekTrzeciak

The ultimate solution to this is Python API to Cylc #1962, but in the meantime it would really help to have at least some basic form of introspection and manipulation available to work with suite definitions in code rather than by splicing text fragments.

Here's a non-committal proposal that can be ditched as soon as jinja2 becomes a thing of the past - expose parsec module as two jinja2 filters for parsing and (re)dumping:

{% filter cylc_parse | some_user_filter | cylc_dump %}
[schedulling]
...
{% endfilter %}

{% set rt | cylc_parse %}
[runtime]
...
{% endset %}

{{ rt | some_other_filter | cylc_dump }}

I think this would be already enough to satisfy the basic needs, cf. #1962 (comment).

The benefit of tying it into jinja and the current ini format is that it's easy to ditch when moving to Python API or another format (like YAML) in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions