-
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
Tokens: handle ISO 8601 long format cycle points #6123
Conversation
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.
LGTM 👍
>>> dict(Tokens('//2050-01-01T00:00Z:failed'))
{'cycle': '2050-01-01T00:00Z', 'cycle_sel': 'failed', 'task': None, 'task_sel': None, 'job': None, 'job_sel': None}
I assume there's no large overhead adding this extra step into tokenise
On master:
On this branch:
Ok, so I wasn't expecting it to be that much worse. Turns out init'ing the I don't think this should be a problem for Cylc internals as we don't use the extended datetime format for cycle points, just have to make sure we keep it that way? Or I guess I could move this to |
I think the cycle format is used in the ids of the data-store, so it's whether they are being tokenised from string format frequently.. (which they very well may be) |
Note the cycle point format set in |
Ah yes, and only that could be used internally.. So I think we're safe. |
I've gone ahead and done this as it makes sense to me |
Post-merge comment - this might warrant an explanation and example in CLI help, otherwise users are unlikely to realize that it's possible. |
|
Closes #6110
Before:
After:
I decided to have a go at supporting the long format rather than disallowing it, seeing as it isn't much diff. Performance-wise this should have negligible impact as the "expensive" part of it is only going to be hit once by users running a CLI command.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.