-
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
Cylc config add --platform-names
#4576
Cylc config add --platform-names
#4576
Conversation
1f38a9e
to
9af97bc
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.
Looks fine, need to complete checkboxes in desc.
tests/f/cylc-config/09-platforms.t failing |
Should have that fixed. |
Tests are passing, looks good, just needs rebase squash'n. |
…ed tests/cylc-get-config to tests/cylc-config
1ba95d5
to
ac32e7e
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.
Small thing: with no [platform groups]
in my global config,
$ cylc config --platform-meta
...
submission polling intervals = PT1S
[[_remote_background_shared_ssh]]
hosts = els055
communication method = ssh
install target = localhost
ItemNotFoundError: You have not set "platform groups" in this config.
$ echo $?
1
cylc/flow/scripts/config.py
Outdated
options_are_valid(options, 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.
Shouldn't this be at the top of the function?
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 mean that the get_option_parser
should always be directly above the main functions whose wrapper uses it?
I thought that it ought to go at the top, because it acts as a form of internal documentation. main()
is generally written at the bottom, and that leaves these convenience functions in the middle.
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.
The checking of options' validity should be at the beginning of main()
, otherwise it's missed out. Only problem is that workflow_id
is not defined until down here too
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, I missed your meaning: In general I'd agree, but you've spotted why I can't do that.
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.
So what I'm saying is there needs to be a change to allow the validation to come first, otherwise it's not doing its job
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've pushed a change to fix this.
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.
ItemNotFoundError: You have not set "platform groups" in this config.
Similarly, if no platforms are defined:
$ cylc config --platform-meta
ItemNotFoundError: You have not set "platforms" in this config.
It should just print nothing, and exit 0.
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
…/cylc into cylc_config_-_add_--platform-names * 'cylc_config_-_add_--platform-names' of github.com:wxtim/cylc: Apply suggestions from code review Update cylc/flow/scripts/config.py
…/cylc into cylc_config_-_add_--platform-names * 'cylc_config_-_add_--platform-names' of github.com:wxtim/cylc: Update cylc/flow/scripts/config.py
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
@MetRonnie - I think that I've resolved Hilary's suggestion, and responded to your outstanding comment. |
…ed tests/cylc-get-config to tests/cylc-config
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
…/cylc into cylc_config_-_add_--platform-names * 'cylc_config_-_add_--platform-names' of github.com:wxtim/cylc: Apply suggestions from code review response to review Update cylc/flow/scripts/config.py refactor testing Apply suggestions from code review Update cylc/flow/scripts/config.py created cylc config --platform-names and --platform-meta options; Moved tests/cylc-get-config to tests/cylc-config
Sorry for not being clear - I've added a comment: #4576 (comment) |
I think you've merged something into this branch that wasn't supposed to be there, the diff is now much larger than expected. |
Might be a case of GitHub dot com UI not coping (locally checked out in VSCode only showing 22 files changed compared to master). But the latest commit edd8bf8 is certainly strange, and doesn't appear to be needed? |
…g_-_add_--platform-names * 'master' of https://github.com/cylc/cylc: added cylc get-resources --tutorials (cylc#4580) GH Actions: allow debug of tutorial workflow tests in event of timeout
@MetRonnie and @oliver-sanders - I've merged with master, and the extra diff is gone again. |
( |
@wxtim - please check my final commits on this branch in case you think further tweaks are warranted. Just because "time is of the essence" for rc1 release, I've pushed up:
If CI passes I'll merge... |
ae211d3
to
341f7d4
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.
🎉
…names Cylc config add `--platform-names`
These changes close #4557
Asking for a review before I add changelog or doc.
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.