-
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
parsec: add help for coercers (data types) #3439
Conversation
* add doctests for each coercer * make all coercers classmethods * document coercers * test examples in documentation
}, | ||
[ | ||
('std:term', 'cycle point'), | ||
('std:term', 'ISO8601 duration') |
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.
These are reference-able items in the Cylc documentation.
@@ -550,9 +801,16 @@ def coerce_cycle_point_time_zone(cls, value, keys): | |||
'cycle point time zone format', keys, value) | |||
return value | |||
|
|||
def coerce_interval(self, value, keys): | |||
"""Coerce an ISO 8601 interval (or number: back-comp) into seconds.""" |
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 like this back-comp
documentation is out of date?
Have removed.
@@ -155,3 +155,12 @@ def get_signature(self): | |||
args = self.func_args + [ | |||
"%s=%s" % (i, self.func_kwargs[i]) for i in skeys] | |||
return "%s(%s)" % (self.func_name, ", ".join([str(a) for a in args])) | |||
|
|||
def __str__(self): |
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.
Represents a sub proc context thinggy like this:
func(arg):interval
Tested in coerce_xtrigger
.
Document the parsec "types" from within Pasec for use by autodocumentation systems.
Trying for the simplest, least hassle way of doing this, in the long run we will want to refactor things somewhat. At Cylc9 we may well brush this code aside entirely.
This documentation will be used to generate reference material like this:
These changes partially address #3253, cylc/cylc-doc#101
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.