Skip to content
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

Merged
merged 14 commits into from
Oct 11, 2021

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Oct 7, 2021

These changes:

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.py and
    conda-environment.yml.
  • Appropriate tests are included (unit and/or functional).
  • Appropriate change log entry included.
  • (master branch) I have opened a documentation PR at companion to https://github.com/cylc/cylc-flow/pull/4455 cylc-doc#305.

If merging, please squash-merge.

@wxtim wxtim changed the title 4438.rename cylc s UI te name ~_W'FLOW_NAME~_W'FLOW_ID and ~_W'FLOW_NAME re-instated as Cylc7 consistent Oct 7, 2021
@wxtim wxtim self-assigned this Oct 7, 2021
@wxtim wxtim added the could be better Not exactly a bug, but not ideal. label Oct 7, 2021
@wxtim wxtim added this to the cylc-8.0rc1 milestone Oct 7, 2021
wxtim added a commit to wxtim/cylc-doc that referenced this pull request Oct 7, 2021
@MetRonnie MetRonnie modified the milestones: cylc-8.0rc1, cylc-8.0b3 Oct 7, 2021
Copy link
Member

@MetRonnie MetRonnie left a 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

cylc/flow/config.py Show resolved Hide resolved
cylc/flow/pathutil.py Outdated Show resolved Hide resolved
cylc/flow/pathutil.py Outdated Show resolved Hide resolved
tests/functional/lib/bash/test_header Show resolved Hide resolved
@wxtim wxtim requested a review from MetRonnie October 7, 2021 13:37
@wxtim
Copy link
Member Author

wxtim commented Oct 7, 2021

I'm seeing empty files Numbat, Quokka and Wambenger

Fail, on my part.

cylc/flow/pathutil.py Outdated Show resolved Hide resolved
Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

@wxtim could you also replace REG with WORKFLOW_ID in CLI help docstrings? That would close #3817 as well (which is linked as part of the proposal in #4438)

@MetRonnie
Copy link
Member

MetRonnie commented Oct 8, 2021

Seeing as most commands infer the run number now, I think it would be more appropriate to rename REG to WORKFLOW? The description could be "Workflow name or ID".

And for the offline commands, which accept paths as well as the workflow name/id, perhaps we should use WORKFLOW | PATH?

cylc/flow/scripts/clean.py Show resolved Hide resolved
cylc/flow/scripts/config.py Outdated Show resolved Hide resolved
cylc/flow/scripts/install.py Outdated Show resolved Hide resolved
cylc/flow/scripts/install.py Outdated Show resolved Hide resolved
cylc/flow/scripts/reload.py Show resolved Hide resolved
cylc/flow/scripts/subscribe.py Outdated Show resolved Hide resolved
wxtim and others added 2 commits October 11, 2021 07:19
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@wxtim wxtim requested a review from hjoliver October 11, 2021 06:39
@wxtim
Copy link
Member Author

wxtim commented Oct 11, 2021

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 cylc play so I have changed that too.

Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

Thanks

Copy link
Member

@hjoliver hjoliver left a 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

@hjoliver hjoliver merged commit 63146d5 into cylc:master Oct 11, 2021
Copy link
Member

@oliver-sanders oliver-sanders left a 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.

cylc/flow/option_parsers.py Show resolved Hide resolved
>>> get_workflow_name_from_id('my_other_workflow')
'my_other_workflow'
"""
return re.sub(rf'{re.escape(os.sep)}run\d+$', '', workflow_id)
Copy link
Member

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")
Copy link
Member

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.

Copy link
Member Author

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')]
Copy link
Member

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"),
Copy link
Member

Choose a reason for hiding this comment

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

"Workflow ID"?

@wxtim wxtim deleted the 4438.rename_CYLC_SUITE_NAME branch October 13, 2021 13:38
wxtim added a commit to wxtim/cylc-doc that referenced this pull request Oct 15, 2021
hjoliver added a commit to cylc/cylc-doc that referenced this pull request Oct 19, 2021
wxtim added a commit to wxtim/cylc-doc that referenced this pull request Oct 26, 2021
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workflow name environment variable Swap REG for FLOW (or similar) in command help
4 participants