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

parse_reg(): Avoid unnecessary reg clash messages #4441

Merged
merged 3 commits into from
Oct 1, 2021

Conversation

MetRonnie
Copy link
Member

These changes close #4358

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)
  • No changelog entry needed (fixing an annoyance introduced in Infer run number & centralised reg parse #4285, we didn't release a version since that)
  • No documentation update required.

@MetRonnie MetRonnie added small could be better Not exactly a bug, but not ideal. labels Sep 29, 2021
@MetRonnie MetRonnie added this to the cylc-8.0b3 milestone Sep 29, 2021
@MetRonnie MetRonnie self-assigned this Sep 29, 2021
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.

LGTM 👍

@@ -1169,10 +1169,11 @@ def parse_reg(reg: str, src: bool = False, warn_depr=True) -> Tuple[str, Path]:
"""
if not src:
validate_workflow_name(reg)
cur_dir = reg.startswith(f'{os.curdir}{os.sep}') # if starts with './'
Copy link
Member

@wxtim wxtim Oct 1, 2021

Choose a reason for hiding this comment

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

cur_dir doesn't really match a data type of boolean IMO.
It's a bit of a mouthful, but I thing reg_is_curdir might be more helpful?

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

  • Read and happy
  • Tried it locally

Made a small written communication suggestion. Matter of opinion which shouldn't stand in the way of merger if you wish to leave as is.

@wxtim wxtim merged commit 8032b25 into cylc:master Oct 1, 2021
@MetRonnie
Copy link
Member Author

MetRonnie commented Oct 1, 2021

(Do remember to wait for the tests to pass before merging - in this case failing due to flakiness so ok)

@MetRonnie MetRonnie deleted the reg-parse branch October 1, 2021 12:48
@wxtim
Copy link
Member

wxtim commented Oct 1, 2021

(Do remember to wait for the tests to pass before merging - in this case failing due to flakiness so ok)

I was confident that they would pass after the change you had made, because the change was not significant, and they passed before.

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. small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Centralised reg parse should handle "./" better
3 participants