-
Notifications
You must be signed in to change notification settings - Fork 94
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
~_W'FLOW_NAME
⇒ ~_W'FLOW_ID
and ~_W'FLOW_NAME
re-instated as Cylc7 consistent
#4455
Conversation
Made CYLC_WORKFLOW_ID = CYLC_WORKFLOW_NAME - trailing "runX"
~_W'FLOW_NAME
⇒ ~_W'FLOW_ID
and ~_W'FLOW_NAME
re-instated as Cylc7 consistent
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 seeing empty files Numbat
, Quokka
and Wambenger
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
Fail, on my part. |
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.
Seeing as most commands infer the run number now, I think it would be more appropriate to rename And for the offline commands, which accept paths as well as the workflow name/id, perhaps we should use |
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
Thanks for all your help with this @MetRonnie - I seemed to have missed a fair few things. 😢 Having said which a quick play showed me that I'd missed |
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.
Thanks
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.
Looks good, thanks @wxtim
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.
Sorry for the post-humorous review.
I think there are lots of CYLC_WORKFlOW_NAME
variables left which weren't renamed to CYLC_WORKFLOW_ID
. These will be getting a different value which could cause issues. Because the tests generally don't make use of run names these issues may have been missed here.
>>> get_workflow_name_from_id('my_other_workflow') | ||
'my_other_workflow' | ||
""" | ||
return re.sub(rf'{re.escape(os.sep)}run\d+$', '', workflow_id) |
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.
This will not work for named runs, need to use the _cylc-install
dir to determine the workflow name.
(note if there is no _cylc-install
dir then the workflow name == workflow id)
@@ -91,7 +93,7 @@ | |||
""" | |||
|
|||
|
|||
FLOW_NAME_ARG_DOC = ("REG", "Workflow name") | |||
FLOW_NAME_ARG_DOC = ("WORKFLOW", "Workflow name or ID") |
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 think this should just be "Workflow ID".
The workflow name would only work if using numbered runs and the run you want to use is the latest.
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.
Do you not think that will be quite a large portion of use cases?
@@ -224,7 +224,7 @@ def get_option_parser(): | |||
"""CLI for "cylc broadcast".""" | |||
parser = COP( | |||
__doc__, comms=True, | |||
argdoc=[('REG', "Workflow name")] | |||
argdoc=[('WORKFLOW', 'Workflow name or ID')] |
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.
"Workflow ID"?
@@ -225,7 +225,7 @@ def get_option_parser(): | |||
parser = COP( | |||
__doc__, | |||
argdoc=[ | |||
("REG", "Workflow name"), | |||
("WORKFLOW", "Workflow name or ID"), |
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.
"Workflow ID"?
…ylc.reviw * 'master' of github.com:cylc/cylc-doc: Apply suggestions from code review Update src/glossary.rst fix some CYLC_WORKFLOW_NAME ⇒ ID companion to cylc/cylc-flow#4455 Make config upgrade section slightly more concise Add more detail to back compat section Remove obsolete caveat Add line about Cylc 7 back compat mode
These changes:
close workflow name environment variable #4438
close Swap REG for FLOW (or similar) in command help #3817
Rename
CYLC_WORKFLOW_NAME
toCYLC_WORKFLOW_ID
(to match universal ID and CLI use).Add a
CYLC_WORKFLOW_NAME
variable which is the same but with the run name removed.Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.py
andconda-environment.yml
.If merging, please squash-merge.