Make a new standard template variable "CYLC_SOURCE_DIRECTORY"#6944
Make a new standard template variable "CYLC_SOURCE_DIRECTORY"#6944oliver-sanders merged 8 commits intocylc:masterfrom
Conversation
a29e8ef to
fb36184
Compare
tests/functional/cylc-combination-scripts/10-CYLC_SOURCE_DIRECTORY.t
Outdated
Show resolved
Hide resolved
33b7c58 to
8418026
Compare
There was a problem hiding this comment.
(I'm sure you were about to do the var name changes, sorry!)
For completeness, should this be added as a job environment variable too?
(Probably NO - we don't want jobs to mess with source dirs, as a matter of principle - but other template vars are also job vars(?), and maybe a valid use case could be conjured up...)
For
Against
So I'm going to say no. |
2a6bb49 to
2d4b27d
Compare
available to users. Response to review * Make new variable CYLC_WORKFLOW_SRC_DIR. * Remove cylc-rose testing.
2d4b27d to
43243fb
Compare
Nooooo! We definitely shouldn't be encouraging workflow writers to make use of resources in the workflow src dir. Note, we already decided this which is why we removed the Exposing the source dir at all is annoying, but I have been convinced that this is necessary for rose-stem type use cases. |
🤣 - well that's why I said "probably NO", just checking. |
|
@wxtim - you have resolved the first two of my suggestions without applying them. If that was deliberate, I'll argue the point: They're not functional code but should use the actual variable name |
Not intentional - Either some sort of regression of failure of mine making the changes locally, or GH having some sort of brain fart and not applying changes I asked it to. |
tests/functional/cylc-combination-scripts/10-CYLC_WORKFLOW_SRC_DIR.t
Outdated
Show resolved
Hide resolved
…_DIR.t Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
| cylc vip \ | ||
| --pause \ | ||
| --no-run-name \ | ||
| --workflow-name "${WORKFLOW_NAME}" |
There was a problem hiding this comment.
I'm not sure we need to run the workflow for this test?
| cylc vip \ | |
| --pause \ | |
| --no-run-name \ | |
| --workflow-name "${WORKFLOW_NAME}" | |
| cylc install \ | |
| --no-run-name \ | |
| --workflow-name "${WORKFLOW_NAME}" |
There was a problem hiding this comment.
Subsequent test requires the flow-processed.cylc to check that the new variable is available and correct. As far as I can tell, template variables provided by Cylc (as opposed to those stored by rose-suite-cylc-install.conf) are not stored on installation.
tests/functional/cylc-combination-scripts/10-CYLC_WORKFLOW_SRC_DIR.t
Outdated
Show resolved
Hide resolved
tests/functional/cylc-combination-scripts/10-CYLC_WORKFLOW_SRC_DIR.t
Outdated
Show resolved
Hide resolved
…_DIR.t Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
tests/functional/cylc-combination-scripts/10-CYLC_WORKFLOW_SRC_DIR.t
Outdated
Show resolved
Hide resolved
| run_ok "${TEST_NAME_BASE}-vip" \ | ||
| cylc vip \ |
There was a problem hiding this comment.
Would be good to add a cylc view -p test here (works when I try it manually) to make sure this variable is provided in that context too (note config parsing doesn't happen here so it's a likely breakage).
Would be something like:
run_ok ... cylc view -p
grep_ok ... "${TEST_NAME}.stdout"…_DIR.t Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
available to users.
Closes #6830
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.