-
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
Tidy & homogenise usage of CylcOptionParser
#4809
Conversation
74dcbe6
to
0bb5441
Compare
👍 I just started making near-identical changes while looking at #4810, but fortunately saw this PR in time 😁 |
I have actually had this branch going for months, good thing I finally got round to opening a PR for it 😅 |
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.
Great change, much nicer. Working well for me. I have manually tested and run unit tests locally, no problems found.
@staticmethod | ||
def optional(arg: Tuple[str, str]) -> Tuple[str, str]: | ||
"""Make an argdoc tuple display as an optional arg with | ||
square brackets.""" | ||
name, doc = arg | ||
return (f'[{name}]', doc) |
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.
Not sure this is actually helpful but don't mind it that much.
b88c079
to
8e1c103
Compare
- Centralise common ID arg (name, description) tuples - Add docstring to CylcOptionParser `__init__()` - Remove CylcOptionParser's 'prep' argument
8e1c103
to
5e73a64
Compare
Sorry, I didn't see this comment before merging that PR. |
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.
Nice tidy-up. Tests all pass on re-run, no issues found. Oliver's comment was addressed.
CylcOptionParser.__init__()
CylcOptionParser
'sprep
argumentThis is a small change with no associated Issue. But would be a useful thing to get in before #4676
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.