Closed hjoliver closed 1 year ago
(Assigned reviewers of the cylc-flow sibling PR).
Test case, to confirm the docs:
#!Jinja2
[scheduling]
[[graph]]
R1 = "foo"
[runtime]
[[foo]]
script = """
# ALL:
echo CYLC_VERSION {{CYLC_VERSION}}
echo CYLC_WORKFLOW_NAME {{CYLC_WORKFLOW_NAME}}
echo CYLC_TEMPLATE_VARS {{CYLC_TEMPLATE_VARS}}
# ONLY if installed:
echo CYLC_WORKFLOW_ID {{CYLC_WORKFLOW_ID | default("xxxxxxxxxxxx")}}
echo CYLC_WORKFLOW_RUN_DIR {{CYLC_WORKFLOW_RUN_DIR | default("xxxxxxxxxxxx")}}
# ONLY if running:
echo CYLC_WORKFLOW_LOG_DIR {{CYLC_WORKFLOW_LOG_DIR | default("xxxxxxxxxxxx")}}
echo CYLC_WORKFLOW_SHARE_DIR {{CYLC_WORKFLOW_SHARE_DIR | default("xxxxxxxxxxxx")}}
echo CYLC_WORKFLOW_WORK_DIR {{CYLC_WORKFLOW_WORK_DIR | default("xxxxxxxxxxxx")}}
"""
Result:
cylc-src/bug $ cylc config -i '[runtime][foo]script' . # src
# ALL:
echo CYLC_VERSION 8.3.0.dev
echo CYLC_WORKFLOW_NAME bug
echo CYLC_TEMPLATE_VARS {'CYLC_VERSION': '8.3.0.dev', 'CYLC_TEMPLATE_VARS': {...}}
# ONLY if installed:
echo CYLC_WORKFLOW_ID xxxxxxxxxxxx
echo CYLC_WORKFLOW_RUN_DIR xxxxxxxxxxxx
# ONLY if running:
echo CYLC_WORKFLOW_LOG_DIR xxxxxxxxxxxx
echo CYLC_WORKFLOW_SHARE_DIR xxxxxxxxxxxx
echo CYLC_WORKFLOW_WORK_DIR xxxxxxxxxxxx
cylc-src/bug $ cylc config -i '[runtime][foo]script' bug # installed
# ALL:
echo CYLC_VERSION 8.3.0.dev
echo CYLC_WORKFLOW_NAME bug
echo CYLC_TEMPLATE_VARS {'CYLC_VERSION': '8.3.0.dev', 'CYLC_TEMPLATE_VARS': {...}}
# ONLY if installed:
echo CYLC_WORKFLOW_ID bug/run19
echo CYLC_WORKFLOW_RUN_DIR /home/oliverh/cylc-run/bug/run19
# ONLY if running:
echo CYLC_WORKFLOW_LOG_DIR xxxxxxxxxxxx
echo CYLC_WORKFLOW_SHARE_DIR xxxxxxxxxxxx
echo CYLC_WORKFLOW_WORK_DIR xxxxxxxxxxxx
Merged your two suggestions @MetRonnie
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.