-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Jinja2 and EmPy templating sections. #631
Conversation
(Assigned reviewers of the cylc-flow sibling PR). |
d213bda
to
13da1c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Built it and read the built version.
- Read the source.
I've left a couple of comments. Neither should block merge.
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 |
Co-authored-by: Ronnie Dutta <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
Merged your two suggestions @MetRonnie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failure seems unrelated
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.