-
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
stop after cycle point: support offsets #5943
Conversation
@@ -699,6 +700,30 @@ class CylcConfigValidator(ParsecValidator): | |||
'-0830': 'UTC minus 8 hours and 30 minutes.' | |||
} | |||
), | |||
V_CYCLE_POINT_WITH_OFFSETS: ( |
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 is a new parsec validator type which does the same thing as V_STRING
.
It exists purely for documentation purposes.
@@ -993,6 +993,7 @@ def command_stop( | |||
point = TaskID.get_standardised_point(cycle_point) | |||
if point is not None and self.pool.set_stop_point(point): | |||
self.options.stopcp = str(point) | |||
self.config.stop_point = point |
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.
Spotted during testing, the config stop_point isn't updated when it is modified via the CLI, but the config hold_point is.
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.
You have test failures - should be trivial fixes, as I think both are caused by a change in error message which reflects this PR being OK.
* Closes cylc#5939 * Support offsets (measured from the ICP) for the `stop after cycle point` to mirror the behaviour of the `final cycle point`. * Add integration test to lock-down `stop after cycle point` interactions.
id="From config by default" | ||
id="stopcp" | ||
), | ||
pytest.param( | ||
'1993', '1066', '1066', '1066', None, | ||
id="From options" | ||
id="stop-cp-and-cli-option" | ||
), | ||
pytest.param( | ||
'1993', 'reload', '1993', None, None, | ||
id="From cfg if --stopcp=reload on restart" | ||
id="stop-cp-and-cli-reload-option" |
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 the previous ids were more descriptive
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.
fair enough, I changed them to something more CLI friendly, suggestions welcome.
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.
Having a short id plus a more descriptive comment would be reasonable IMO
Co-authored-by: Ronnie Dutta <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
stop after cycle point
to mirror the behaviour of thefinal cycle point
.stop after cycle point
interactions.Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.