Cleaned up what we return from the description, for the tools/list_scripts API endpoint
This commit is contained in:
parent
d7b7f39128
commit
8df6c78925
|
@ -18,8 +18,7 @@ from crc.services.workflow_processor import WorkflowProcessor
|
|||
class CompleteTemplate(Script):
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Using the Jinja template engine, takes data available in the current task, and uses it to populate
|
||||
return """Using the Jinja template engine, takes data available in the current task, and uses it to populate
|
||||
a word document that contains Jinja markup. Please see https://docxtpl.readthedocs.io/en/latest/
|
||||
for more information on exact syntax.
|
||||
Takes two arguments:
|
||||
|
|
|
@ -18,8 +18,7 @@ class Email(Script):
|
|||
You can also specify cc, bcc, reply_to, and attachments"""
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Creates an email, using the provided `subject` and `recipients` arguments, which are required.
|
||||
return """Creates an email, using the provided `subject` and `recipients` arguments, which are required.
|
||||
The `Element Documentation` field in the script task must contain markdown that becomes the body of the email message.
|
||||
|
||||
You can also provide `cc`, `bcc`, `reply_to` and `attachments` arguments.
|
||||
|
|
|
@ -9,8 +9,7 @@ class GetStudyAssociate(Script):
|
|||
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Returns how a single person is associated with a study and what access they need,
|
||||
return """Returns how a single person is associated with a study and what access they need,
|
||||
or raises an error if the person is not associated with the study.
|
||||
example : get_study_associate('sbp3ey') => {'uid':'sbp3ey','role':'Unicorn Herder', 'send_email': False,
|
||||
'access':True}
|
||||
|
|
|
@ -13,8 +13,7 @@ class GetStudyAssociates(Script):
|
|||
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Returns all people associated with the study - Will always return the study owner as assocated
|
||||
return """Returns all people associated with the study - Will always return the study owner as assocated
|
||||
example : get_study_associates() => [{'uid':'sbp3ey','role':'Unicorn Herder', 'send_email': False, 'access':True}]
|
||||
|
||||
"""
|
||||
|
|
|
@ -14,7 +14,7 @@ class GetZippedFiles(Script):
|
|||
"""This script creates a zip document from a list of file ids"""
|
||||
|
||||
def get_description(self):
|
||||
"""Creates a zip file from a list of file_ids.
|
||||
return """Creates a zip file from a list of file_ids.
|
||||
This is meant to use as an attachment to an email message"""
|
||||
|
||||
def do_task_validate_only(self, task, study_id, workflow_id, *args, **kwargs):
|
||||
|
|
|
@ -15,8 +15,7 @@ class Ldap(Script):
|
|||
If no user id is specified, returns information about the current user."""
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Attempts to create a dictionary with person details, using the
|
||||
return """Attempts to create a dictionary with person details, using the
|
||||
provided argument (a UID) and look it up through LDAP. If no UID is
|
||||
provided, then returns information about the current user.
|
||||
|
||||
|
|
|
@ -119,8 +119,7 @@ class StudyInfo(Script):
|
|||
return json.dumps(self.example_data['StudyInfo'][key], indent=2, separators=(',', ': '))
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
StudyInfo [TYPE], where TYPE is one of 'info', 'investigators', 'details', or 'documents'.
|
||||
return """study_info(TYPE), where TYPE is one of 'info', 'investigators', 'details', or 'documents'.
|
||||
|
||||
Adds details about the current study to the Task Data. The type of information required should be
|
||||
provided as an argument. The following arguments are available:
|
||||
|
|
|
@ -18,8 +18,7 @@ class UpdateStudy(Script):
|
|||
"update_study task, in the form [study_field]=[value]",
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Allows you to set specific attributes on the Study model by mapping them to
|
||||
return """Allows you to set specific attributes on the Study model by mapping them to
|
||||
values in the task data. Should be called with the value to set (either title, short_title, or pi)
|
||||
|
||||
Example:
|
||||
|
|
|
@ -12,8 +12,7 @@ class UpdateStudyAssociates(Script):
|
|||
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Allows you to associate other users with a study - only 'uid' is a required keyword argument
|
||||
return """Allows you to associate other users with a study - only 'uid' is a required keyword argument
|
||||
|
||||
|
||||
An empty list will delete the existing Associated list (except owner)
|
||||
|
|
|
@ -10,8 +10,7 @@ class UpdateStudyAssociates(Script):
|
|||
"'access':'boolean'} "
|
||||
|
||||
def get_description(self):
|
||||
return """
|
||||
Allows you to associate other users with a study - only 'uid' is required in the
|
||||
return """Allows you to associate other users with a study - only 'uid' is required in the
|
||||
incoming dictionary, but will be useless without other information - all values will default to
|
||||
false or blank
|
||||
|
||||
|
|
Loading…
Reference in New Issue