-
Notifications
You must be signed in to change notification settings - Fork 93
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
Get Cylc template variables from database for validation. #5189
Get Cylc template variables from database for validation. #5189
Conversation
08db7c2
to
a438418
Compare
77823b7
to
f7ba0b9
Compare
Now working :) |
290d794
to
5935610
Compare
… collected from database of already played workflows. - Added `--revaladidate` as an option to the following scripts (Made async to allow testing of changes): - cylc validate - cylc view - cylc graph - cylc config
5935610
to
b2e51e2
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.
LGTM
cylc/flow/option_parsers.py
Outdated
if self.revalidate: | ||
self.add_std_option( | ||
'--revalidate', | ||
help="Get template variables from prevous workflow run.", | ||
action='store_true', default=False | ||
) |
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.
Were we going to infer this option if the provided workflow is a run directory?
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.
Yes
@@ -251,7 +251,7 @@ def process_plugins(fpath, opts): | |||
# If you want it to work on sourcedirs you need to get the options | |||
# to here. | |||
plugin_result = entry_point.resolve()( | |||
srcdir=fpath, opts=opts | |||
fpath, opts=opts |
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.
Note: Double check that cylc-rose is ok with this.
"""Extract key and value and run eval_var on them assigning | ||
them to self.template_vars. | ||
""" | ||
self.template_vars[row[0]] = eval_var(row[1]) |
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.
Note: check that eval_var
doesn't require fancy error catching for its other uses in the code.
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.
I'm not sure what you're asking me here.
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.
Quick skim, looks good.
This will want rebasing on Cylc VIP branch after merge. |
Co-authored-by: Hilary James Oliver <[email protected]>
… of github.com:wxtim/cylc into 20221010T0945--HEAD--get_template_vars_from_running_wf * '20221010T0945--HEAD--get_template_vars_from_running_wf' of github.com:wxtim/cylc: (51 commits) make revalidate automatic if workflow has changed at source play: --upgrade and --downgrade options Fix consolidation tutorial (cylc#5199) 8.0.x -> master (cylc#5206) GH Actions Codecov upload: try using token arg (cylc#5179) Update CHANGES.md [skip ci] Add type hints. Switch to better monkeypatching approach. [skip ci] Add explanatory comments. [skip ci] Update CHANGES.md [skip ci] play: check Cylc version on restart Use a context manager in new test. Update change log. Extend new test coverage. install: scan only target workflow Apply suggestions from code review Add integration test. Scan workflow name during install. fix an error handling bug in Cylc Scan update PR template (cylc#5202) ...
I'm leaving this in draft format - I prefer the approach I took in #5214 - and that will probably form the basis for the work on validation for reinstall. |
Allowed "revalidation" of cylc workflows where template variables are collected from
Probably closes #4740
database of already played workflows.
--revaladidate
as an option to the following scripts (Made async to allow testing of changes):Check List
CONTRIBUTING.md
and added my name as a Code Contributor.CHANGES.md
entry included if this is a change that can affect users