Skip to content

Expand docs on code and variables in the flow.cylc. - #953

Open
hjoliver wants to merge 8 commits into
cylc:masterfrom
hjoliver:doc-use-of-variables
Open

hjoliver wants to merge 8 commits into
cylc:masterfrom
hjoliver:doc-use-of-variables

Conversation

@hjoliver

@hjoliver hjoliver commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

I frequently encounter users who still don't have a good grasp of where Jinja2 and shell variables and code can be used in a workflow, and when and where they are evaluated.

This expands on the relevant documentation a bit, and gives some explicit examples.

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.

@hjoliver
hjoliver force-pushed the doc-use-of-variables branch from d7299c8 to 06c7192 Compare July 17, 2026 03:48
@hjoliver hjoliver self-assigned this Jul 17, 2026
@hjoliver hjoliver added this to the 8.6.x milestone Jul 17, 2026
@hjoliver
hjoliver force-pushed the doc-use-of-variables branch 8 times, most recently from 43faad6 to 14ee6d2 Compare July 17, 2026 05:44
@hjoliver
hjoliver force-pushed the doc-use-of-variables branch from 14ee6d2 to c79e5b0 Compare October 4, 2026 20:37
@hjoliver

hjoliver commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

@cylc/core - would be good to get this in, if anyone can spare time for a quick review

@jfrost-mo jfrost-mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a sensible addition to the documentation. There are a couple minor fixes needed, and I'd also suggesting splitting the examples so they either show valid or invalid use, rather than a mix of both in the same example.

Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
@hjoliver
hjoliver force-pushed the doc-use-of-variables branch from bdca4c6 to b9a293d Compare October 6, 2026 01:07
@hjoliver

hjoliver commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

All review comments addressed, I think @jfrost-mo

(Note, examples of use of Jinja2 strings that embed shell variables might seem a bit obtuse, but I've seen users trying to do this sort of thing without really understanding what gets evaluated when and where).

@jfrost-mo jfrost-mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that reads much more clearly now, thanks.

Only a small additional change requested to link a couple glossary terms, including a new definition of "run host".

Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
@jfrost-mo jfrost-mo modified the milestones: 8.6.x, 8.7.x Oct 7, 2026
@MetRonnie
MetRonnie self-requested a review October 7, 2026 14:42
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst Outdated
Comment thread src/user-guide/writing-workflows/configuration.rst
hjoliver and others added 4 commits October 8, 2026 11:48
Co-authored-by: James Frost <james.frost@metoffice.gov.uk>
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@hjoliver

hjoliver commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Comments addressed.

@jfrost-mo jfrost-mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants