repository_name
stringlengths
7
55
func_path_in_repository
stringlengths
4
223
func_name
stringlengths
1
134
whole_func_string
stringlengths
75
104k
language
stringclasses
1 value
func_code_string
stringlengths
75
104k
func_code_tokens
listlengths
19
28.4k
func_documentation_string
stringlengths
1
46.9k
func_documentation_tokens
listlengths
1
1.97k
split_name
stringclasses
1 value
func_code_url
stringlengths
87
315
broadinstitute/fiss
firecloud/api.py
validate_config
def validate_config(namespace, workspace, cnamespace, config): """Get syntax validation for a configuration. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name cnamespace (str): Configuration namespace config (str): Configuration name ...
python
def validate_config(namespace, workspace, cnamespace, config): """Get syntax validation for a configuration. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name cnamespace (str): Configuration namespace config (str): Configuration name ...
[ "def", "validate_config", "(", "namespace", ",", "workspace", ",", "cnamespace", ",", "config", ")", ":", "uri", "=", "\"workspaces/{0}/{1}/method_configs/{2}/{3}/validate\"", ".", "format", "(", "namespace", ",", "workspace", ",", "cnamespace", ",", "config", ")", ...
Get syntax validation for a configuration. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name cnamespace (str): Configuration namespace config (str): Configuration name Swagger: https://api.firecloud.org/#!/Method_Configurations/va...
[ "Get", "syntax", "validation", "for", "a", "configuration", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L591-L605
broadinstitute/fiss
firecloud/api.py
rename_workspace_config
def rename_workspace_config(namespace, workspace, cnamespace, config, new_namespace, new_name): """Rename a method configuration in a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name mnamespa...
python
def rename_workspace_config(namespace, workspace, cnamespace, config, new_namespace, new_name): """Rename a method configuration in a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name mnamespa...
[ "def", "rename_workspace_config", "(", "namespace", ",", "workspace", ",", "cnamespace", ",", "config", ",", "new_namespace", ",", "new_name", ")", ":", "body", "=", "{", "\"namespace\"", ":", "new_namespace", ",", "\"name\"", ":", "new_name", ",", "# I have no ...
Rename a method configuration in a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name mnamespace (str): Config namespace config (str): Config name new_namespace (str): Updated config namespace new_name (str): Updated ...
[ "Rename", "a", "method", "configuration", "in", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L607-L634
broadinstitute/fiss
firecloud/api.py
copy_config_from_repo
def copy_config_from_repo(namespace, workspace, from_cnamespace, from_config, from_snapshot_id, to_cnamespace, to_config): """Copy a method config from the methods repository to a workspace. Args: namespace (str): project to which workspace belongs ...
python
def copy_config_from_repo(namespace, workspace, from_cnamespace, from_config, from_snapshot_id, to_cnamespace, to_config): """Copy a method config from the methods repository to a workspace. Args: namespace (str): project to which workspace belongs ...
[ "def", "copy_config_from_repo", "(", "namespace", ",", "workspace", ",", "from_cnamespace", ",", "from_config", ",", "from_snapshot_id", ",", "to_cnamespace", ",", "to_config", ")", ":", "body", "=", "{", "\"configurationNamespace\"", ":", "from_cnamespace", ",", "\...
Copy a method config from the methods repository to a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name from_cnamespace (str): Source configuration namespace from_config (str): Source configuration name from_snapshot_id (int...
[ "Copy", "a", "method", "config", "from", "the", "methods", "repository", "to", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L636-L664
broadinstitute/fiss
firecloud/api.py
copy_config_to_repo
def copy_config_to_repo(namespace, workspace, from_cnamespace, from_config, to_cnamespace, to_config): """Copy a method config from a workspace to the methods repository. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name fr...
python
def copy_config_to_repo(namespace, workspace, from_cnamespace, from_config, to_cnamespace, to_config): """Copy a method config from a workspace to the methods repository. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name fr...
[ "def", "copy_config_to_repo", "(", "namespace", ",", "workspace", ",", "from_cnamespace", ",", "from_config", ",", "to_cnamespace", ",", "to_config", ")", ":", "body", "=", "{", "\"configurationNamespace\"", ":", "to_cnamespace", ",", "\"configurationName\"", ":", "...
Copy a method config from a workspace to the methods repository. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name from_cnamespace (str): Source configuration namespace from_config (str): Source configuration name to_cnamespace (str): ...
[ "Copy", "a", "method", "config", "from", "a", "workspace", "to", "the", "methods", "repository", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L666-L691
broadinstitute/fiss
firecloud/api.py
list_repository_methods
def list_repository_methods(namespace=None, name=None, snapshotId=None): """List method(s) in the methods repository. Args: namespace (str): Method Repository namespace name (str): method name snapshotId (int): method snapshot ID Swagger: https://api.firecloud.org/#!/Method...
python
def list_repository_methods(namespace=None, name=None, snapshotId=None): """List method(s) in the methods repository. Args: namespace (str): Method Repository namespace name (str): method name snapshotId (int): method snapshot ID Swagger: https://api.firecloud.org/#!/Method...
[ "def", "list_repository_methods", "(", "namespace", "=", "None", ",", "name", "=", "None", ",", "snapshotId", "=", "None", ")", ":", "params", "=", "{", "k", ":", "v", "for", "(", "k", ",", "v", ")", "in", "locals", "(", ")", ".", "items", "(", "...
List method(s) in the methods repository. Args: namespace (str): Method Repository namespace name (str): method name snapshotId (int): method snapshot ID Swagger: https://api.firecloud.org/#!/Method_Repository/listMethodRepositoryMethods
[ "List", "method", "(", "s", ")", "in", "the", "methods", "repository", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L697-L709
broadinstitute/fiss
firecloud/api.py
get_config_template
def get_config_template(namespace, method, version): """Get the configuration template for a method. The method should exist in the methods repository. Args: namespace (str): Method's namespace method (str): method name version (int): snapshot_id of the method Swagger: ...
python
def get_config_template(namespace, method, version): """Get the configuration template for a method. The method should exist in the methods repository. Args: namespace (str): Method's namespace method (str): method name version (int): snapshot_id of the method Swagger: ...
[ "def", "get_config_template", "(", "namespace", ",", "method", ",", "version", ")", ":", "body", "=", "{", "\"methodNamespace\"", ":", "namespace", ",", "\"methodName\"", ":", "method", ",", "\"methodVersion\"", ":", "int", "(", "version", ")", "}", "return", ...
Get the configuration template for a method. The method should exist in the methods repository. Args: namespace (str): Method's namespace method (str): method name version (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method_Repository/createMethod...
[ "Get", "the", "configuration", "template", "for", "a", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L725-L744
broadinstitute/fiss
firecloud/api.py
get_inputs_outputs
def get_inputs_outputs(namespace, method, snapshot_id): """Get a description of the inputs and outputs for a method. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method ...
python
def get_inputs_outputs(namespace, method, snapshot_id): """Get a description of the inputs and outputs for a method. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method ...
[ "def", "get_inputs_outputs", "(", "namespace", ",", "method", ",", "snapshot_id", ")", ":", "body", "=", "{", "\"methodNamespace\"", ":", "namespace", ",", "\"methodName\"", ":", "method", ",", "\"methodVersion\"", ":", "snapshot_id", "}", "return", "__post", "(...
Get a description of the inputs and outputs for a method. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method_Reposit...
[ "Get", "a", "description", "of", "the", "inputs", "and", "outputs", "for", "a", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L746-L765
broadinstitute/fiss
firecloud/api.py
get_repository_config
def get_repository_config(namespace, config, snapshot_id): """Get a method configuration from the methods repository. Args: namespace (str): Methods namespace config (str): config name snapshot_id (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method...
python
def get_repository_config(namespace, config, snapshot_id): """Get a method configuration from the methods repository. Args: namespace (str): Methods namespace config (str): config name snapshot_id (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method...
[ "def", "get_repository_config", "(", "namespace", ",", "config", ",", "snapshot_id", ")", ":", "uri", "=", "\"configurations/{0}/{1}/{2}\"", ".", "format", "(", "namespace", ",", "config", ",", "snapshot_id", ")", "return", "__get", "(", "uri", ")" ]
Get a method configuration from the methods repository. Args: namespace (str): Methods namespace config (str): config name snapshot_id (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method_Repository/getMethodRepositoryConfiguration
[ "Get", "a", "method", "configuration", "from", "the", "methods", "repository", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L767-L779
broadinstitute/fiss
firecloud/api.py
get_repository_method
def get_repository_method(namespace, method, snapshot_id, wdl_only=False): """Get a method definition from the method repository. Args: namespace (str): Methods namespace method (str): method name version (int): snapshot_id of the method wdl_only (bool): Exclude metadata Sw...
python
def get_repository_method(namespace, method, snapshot_id, wdl_only=False): """Get a method definition from the method repository. Args: namespace (str): Methods namespace method (str): method name version (int): snapshot_id of the method wdl_only (bool): Exclude metadata Sw...
[ "def", "get_repository_method", "(", "namespace", ",", "method", ",", "snapshot_id", ",", "wdl_only", "=", "False", ")", ":", "uri", "=", "\"methods/{0}/{1}/{2}?onlyPayload={3}\"", ".", "format", "(", "namespace", ",", "method", ",", "snapshot_id", ",", "str", "...
Get a method definition from the method repository. Args: namespace (str): Methods namespace method (str): method name version (int): snapshot_id of the method wdl_only (bool): Exclude metadata Swagger: https://api.firecloud.org/#!/Method_Repository/get_api_methods_name...
[ "Get", "a", "method", "definition", "from", "the", "method", "repository", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L781-L796
broadinstitute/fiss
firecloud/api.py
update_repository_method
def update_repository_method(namespace, method, synopsis, wdl, doc=None, comment=""): """Create/Update workflow definition. FireCloud will create a new snapshot_id for the given workflow. Args: namespace (str): Methods namespace method (str): method name ...
python
def update_repository_method(namespace, method, synopsis, wdl, doc=None, comment=""): """Create/Update workflow definition. FireCloud will create a new snapshot_id for the given workflow. Args: namespace (str): Methods namespace method (str): method name ...
[ "def", "update_repository_method", "(", "namespace", ",", "method", ",", "synopsis", ",", "wdl", ",", "doc", "=", "None", ",", "comment", "=", "\"\"", ")", ":", "with", "open", "(", "wdl", ",", "'r'", ")", "as", "wf", ":", "wdl_payload", "=", "wf", "...
Create/Update workflow definition. FireCloud will create a new snapshot_id for the given workflow. Args: namespace (str): Methods namespace method (str): method name synopsis (str): short (<80 char) description of method wdl (file): Workflow Description Language file do...
[ "Create", "/", "Update", "workflow", "definition", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L798-L833
broadinstitute/fiss
firecloud/api.py
delete_repository_method
def delete_repository_method(namespace, name, snapshot_id): """Redacts a method and all of its associated configurations. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the meth...
python
def delete_repository_method(namespace, name, snapshot_id): """Redacts a method and all of its associated configurations. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the meth...
[ "def", "delete_repository_method", "(", "namespace", ",", "name", ",", "snapshot_id", ")", ":", "uri", "=", "\"methods/{0}/{1}/{2}\"", ".", "format", "(", "namespace", ",", "name", ",", "snapshot_id", ")", "return", "__delete", "(", "uri", ")" ]
Redacts a method and all of its associated configurations. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method_Reposi...
[ "Redacts", "a", "method", "and", "all", "of", "its", "associated", "configurations", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L835-L849
broadinstitute/fiss
firecloud/api.py
delete_repository_config
def delete_repository_config(namespace, name, snapshot_id): """Redacts a configuration and all of its associated configurations. The configuration should exist in the methods repository. Args: namespace (str): configuration namespace configuration (str): configuration name snapshot...
python
def delete_repository_config(namespace, name, snapshot_id): """Redacts a configuration and all of its associated configurations. The configuration should exist in the methods repository. Args: namespace (str): configuration namespace configuration (str): configuration name snapshot...
[ "def", "delete_repository_config", "(", "namespace", ",", "name", ",", "snapshot_id", ")", ":", "uri", "=", "\"configurations/{0}/{1}/{2}\"", ".", "format", "(", "namespace", ",", "name", ",", "snapshot_id", ")", "return", "__delete", "(", "uri", ")" ]
Redacts a configuration and all of its associated configurations. The configuration should exist in the methods repository. Args: namespace (str): configuration namespace configuration (str): configuration name snapshot_id (int): snapshot_id of the configuration Swagger: h...
[ "Redacts", "a", "configuration", "and", "all", "of", "its", "associated", "configurations", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L851-L865
broadinstitute/fiss
firecloud/api.py
get_repository_method_acl
def get_repository_method_acl(namespace, method, snapshot_id): """Get permissions for a method. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name version (int): snapshot_id of the method Swagger: https...
python
def get_repository_method_acl(namespace, method, snapshot_id): """Get permissions for a method. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name version (int): snapshot_id of the method Swagger: https...
[ "def", "get_repository_method_acl", "(", "namespace", ",", "method", ",", "snapshot_id", ")", ":", "uri", "=", "\"methods/{0}/{1}/{2}/permissions\"", ".", "format", "(", "namespace", ",", "method", ",", "snapshot_id", ")", "return", "__get", "(", "uri", ")" ]
Get permissions for a method. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name version (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method_Repository/getMethodACL
[ "Get", "permissions", "for", "a", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L867-L881
broadinstitute/fiss
firecloud/api.py
update_repository_method_acl
def update_repository_method_acl(namespace, method, snapshot_id, acl_updates): """Set method permissions. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method acl_u...
python
def update_repository_method_acl(namespace, method, snapshot_id, acl_updates): """Set method permissions. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method acl_u...
[ "def", "update_repository_method_acl", "(", "namespace", ",", "method", ",", "snapshot_id", ",", "acl_updates", ")", ":", "uri", "=", "\"methods/{0}/{1}/{2}/permissions\"", ".", "format", "(", "namespace", ",", "method", ",", "snapshot_id", ")", "return", "__post", ...
Set method permissions. The method should exist in the methods repository. Args: namespace (str): Methods namespace method (str): method name snapshot_id (int): snapshot_id of the method acl_updates (list(dict)): List of access control updates Swagger: https://api....
[ "Set", "method", "permissions", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L883-L899
broadinstitute/fiss
firecloud/api.py
get_repository_config_acl
def get_repository_config_acl(namespace, config, snapshot_id): """Get configuration permissions. The configuration should exist in the methods repository. Args: namespace (str): Configuration namespace config (str): Configuration name snapshot_id (int): snapshot_id of the method ...
python
def get_repository_config_acl(namespace, config, snapshot_id): """Get configuration permissions. The configuration should exist in the methods repository. Args: namespace (str): Configuration namespace config (str): Configuration name snapshot_id (int): snapshot_id of the method ...
[ "def", "get_repository_config_acl", "(", "namespace", ",", "config", ",", "snapshot_id", ")", ":", "uri", "=", "\"configurations/{0}/{1}/{2}/permissions\"", ".", "format", "(", "namespace", ",", "config", ",", "snapshot_id", ")", "return", "__get", "(", "uri", ")"...
Get configuration permissions. The configuration should exist in the methods repository. Args: namespace (str): Configuration namespace config (str): Configuration name snapshot_id (int): snapshot_id of the method Swagger: https://api.firecloud.org/#!/Method_Repository/get...
[ "Get", "configuration", "permissions", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L901-L916
broadinstitute/fiss
firecloud/api.py
update_repository_config_acl
def update_repository_config_acl(namespace, config, snapshot_id, acl_updates): """Set configuration permissions. The configuration should exist in the methods repository. Args: namespace (str): Configuration namespace config (str): Configuration name snapshot_id (int): snapshot_id ...
python
def update_repository_config_acl(namespace, config, snapshot_id, acl_updates): """Set configuration permissions. The configuration should exist in the methods repository. Args: namespace (str): Configuration namespace config (str): Configuration name snapshot_id (int): snapshot_id ...
[ "def", "update_repository_config_acl", "(", "namespace", ",", "config", ",", "snapshot_id", ",", "acl_updates", ")", ":", "uri", "=", "\"configurations/{0}/{1}/{2}/permissions\"", ".", "format", "(", "namespace", ",", "config", ",", "snapshot_id", ")", "return", "__...
Set configuration permissions. The configuration should exist in the methods repository. Args: namespace (str): Configuration namespace config (str): Configuration name snapshot_id (int): snapshot_id of the method acl_updates (list(dict)): List of access control updates Sw...
[ "Set", "configuration", "permissions", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L918-L935
broadinstitute/fiss
firecloud/api.py
create_submission
def create_submission(wnamespace, workspace, cnamespace, config, entity, etype, expression=None, use_callcache=True): """Submit job in FireCloud workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name cnamespace (str): M...
python
def create_submission(wnamespace, workspace, cnamespace, config, entity, etype, expression=None, use_callcache=True): """Submit job in FireCloud workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name cnamespace (str): M...
[ "def", "create_submission", "(", "wnamespace", ",", "workspace", ",", "cnamespace", ",", "config", ",", "entity", ",", "etype", ",", "expression", "=", "None", ",", "use_callcache", "=", "True", ")", ":", "uri", "=", "\"workspaces/{0}/{1}/submissions\"", ".", ...
Submit job in FireCloud workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name cnamespace (str): Method configuration namespace config (str): Method configuration name entity (str): Entity to submit job on. Should be the same typ...
[ "Submit", "job", "in", "FireCloud", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1023-L1056
broadinstitute/fiss
firecloud/api.py
abort_submission
def abort_submission(namespace, workspace, submission_id): """Abort running job in a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier Swagger: https://api.firecloud.org/#...
python
def abort_submission(namespace, workspace, submission_id): """Abort running job in a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier Swagger: https://api.firecloud.org/#...
[ "def", "abort_submission", "(", "namespace", ",", "workspace", ",", "submission_id", ")", ":", "uri", "=", "\"workspaces/{0}/{1}/submissions/{2}\"", ".", "format", "(", "namespace", ",", "workspace", ",", "submission_id", ")", "return", "__delete", "(", "uri", ")"...
Abort running job in a workspace. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier Swagger: https://api.firecloud.org/#!/Submissions/deleteSubmission
[ "Abort", "running", "job", "in", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1058-L1071
broadinstitute/fiss
firecloud/api.py
get_submission
def get_submission(namespace, workspace, submission_id): """Request submission information. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier Swagger: https://api.firecloud.org/#!/Su...
python
def get_submission(namespace, workspace, submission_id): """Request submission information. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier Swagger: https://api.firecloud.org/#!/Su...
[ "def", "get_submission", "(", "namespace", ",", "workspace", ",", "submission_id", ")", ":", "uri", "=", "\"workspaces/{0}/{1}/submissions/{2}\"", ".", "format", "(", "namespace", ",", "workspace", ",", "submission_id", ")", "return", "__get", "(", "uri", ")" ]
Request submission information. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier Swagger: https://api.firecloud.org/#!/Submissions/monitorSubmission
[ "Request", "submission", "information", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1073-L1086
broadinstitute/fiss
firecloud/api.py
get_workflow_metadata
def get_workflow_metadata(namespace, workspace, submission_id, workflow_id): """Request the metadata for a workflow in a submission. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier work...
python
def get_workflow_metadata(namespace, workspace, submission_id, workflow_id): """Request the metadata for a workflow in a submission. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier work...
[ "def", "get_workflow_metadata", "(", "namespace", ",", "workspace", ",", "submission_id", ",", "workflow_id", ")", ":", "uri", "=", "\"workspaces/{0}/{1}/submissions/{2}/workflows/{3}\"", ".", "format", "(", "namespace", ",", "workspace", ",", "submission_id", ",", "w...
Request the metadata for a workflow in a submission. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier workflow_id (str): Workflow's unique identifier. Swagger: https://api.firec...
[ "Request", "the", "metadata", "for", "a", "workflow", "in", "a", "submission", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1088-L1102
broadinstitute/fiss
firecloud/api.py
get_workflow_outputs
def get_workflow_outputs(namespace, workspace, submission_id, workflow_id): """Request the outputs for a workflow in a submission. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier workfl...
python
def get_workflow_outputs(namespace, workspace, submission_id, workflow_id): """Request the outputs for a workflow in a submission. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier workfl...
[ "def", "get_workflow_outputs", "(", "namespace", ",", "workspace", ",", "submission_id", ",", "workflow_id", ")", ":", "uri", "=", "\"workspaces/{0}/{1}/\"", ".", "format", "(", "namespace", ",", "workspace", ")", "uri", "+=", "\"submissions/{0}/workflows/{1}/outputs\...
Request the outputs for a workflow in a submission. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name submission_id (str): Submission's unique identifier workflow_id (str): Workflow's unique identifier. Swagger: https://api.firecl...
[ "Request", "the", "outputs", "for", "a", "workflow", "in", "a", "submission", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1104-L1119
broadinstitute/fiss
firecloud/api.py
create_workspace
def create_workspace(namespace, name, authorizationDomain="", attributes=None): """Create a new FireCloud Workspace. Args: namespace (str): project to which workspace belongs name (str): Workspace name protected (bool): If True, this workspace is protected by dbGaP credentia...
python
def create_workspace(namespace, name, authorizationDomain="", attributes=None): """Create a new FireCloud Workspace. Args: namespace (str): project to which workspace belongs name (str): Workspace name protected (bool): If True, this workspace is protected by dbGaP credentia...
[ "def", "create_workspace", "(", "namespace", ",", "name", ",", "authorizationDomain", "=", "\"\"", ",", "attributes", "=", "None", ")", ":", "if", "not", "attributes", ":", "attributes", "=", "dict", "(", ")", "body", "=", "{", "\"namespace\"", ":", "names...
Create a new FireCloud Workspace. Args: namespace (str): project to which workspace belongs name (str): Workspace name protected (bool): If True, this workspace is protected by dbGaP credentials. This option is only available if your FireCloud account is linked to yo...
[ "Create", "a", "new", "FireCloud", "Workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1141-L1171
broadinstitute/fiss
firecloud/api.py
update_workspace_acl
def update_workspace_acl(namespace, workspace, acl_updates, invite_users_not_found=False): """Update workspace access control list. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name acl_updates (list(dict)): Acl updates as dicts with two keys: ...
python
def update_workspace_acl(namespace, workspace, acl_updates, invite_users_not_found=False): """Update workspace access control list. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name acl_updates (list(dict)): Acl updates as dicts with two keys: ...
[ "def", "update_workspace_acl", "(", "namespace", ",", "workspace", ",", "acl_updates", ",", "invite_users_not_found", "=", "False", ")", ":", "uri", "=", "\"{0}workspaces/{1}/{2}/acl?inviteUsersNotFound={3}\"", ".", "format", "(", "fcconfig", ".", "root_url", ",", "na...
Update workspace access control list. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name acl_updates (list(dict)): Acl updates as dicts with two keys: "email" - Firecloud user email "accessLevel" - one of "OWNER", "READER", "WRI...
[ "Update", "workspace", "access", "control", "list", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1214-L1233
broadinstitute/fiss
firecloud/api.py
clone_workspace
def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace, authorizationDomain=""): """Clone a FireCloud workspace. A clone is a shallow copy of a FireCloud workspace, enabling easy sharing of data, such as TCGA data, without duplication. Args: from_nam...
python
def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace, authorizationDomain=""): """Clone a FireCloud workspace. A clone is a shallow copy of a FireCloud workspace, enabling easy sharing of data, such as TCGA data, without duplication. Args: from_nam...
[ "def", "clone_workspace", "(", "from_namespace", ",", "from_workspace", ",", "to_namespace", ",", "to_workspace", ",", "authorizationDomain", "=", "\"\"", ")", ":", "if", "authorizationDomain", ":", "if", "isinstance", "(", "authorizationDomain", ",", "string_types", ...
Clone a FireCloud workspace. A clone is a shallow copy of a FireCloud workspace, enabling easy sharing of data, such as TCGA data, without duplication. Args: from_namespace (str): project (namespace) to which source workspace belongs from_workspace (str): Source workspace's name t...
[ "Clone", "a", "FireCloud", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1235-L1269
broadinstitute/fiss
firecloud/api.py
update_workspace_attributes
def update_workspace_attributes(namespace, workspace, attrs): """Update or remove workspace attributes. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name attrs (list(dict)): List of update operations for workspace attributes. Use the h...
python
def update_workspace_attributes(namespace, workspace, attrs): """Update or remove workspace attributes. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name attrs (list(dict)): List of update operations for workspace attributes. Use the h...
[ "def", "update_workspace_attributes", "(", "namespace", ",", "workspace", ",", "attrs", ")", ":", "headers", "=", "_fiss_agent_header", "(", "{", "\"Content-type\"", ":", "\"application/json\"", "}", ")", "uri", "=", "\"{0}workspaces/{1}/{2}/updateAttributes\"", ".", ...
Update or remove workspace attributes. Args: namespace (str): project to which workspace belongs workspace (str): Workspace name attrs (list(dict)): List of update operations for workspace attributes. Use the helper dictionary construction functions to create these: ...
[ "Update", "or", "remove", "workspace", "attributes", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1302-L1325
broadinstitute/fiss
firecloud/api.py
add_user_to_group
def add_user_to_group(group, role, email): """Add a user to a group the caller owns Args: group (str): Group name role (str) : Role of user for group; either 'member' or 'admin' email (str): Email of user or group to add Swagger: https://api.firecloud.org/#!/Groups/addU...
python
def add_user_to_group(group, role, email): """Add a user to a group the caller owns Args: group (str): Group name role (str) : Role of user for group; either 'member' or 'admin' email (str): Email of user or group to add Swagger: https://api.firecloud.org/#!/Groups/addU...
[ "def", "add_user_to_group", "(", "group", ",", "role", ",", "email", ")", ":", "uri", "=", "\"groups/{0}/{1}/{2}\"", ".", "format", "(", "group", ",", "role", ",", "email", ")", "return", "__put", "(", "uri", ")" ]
Add a user to a group the caller owns Args: group (str): Group name role (str) : Role of user for group; either 'member' or 'admin' email (str): Email of user or group to add Swagger: https://api.firecloud.org/#!/Groups/addUserToGroup
[ "Add", "a", "user", "to", "a", "group", "the", "caller", "owns" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1408-L1420
broadinstitute/fiss
firecloud/api.py
remove_user_from_group
def remove_user_from_group(group, role, email): """Remove a user from a group the caller owns Args: group (str): Group name role (str) : Role of user for group; either 'member' or 'admin' email (str): Email of user or group to remove Swagger: https://api.firecloud.org/#...
python
def remove_user_from_group(group, role, email): """Remove a user from a group the caller owns Args: group (str): Group name role (str) : Role of user for group; either 'member' or 'admin' email (str): Email of user or group to remove Swagger: https://api.firecloud.org/#...
[ "def", "remove_user_from_group", "(", "group", ",", "role", ",", "email", ")", ":", "uri", "=", "\"groups/{0}/{1}/{2}\"", ".", "format", "(", "group", ",", "role", ",", "email", ")", "return", "__delete", "(", "uri", ")" ]
Remove a user from a group the caller owns Args: group (str): Group name role (str) : Role of user for group; either 'member' or 'admin' email (str): Email of user or group to remove Swagger: https://api.firecloud.org/#!/Groups/removeUserFromGroup
[ "Remove", "a", "user", "from", "a", "group", "the", "caller", "owns" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/api.py#L1422-L1434
broadinstitute/fiss
plugins/dev_plugin.py
GDACFissfcPlugin.register_commands
def register_commands(self, subparsers): """ Add commands to a list of subparsers. This will be called by Fissfc to add additional command targets from this plugin. Each command added should follow the pattern: parser = subparsers.add_parser('cmd', ...) parser.add_argum...
python
def register_commands(self, subparsers): """ Add commands to a list of subparsers. This will be called by Fissfc to add additional command targets from this plugin. Each command added should follow the pattern: parser = subparsers.add_parser('cmd', ...) parser.add_argum...
[ "def", "register_commands", "(", "self", ",", "subparsers", ")", ":", "#print_(\"DEV PLUGIN: Loaded commands\")", "prsr", "=", "subparsers", ".", "add_parser", "(", "'upload'", ",", "description", "=", "'Copy the file or directory into the given'", ")", "prsr", ".", "ad...
Add commands to a list of subparsers. This will be called by Fissfc to add additional command targets from this plugin. Each command added should follow the pattern: parser = subparsers.add_parser('cmd', ...) parser.add_argument(...) ... parser.set_defaults(func=do_my_c...
[ "Add", "commands", "to", "a", "list", "of", "subparsers", ".", "This", "will", "be", "called", "by", "Fissfc", "to", "add", "additional", "command", "targets", "from", "this", "plugin", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/plugins/dev_plugin.py#L21-L52
broadinstitute/fiss
firecloud/method.py
Method.new
def new(namespace, name, wdl, synopsis, documentation=None, api_url=fapi.PROD_API_ROOT): """Create new FireCloud method. If the namespace + name already exists, a new snapshot is created. Args: namespace (str): Method namespace for this method name (str): Me...
python
def new(namespace, name, wdl, synopsis, documentation=None, api_url=fapi.PROD_API_ROOT): """Create new FireCloud method. If the namespace + name already exists, a new snapshot is created. Args: namespace (str): Method namespace for this method name (str): Me...
[ "def", "new", "(", "namespace", ",", "name", ",", "wdl", ",", "synopsis", ",", "documentation", "=", "None", ",", "api_url", "=", "fapi", ".", "PROD_API_ROOT", ")", ":", "r", "=", "fapi", ".", "update_workflow", "(", "namespace", ",", "name", ",", "syn...
Create new FireCloud method. If the namespace + name already exists, a new snapshot is created. Args: namespace (str): Method namespace for this method name (str): Method name wdl (file): WDL description synopsis (str): Short description of task ...
[ "Create", "new", "FireCloud", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/method.py#L36-L53
broadinstitute/fiss
firecloud/method.py
Method.template
def template(self): """Return a method template for this method.""" r = fapi.get_config_template(self.namespace, self.name, self.snapshot_id, self.api_url) fapi._check_response_code(r, 200) return r.json()
python
def template(self): """Return a method template for this method.""" r = fapi.get_config_template(self.namespace, self.name, self.snapshot_id, self.api_url) fapi._check_response_code(r, 200) return r.json()
[ "def", "template", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_config_template", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "snapshot_id", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", ...
Return a method template for this method.
[ "Return", "a", "method", "template", "for", "this", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/method.py#L55-L60
broadinstitute/fiss
firecloud/method.py
Method.inputs_outputs
def inputs_outputs(self): """Get information on method inputs & outputs.""" r = fapi.get_inputs_outputs(self.namespace, self.name, self.snapshot_id, self.api_url) fapi._check_response_code(r, 200) return r.json()
python
def inputs_outputs(self): """Get information on method inputs & outputs.""" r = fapi.get_inputs_outputs(self.namespace, self.name, self.snapshot_id, self.api_url) fapi._check_response_code(r, 200) return r.json()
[ "def", "inputs_outputs", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_inputs_outputs", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "snapshot_id", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", ...
Get information on method inputs & outputs.
[ "Get", "information", "on", "method", "inputs", "&", "outputs", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/method.py#L62-L67
broadinstitute/fiss
firecloud/method.py
Method.acl
def acl(self): """Get the access control list for this method.""" r = fapi.get_repository_method_acl( self.namespace, self.name, self.snapshot_id, self.api_url) fapi._check_response_code(r, 200) return r.json()
python
def acl(self): """Get the access control list for this method.""" r = fapi.get_repository_method_acl( self.namespace, self.name, self.snapshot_id, self.api_url) fapi._check_response_code(r, 200) return r.json()
[ "def", "acl", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_repository_method_acl", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "snapshot_id", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(",...
Get the access control list for this method.
[ "Get", "the", "access", "control", "list", "for", "this", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/method.py#L69-L74
broadinstitute/fiss
firecloud/method.py
Method.set_acl
def set_acl(self, role, users): """Set permissions for this method. Args: role (str): Access level one of {one of "OWNER", "READER", "WRITER", "NO ACCESS"} users (list(str)): List of users to give role to """ acl_updates = [{"user": user, "role": ...
python
def set_acl(self, role, users): """Set permissions for this method. Args: role (str): Access level one of {one of "OWNER", "READER", "WRITER", "NO ACCESS"} users (list(str)): List of users to give role to """ acl_updates = [{"user": user, "role": ...
[ "def", "set_acl", "(", "self", ",", "role", ",", "users", ")", ":", "acl_updates", "=", "[", "{", "\"user\"", ":", "user", ",", "\"role\"", ":", "role", "}", "for", "user", "in", "users", "]", "r", "=", "fapi", ".", "update_repository_method_acl", "(",...
Set permissions for this method. Args: role (str): Access level one of {one of "OWNER", "READER", "WRITER", "NO ACCESS"} users (list(str)): List of users to give role to
[ "Set", "permissions", "for", "this", "method", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/method.py#L76-L89
broadinstitute/fiss
firecloud/__init__.py
__ensure_gcloud
def __ensure_gcloud(): """The *NIX installer is not guaranteed to add the google cloud sdk to the user's PATH (the Windows installer does). This ensures that if the default directory for the executables exists, it is added to the PATH for the duration of this package's use.""" if which('gcloud') is ...
python
def __ensure_gcloud(): """The *NIX installer is not guaranteed to add the google cloud sdk to the user's PATH (the Windows installer does). This ensures that if the default directory for the executables exists, it is added to the PATH for the duration of this package's use.""" if which('gcloud') is ...
[ "def", "__ensure_gcloud", "(", ")", ":", "if", "which", "(", "'gcloud'", ")", "is", "None", ":", "gcloud_path", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "expanduser", "(", "'~'", ")", ",", "'google-cloud-sdk'", ",", "'bin'", ...
The *NIX installer is not guaranteed to add the google cloud sdk to the user's PATH (the Windows installer does). This ensures that if the default directory for the executables exists, it is added to the PATH for the duration of this package's use.
[ "The", "*", "NIX", "installer", "is", "not", "guaranteed", "to", "add", "the", "google", "cloud", "sdk", "to", "the", "user", "s", "PATH", "(", "the", "Windows", "installer", "does", ")", ".", "This", "ensures", "that", "if", "the", "default", "directory...
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/__init__.py#L30-L43
broadinstitute/fiss
firecloud/fccore.py
config_parse
def config_parse(files=None, config=None, config_profile=".fissconfig", **kwargs): ''' Read initial configuration state, from named config files; store this state within a config dictionary (which may be nested) whose keys may also be referenced as attributes (safely, defaulting to None if unset). A ...
python
def config_parse(files=None, config=None, config_profile=".fissconfig", **kwargs): ''' Read initial configuration state, from named config files; store this state within a config dictionary (which may be nested) whose keys may also be referenced as attributes (safely, defaulting to None if unset). A ...
[ "def", "config_parse", "(", "files", "=", "None", ",", "config", "=", "None", ",", "config_profile", "=", "\".fissconfig\"", ",", "*", "*", "kwargs", ")", ":", "local_config", "=", "config", "config", "=", "__fcconfig", "cfgparser", "=", "configparser", ".",...
Read initial configuration state, from named config files; store this state within a config dictionary (which may be nested) whose keys may also be referenced as attributes (safely, defaulting to None if unset). A config object may be passed in, as a way of accumulating or overwriting configuration sta...
[ "Read", "initial", "configuration", "state", "from", "named", "config", "files", ";", "store", "this", "state", "within", "a", "config", "dictionary", "(", "which", "may", "be", "nested", ")", "whose", "keys", "may", "also", "be", "referenced", "as", "attrib...
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fccore.py#L122-L183
broadinstitute/fiss
firecloud/workspace.py
Workspace.new
def new(namespace, name, protected=False, attributes=dict(), api_url=fapi.PROD_API_ROOT): """Create a new FireCloud workspace. Returns: Workspace: A new FireCloud workspace Raises: FireCloudServerError: API call failed. """ r = fapi.create_wo...
python
def new(namespace, name, protected=False, attributes=dict(), api_url=fapi.PROD_API_ROOT): """Create a new FireCloud workspace. Returns: Workspace: A new FireCloud workspace Raises: FireCloudServerError: API call failed. """ r = fapi.create_wo...
[ "def", "new", "(", "namespace", ",", "name", ",", "protected", "=", "False", ",", "attributes", "=", "dict", "(", ")", ",", "api_url", "=", "fapi", ".", "PROD_API_ROOT", ")", ":", "r", "=", "fapi", ".", "create_workspace", "(", "namespace", ",", "name"...
Create a new FireCloud workspace. Returns: Workspace: A new FireCloud workspace Raises: FireCloudServerError: API call failed.
[ "Create", "a", "new", "FireCloud", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L42-L54
broadinstitute/fiss
firecloud/workspace.py
Workspace.refresh
def refresh(self): """Reload workspace metadata from firecloud. Workspace metadata is cached in the data attribute of a Workspace, and may become stale, requiring a refresh(). """ r = fapi.get_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r...
python
def refresh(self): """Reload workspace metadata from firecloud. Workspace metadata is cached in the data attribute of a Workspace, and may become stale, requiring a refresh(). """ r = fapi.get_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r...
[ "def", "refresh", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_workspace", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "self", ".", ...
Reload workspace metadata from firecloud. Workspace metadata is cached in the data attribute of a Workspace, and may become stale, requiring a refresh().
[ "Reload", "workspace", "metadata", "from", "firecloud", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L56-L65
broadinstitute/fiss
firecloud/workspace.py
Workspace.delete
def delete(self): """Delete the workspace from FireCloud. Note: This action cannot be undone. Be careful! """ r = fapi.delete_workspace(self.namespace, self.name) fapi._check_response_code(r, 202)
python
def delete(self): """Delete the workspace from FireCloud. Note: This action cannot be undone. Be careful! """ r = fapi.delete_workspace(self.namespace, self.name) fapi._check_response_code(r, 202)
[ "def", "delete", "(", "self", ")", ":", "r", "=", "fapi", ".", "delete_workspace", "(", "self", ".", "namespace", ",", "self", ".", "name", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "202", ")" ]
Delete the workspace from FireCloud. Note: This action cannot be undone. Be careful!
[ "Delete", "the", "workspace", "from", "FireCloud", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L67-L74
broadinstitute/fiss
firecloud/workspace.py
Workspace.lock
def lock(self): """Lock this Workspace. This causes the workspace to behave in a read-only way, regardless of access permissions. """ r = fapi.lock_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 204) self.data['workspace']['isLock...
python
def lock(self): """Lock this Workspace. This causes the workspace to behave in a read-only way, regardless of access permissions. """ r = fapi.lock_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 204) self.data['workspace']['isLock...
[ "def", "lock", "(", "self", ")", ":", "r", "=", "fapi", ".", "lock_workspace", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "204", ")", "self", ".", "...
Lock this Workspace. This causes the workspace to behave in a read-only way, regardless of access permissions.
[ "Lock", "this", "Workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L85-L94
broadinstitute/fiss
firecloud/workspace.py
Workspace.unlock
def unlock(self): """Unlock this Workspace.""" r = fapi.unlock_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 204) self.data['workspace']['isLocked'] = False return self
python
def unlock(self): """Unlock this Workspace.""" r = fapi.unlock_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 204) self.data['workspace']['isLocked'] = False return self
[ "def", "unlock", "(", "self", ")", ":", "r", "=", "fapi", ".", "unlock_workspace", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "204", ")", "self", ".",...
Unlock this Workspace.
[ "Unlock", "this", "Workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L96-L101
broadinstitute/fiss
firecloud/workspace.py
Workspace.update_attribute
def update_attribute(self, attr, value): """Set the value of a workspace attribute.""" update = [fapi._attr_up(attr, value)] r = fapi.update_workspace_attributes(self.namespace, self.name, update, self.api_url) fapi._check_response_code(r, 200...
python
def update_attribute(self, attr, value): """Set the value of a workspace attribute.""" update = [fapi._attr_up(attr, value)] r = fapi.update_workspace_attributes(self.namespace, self.name, update, self.api_url) fapi._check_response_code(r, 200...
[ "def", "update_attribute", "(", "self", ",", "attr", ",", "value", ")", ":", "update", "=", "[", "fapi", ".", "_attr_up", "(", "attr", ",", "value", ")", "]", "r", "=", "fapi", ".", "update_workspace_attributes", "(", "self", ".", "namespace", ",", "se...
Set the value of a workspace attribute.
[ "Set", "the", "value", "of", "a", "workspace", "attribute", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L114-L119
broadinstitute/fiss
firecloud/workspace.py
Workspace.remove_attribute
def remove_attribute(self, attr): """Remove attribute from a workspace. Args: attr (str): attribute name """ update = [fapi._attr_rem(attr)] r = fapi.update_workspace_attributes(self.namespace, self.name, update, self.a...
python
def remove_attribute(self, attr): """Remove attribute from a workspace. Args: attr (str): attribute name """ update = [fapi._attr_rem(attr)] r = fapi.update_workspace_attributes(self.namespace, self.name, update, self.a...
[ "def", "remove_attribute", "(", "self", ",", "attr", ")", ":", "update", "=", "[", "fapi", ".", "_attr_rem", "(", "attr", ")", "]", "r", "=", "fapi", ".", "update_workspace_attributes", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "upd...
Remove attribute from a workspace. Args: attr (str): attribute name
[ "Remove", "attribute", "from", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L121-L131
broadinstitute/fiss
firecloud/workspace.py
Workspace.import_tsv
def import_tsv(self, tsv_file): """Upload entity data to workspace from tsv loadfile. Args: tsv_file (file): Tab-delimited file of entity data """ r = fapi.upload_entities_tsv(self.namespace, self.name, self.tsv_file, self.api_url) ...
python
def import_tsv(self, tsv_file): """Upload entity data to workspace from tsv loadfile. Args: tsv_file (file): Tab-delimited file of entity data """ r = fapi.upload_entities_tsv(self.namespace, self.name, self.tsv_file, self.api_url) ...
[ "def", "import_tsv", "(", "self", ",", "tsv_file", ")", ":", "r", "=", "fapi", ".", "upload_entities_tsv", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "tsv_file", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_res...
Upload entity data to workspace from tsv loadfile. Args: tsv_file (file): Tab-delimited file of entity data
[ "Upload", "entity", "data", "to", "workspace", "from", "tsv", "loadfile", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L133-L141
broadinstitute/fiss
firecloud/workspace.py
Workspace.get_entity
def get_entity(self, etype, entity_id): """Return entity in this workspace. Args: etype (str): Entity type entity_id (str): Entity name/unique id """ r = fapi.get_entity(self.namespace, self.name, etype, entity_id, self.api_url) ...
python
def get_entity(self, etype, entity_id): """Return entity in this workspace. Args: etype (str): Entity type entity_id (str): Entity name/unique id """ r = fapi.get_entity(self.namespace, self.name, etype, entity_id, self.api_url) ...
[ "def", "get_entity", "(", "self", ",", "etype", ",", "entity_id", ")", ":", "r", "=", "fapi", ".", "get_entity", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "etype", ",", "entity_id", ",", "self", ".", "api_url", ")", "fapi", ".", ...
Return entity in this workspace. Args: etype (str): Entity type entity_id (str): Entity name/unique id
[ "Return", "entity", "in", "this", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L143-L154
broadinstitute/fiss
firecloud/workspace.py
Workspace.delete_entity
def delete_entity(self, etype, entity_id): """Delete an entity in this workspace. Args: etype (str): Entity type entity_id (str): Entity name/unique id """ r = fapi.delete_entity(self.namespace, self.name, etype, entity_id, self....
python
def delete_entity(self, etype, entity_id): """Delete an entity in this workspace. Args: etype (str): Entity type entity_id (str): Entity name/unique id """ r = fapi.delete_entity(self.namespace, self.name, etype, entity_id, self....
[ "def", "delete_entity", "(", "self", ",", "etype", ",", "entity_id", ")", ":", "r", "=", "fapi", ".", "delete_entity", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "etype", ",", "entity_id", ",", "self", ".", "api_url", ")", "fapi", ...
Delete an entity in this workspace. Args: etype (str): Entity type entity_id (str): Entity name/unique id
[ "Delete", "an", "entity", "in", "this", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L156-L165
broadinstitute/fiss
firecloud/workspace.py
Workspace.import_entities
def import_entities(self, entities): """Upload entity objects. Args: entities: iterable of firecloud.Entity objects. """ edata = Entity.create_payload(entities) r = fapi.upload_entities(self.namespace, self.name, edata, self.api_url) ...
python
def import_entities(self, entities): """Upload entity objects. Args: entities: iterable of firecloud.Entity objects. """ edata = Entity.create_payload(entities) r = fapi.upload_entities(self.namespace, self.name, edata, self.api_url) ...
[ "def", "import_entities", "(", "self", ",", "entities", ")", ":", "edata", "=", "Entity", ".", "create_payload", "(", "entities", ")", "r", "=", "fapi", ".", "upload_entities", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "edata", ",", ...
Upload entity objects. Args: entities: iterable of firecloud.Entity objects.
[ "Upload", "entity", "objects", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L167-L176
broadinstitute/fiss
firecloud/workspace.py
Workspace.create_set
def create_set(self, set_id, etype, entities): """Create a set of entities and upload to FireCloud. Args etype (str): one of {"sample, "pair", "participant"} entities: iterable of firecloud.Entity objects. """ if etype not in {"sample", "pair", "participant"}: ...
python
def create_set(self, set_id, etype, entities): """Create a set of entities and upload to FireCloud. Args etype (str): one of {"sample, "pair", "participant"} entities: iterable of firecloud.Entity objects. """ if etype not in {"sample", "pair", "participant"}: ...
[ "def", "create_set", "(", "self", ",", "set_id", ",", "etype", ",", "entities", ")", ":", "if", "etype", "not", "in", "{", "\"sample\"", ",", "\"pair\"", ",", "\"participant\"", "}", ":", "raise", "ValueError", "(", "\"Unsupported entity type:\"", "+", "str"...
Create a set of entities and upload to FireCloud. Args etype (str): one of {"sample, "pair", "participant"} entities: iterable of firecloud.Entity objects.
[ "Create", "a", "set", "of", "entities", "and", "upload", "to", "FireCloud", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L178-L200
broadinstitute/fiss
firecloud/workspace.py
Workspace.submissions
def submissions(self): """List job submissions in workspace.""" r = fapi.get_submissions(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) return r.json()
python
def submissions(self): """List job submissions in workspace.""" r = fapi.get_submissions(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) return r.json()
[ "def", "submissions", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_submissions", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "return", ...
List job submissions in workspace.
[ "List", "job", "submissions", "in", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L214-L218
broadinstitute/fiss
firecloud/workspace.py
Workspace.entity_types
def entity_types(self): """List entity types in workspace.""" r = fapi.get_entity_types(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) return r.json().keys()
python
def entity_types(self): """List entity types in workspace.""" r = fapi.get_entity_types(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) return r.json().keys()
[ "def", "entity_types", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_entity_types", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "return"...
List entity types in workspace.
[ "List", "entity", "types", "in", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L220-L224
broadinstitute/fiss
firecloud/workspace.py
Workspace.entities
def entities(self): """List all entities in workspace.""" r = fapi.get_entities_with_type(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) edicts = r.json() return [Entity(e['entityType'], e['name'], e['attributes'...
python
def entities(self): """List all entities in workspace.""" r = fapi.get_entities_with_type(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) edicts = r.json() return [Entity(e['entityType'], e['name'], e['attributes'...
[ "def", "entities", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_entities_with_type", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "edict...
List all entities in workspace.
[ "List", "all", "entities", "in", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L226-L233
broadinstitute/fiss
firecloud/workspace.py
Workspace.__get_entities
def __get_entities(self, etype): """Helper to get entities for a given type.""" r = fapi.get_entities(self.namespace, self.name, etype, self.api_url) fapi._check_response_code(r, 200) return [Entity(e['entityType'], e['name'], e['attributes']) ...
python
def __get_entities(self, etype): """Helper to get entities for a given type.""" r = fapi.get_entities(self.namespace, self.name, etype, self.api_url) fapi._check_response_code(r, 200) return [Entity(e['entityType'], e['name'], e['attributes']) ...
[ "def", "__get_entities", "(", "self", ",", "etype", ")", ":", "r", "=", "fapi", ".", "get_entities", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "etype", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r",...
Helper to get entities for a given type.
[ "Helper", "to", "get", "entities", "for", "a", "given", "type", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L235-L241
broadinstitute/fiss
firecloud/workspace.py
Workspace.copy_entities
def copy_entities(self, from_namespace, from_workspace, etype, enames): """Copy entities from another workspace. Args: from_namespace (str): Source workspace namespace from_workspace (str): Source workspace name etype (str): Entity type enames (list(str))...
python
def copy_entities(self, from_namespace, from_workspace, etype, enames): """Copy entities from another workspace. Args: from_namespace (str): Source workspace namespace from_workspace (str): Source workspace name etype (str): Entity type enames (list(str))...
[ "def", "copy_entities", "(", "self", ",", "from_namespace", ",", "from_workspace", ",", "etype", ",", "enames", ")", ":", "r", "=", "fapi", ".", "copy_entities", "(", "from_namespace", ",", "from_workspace", ",", "self", ".", "namespace", ",", "self", ".", ...
Copy entities from another workspace. Args: from_namespace (str): Source workspace namespace from_workspace (str): Source workspace name etype (str): Entity type enames (list(str)): List of entity names to copy
[ "Copy", "entities", "from", "another", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L267-L279
broadinstitute/fiss
firecloud/workspace.py
Workspace.configs
def configs(self): """Get method configurations in a workspace.""" raise NotImplementedError r = fapi.get_configs(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) cdata = r.json() configs = [] for c in cdata: cnamespace = c['n...
python
def configs(self): """Get method configurations in a workspace.""" raise NotImplementedError r = fapi.get_configs(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) cdata = r.json() configs = [] for c in cdata: cnamespace = c['n...
[ "def", "configs", "(", "self", ")", ":", "raise", "NotImplementedError", "r", "=", "fapi", ".", "get_configs", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", ...
Get method configurations in a workspace.
[ "Get", "method", "configurations", "in", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L281-L294
broadinstitute/fiss
firecloud/workspace.py
Workspace.acl
def acl(self): """Get the access control list for this workspace.""" r = fapi.get_workspace_acl(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) return r.json()
python
def acl(self): """Get the access control list for this workspace.""" r = fapi.get_workspace_acl(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 200) return r.json()
[ "def", "acl", "(", "self", ")", ":", "r", "=", "fapi", ".", "get_workspace_acl", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "self", ".", "api_url", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "return", "r",...
Get the access control list for this workspace.
[ "Get", "the", "access", "control", "list", "for", "this", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L296-L300
broadinstitute/fiss
firecloud/workspace.py
Workspace.clone
def clone(self, to_namespace, to_name): """Clone this workspace. Args: to_namespace (str): Target workspace namespace to_name (str): Target workspace name """ r = fapi.clone_workspace(self.namespace, self.name, to_namespace, to_na...
python
def clone(self, to_namespace, to_name): """Clone this workspace. Args: to_namespace (str): Target workspace namespace to_name (str): Target workspace name """ r = fapi.clone_workspace(self.namespace, self.name, to_namespace, to_na...
[ "def", "clone", "(", "self", ",", "to_namespace", ",", "to_name", ")", ":", "r", "=", "fapi", ".", "clone_workspace", "(", "self", ".", "namespace", ",", "self", ".", "name", ",", "to_namespace", ",", "to_name", ",", "self", ".", "api_url", ")", "fapi"...
Clone this workspace. Args: to_namespace (str): Target workspace namespace to_name (str): Target workspace name
[ "Clone", "this", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/workspace.py#L315-L325
broadinstitute/fiss
firecloud/supervisor.py
supervise
def supervise(project, workspace, namespace, workflow, sample_sets, recovery_file): """ Supervise submission of jobs from a Firehose-style workflow of workflows""" # Get arguments logging.info("Initializing FireCloud Supervisor...") logging.info("Saving recovery checkpoints to " + recover...
python
def supervise(project, workspace, namespace, workflow, sample_sets, recovery_file): """ Supervise submission of jobs from a Firehose-style workflow of workflows""" # Get arguments logging.info("Initializing FireCloud Supervisor...") logging.info("Saving recovery checkpoints to " + recover...
[ "def", "supervise", "(", "project", ",", "workspace", ",", "namespace", ",", "workflow", ",", "sample_sets", ",", "recovery_file", ")", ":", "# Get arguments", "logging", ".", "info", "(", "\"Initializing FireCloud Supervisor...\"", ")", "logging", ".", "info", "(...
Supervise submission of jobs from a Firehose-style workflow of workflows
[ "Supervise", "submission", "of", "jobs", "from", "a", "Firehose", "-", "style", "workflow", "of", "workflows" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/supervisor.py#L12-L39
broadinstitute/fiss
firecloud/supervisor.py
init_supervisor_data
def init_supervisor_data(dotfile, sample_sets): """ Parse a workflow description written in DOT (like Firehose)""" with open(dotfile) as wf: graph_data = wf.read() graph = pydot.graph_from_dot_data(graph_data)[0] nodes = [n.get_name().strip('"') for n in graph.get_nodes()] monitor_data = d...
python
def init_supervisor_data(dotfile, sample_sets): """ Parse a workflow description written in DOT (like Firehose)""" with open(dotfile) as wf: graph_data = wf.read() graph = pydot.graph_from_dot_data(graph_data)[0] nodes = [n.get_name().strip('"') for n in graph.get_nodes()] monitor_data = d...
[ "def", "init_supervisor_data", "(", "dotfile", ",", "sample_sets", ")", ":", "with", "open", "(", "dotfile", ")", "as", "wf", ":", "graph_data", "=", "wf", ".", "read", "(", ")", "graph", "=", "pydot", ".", "graph_from_dot_data", "(", "graph_data", ")", ...
Parse a workflow description written in DOT (like Firehose)
[ "Parse", "a", "workflow", "description", "written", "in", "DOT", "(", "like", "Firehose", ")" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/supervisor.py#L42-L75
broadinstitute/fiss
firecloud/supervisor.py
validate_monitor_tasks
def validate_monitor_tasks(dependencies, args): """ Validate that all entries in the supervisor are valid task configurations and that all permissions requirements are satisfied. """ # Make a list of all task configurations needed to supervise sup_configs = sorted(dependencies.keys()) try:...
python
def validate_monitor_tasks(dependencies, args): """ Validate that all entries in the supervisor are valid task configurations and that all permissions requirements are satisfied. """ # Make a list of all task configurations needed to supervise sup_configs = sorted(dependencies.keys()) try:...
[ "def", "validate_monitor_tasks", "(", "dependencies", ",", "args", ")", ":", "# Make a list of all task configurations needed to supervise", "sup_configs", "=", "sorted", "(", "dependencies", ".", "keys", "(", ")", ")", "try", ":", "logging", ".", "info", "(", "\"Va...
Validate that all entries in the supervisor are valid task configurations and that all permissions requirements are satisfied.
[ "Validate", "that", "all", "entries", "in", "the", "supervisor", "are", "valid", "task", "configurations", "and", "that", "all", "permissions", "requirements", "are", "satisfied", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/supervisor.py#L78-L128
broadinstitute/fiss
firecloud/supervisor.py
recover_and_supervise
def recover_and_supervise(recovery_file): """ Retrieve monitor data from recovery_file and resume monitoring """ try: logging.info("Attempting to recover Supervisor data from " + recovery_file) with open(recovery_file) as rf: recovery_data = json.load(rf) monitor_data = r...
python
def recover_and_supervise(recovery_file): """ Retrieve monitor data from recovery_file and resume monitoring """ try: logging.info("Attempting to recover Supervisor data from " + recovery_file) with open(recovery_file) as rf: recovery_data = json.load(rf) monitor_data = r...
[ "def", "recover_and_supervise", "(", "recovery_file", ")", ":", "try", ":", "logging", ".", "info", "(", "\"Attempting to recover Supervisor data from \"", "+", "recovery_file", ")", "with", "open", "(", "recovery_file", ")", "as", "rf", ":", "recovery_data", "=", ...
Retrieve monitor data from recovery_file and resume monitoring
[ "Retrieve", "monitor", "data", "from", "recovery_file", "and", "resume", "monitoring" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/supervisor.py#L130-L145
broadinstitute/fiss
firecloud/supervisor.py
supervise_until_complete
def supervise_until_complete(monitor_data, dependencies, args, recovery_file): """ Supervisor loop. Loop forever until all tasks are evaluated or completed """ project = args['project'] workspace = args['workspace'] namespace = args['namespace'] sample_sets = args['sample_sets'] recovery_data = ...
python
def supervise_until_complete(monitor_data, dependencies, args, recovery_file): """ Supervisor loop. Loop forever until all tasks are evaluated or completed """ project = args['project'] workspace = args['workspace'] namespace = args['namespace'] sample_sets = args['sample_sets'] recovery_data = ...
[ "def", "supervise_until_complete", "(", "monitor_data", ",", "dependencies", ",", "args", ",", "recovery_file", ")", ":", "project", "=", "args", "[", "'project'", "]", "workspace", "=", "args", "[", "'workspace'", "]", "namespace", "=", "args", "[", "'namespa...
Supervisor loop. Loop forever until all tasks are evaluated or completed
[ "Supervisor", "loop", ".", "Loop", "forever", "until", "all", "tasks", "are", "evaluated", "or", "completed" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/supervisor.py#L148-L289
broadinstitute/fiss
firecloud/fiss.py
space_list
def space_list(args): ''' List accessible workspaces, in TSV form: <namespace><TAB>workspace''' r = fapi.list_workspaces() fapi._check_response_code(r, 200) spaces = [] project = args.project if project: project = re.compile('^' + project) for space in r.json(): ns = space...
python
def space_list(args): ''' List accessible workspaces, in TSV form: <namespace><TAB>workspace''' r = fapi.list_workspaces() fapi._check_response_code(r, 200) spaces = [] project = args.project if project: project = re.compile('^' + project) for space in r.json(): ns = space...
[ "def", "space_list", "(", "args", ")", ":", "r", "=", "fapi", ".", "list_workspaces", "(", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "spaces", "=", "[", "]", "project", "=", "args", ".", "project", "if", "project", ":", "pr...
List accessible workspaces, in TSV form: <namespace><TAB>workspace
[ "List", "accessible", "workspaces", "in", "TSV", "form", ":", "<namespace", ">", "<TAB", ">", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L40-L59
broadinstitute/fiss
firecloud/fiss.py
space_exists
def space_exists(args): """ Determine if the named space exists in the given project (namespace)""" # The return value is the INVERSE of UNIX exit status semantics, (where # 0 = good/true, 1 = bad/false), so to check existence in UNIX one would do # if ! fissfc space_exists blah ; then # ... ...
python
def space_exists(args): """ Determine if the named space exists in the given project (namespace)""" # The return value is the INVERSE of UNIX exit status semantics, (where # 0 = good/true, 1 = bad/false), so to check existence in UNIX one would do # if ! fissfc space_exists blah ; then # ... ...
[ "def", "space_exists", "(", "args", ")", ":", "# The return value is the INVERSE of UNIX exit status semantics, (where", "# 0 = good/true, 1 = bad/false), so to check existence in UNIX one would do", "# if ! fissfc space_exists blah ; then", "# ...", "# fi", "try", ":", "r", "="...
Determine if the named space exists in the given project (namespace)
[ "Determine", "if", "the", "named", "space", "exists", "in", "the", "given", "project", "(", "namespace", ")" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L62-L82
broadinstitute/fiss
firecloud/fiss.py
space_lock
def space_lock(args): """ Lock a workspace """ r = fapi.lock_workspace(args.project, args.workspace) fapi._check_response_code(r, 204) if fcconfig.verbosity: eprint('Locked workspace {0}/{1}'.format(args.project, args.workspace)) return 0
python
def space_lock(args): """ Lock a workspace """ r = fapi.lock_workspace(args.project, args.workspace) fapi._check_response_code(r, 204) if fcconfig.verbosity: eprint('Locked workspace {0}/{1}'.format(args.project, args.workspace)) return 0
[ "def", "space_lock", "(", "args", ")", ":", "r", "=", "fapi", ".", "lock_workspace", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "204", ")", "if", "fcconfig", ".", "verbosity", ":...
Lock a workspace
[ "Lock", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L85-L91
broadinstitute/fiss
firecloud/fiss.py
space_unlock
def space_unlock(args): """ Unlock a workspace """ r = fapi.unlock_workspace(args.project, args.workspace) fapi._check_response_code(r, 204) if fcconfig.verbosity: eprint('Unlocked workspace {0}/{1}'.format(args.project,args.workspace)) return 0
python
def space_unlock(args): """ Unlock a workspace """ r = fapi.unlock_workspace(args.project, args.workspace) fapi._check_response_code(r, 204) if fcconfig.verbosity: eprint('Unlocked workspace {0}/{1}'.format(args.project,args.workspace)) return 0
[ "def", "space_unlock", "(", "args", ")", ":", "r", "=", "fapi", ".", "unlock_workspace", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "204", ")", "if", "fcconfig", ".", "verbosity", ...
Unlock a workspace
[ "Unlock", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L94-L100
broadinstitute/fiss
firecloud/fiss.py
space_new
def space_new(args): """ Create a new workspace. """ r = fapi.create_workspace(args.project, args.workspace, args.authdomain, dict()) fapi._check_response_code(r, 201) if fcconfig.verbosity: eprint(r.content) return 0
python
def space_new(args): """ Create a new workspace. """ r = fapi.create_workspace(args.project, args.workspace, args.authdomain, dict()) fapi._check_response_code(r, 201) if fcconfig.verbosity: eprint(r.content) return 0
[ "def", "space_new", "(", "args", ")", ":", "r", "=", "fapi", ".", "create_workspace", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "authdomain", ",", "dict", "(", ")", ")", "fapi", ".", "_check_response_code", "(", "r",...
Create a new workspace.
[ "Create", "a", "new", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L103-L110
broadinstitute/fiss
firecloud/fiss.py
space_info
def space_info(args): """ Get metadata for a workspace. """ r = fapi.get_workspace(args.project, args.workspace) fapi._check_response_code(r, 200) return r.text
python
def space_info(args): """ Get metadata for a workspace. """ r = fapi.get_workspace(args.project, args.workspace) fapi._check_response_code(r, 200) return r.text
[ "def", "space_info", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_workspace", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "return", "r", ".", "text" ]
Get metadata for a workspace.
[ "Get", "metadata", "for", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L113-L117
broadinstitute/fiss
firecloud/fiss.py
space_delete
def space_delete(args): """ Delete a workspace. """ message = "WARNING: this will delete workspace: \n\t{0}/{1}".format( args.project, args.workspace) if not args.yes and not _confirm_prompt(message): return 0 r = fapi.delete_workspace(args.project, args.workspace) fapi._check_respo...
python
def space_delete(args): """ Delete a workspace. """ message = "WARNING: this will delete workspace: \n\t{0}/{1}".format( args.project, args.workspace) if not args.yes and not _confirm_prompt(message): return 0 r = fapi.delete_workspace(args.project, args.workspace) fapi._check_respo...
[ "def", "space_delete", "(", "args", ")", ":", "message", "=", "\"WARNING: this will delete workspace: \\n\\t{0}/{1}\"", ".", "format", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "if", "not", "args", ".", "yes", "and", "not", "_confirm_promp...
Delete a workspace.
[ "Delete", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L120-L131
broadinstitute/fiss
firecloud/fiss.py
space_clone
def space_clone(args): """ Replicate a workspace """ # FIXME: add --deep copy option (shallow by default) # add aliasing capability, then make space_copy alias if not args.to_workspace: args.to_workspace = args.workspace if not args.to_project: args.to_project = args.project ...
python
def space_clone(args): """ Replicate a workspace """ # FIXME: add --deep copy option (shallow by default) # add aliasing capability, then make space_copy alias if not args.to_workspace: args.to_workspace = args.workspace if not args.to_project: args.to_project = args.project ...
[ "def", "space_clone", "(", "args", ")", ":", "# FIXME: add --deep copy option (shallow by default)", "# add aliasing capability, then make space_copy alias", "if", "not", "args", ".", "to_workspace", ":", "args", ".", "to_workspace", "=", "args", ".", "workspace", "i...
Replicate a workspace
[ "Replicate", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L134-L158
broadinstitute/fiss
firecloud/fiss.py
space_acl
def space_acl(args): ''' Retrieve access control list for a workspace''' r = fapi.get_workspace_acl(args.project, args.workspace) fapi._check_response_code(r, 200) result = dict() for user, info in sorted(r.json()['acl'].items()): result[user] = info['accessLevel'] return result
python
def space_acl(args): ''' Retrieve access control list for a workspace''' r = fapi.get_workspace_acl(args.project, args.workspace) fapi._check_response_code(r, 200) result = dict() for user, info in sorted(r.json()['acl'].items()): result[user] = info['accessLevel'] return result
[ "def", "space_acl", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_workspace_acl", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "result", "=", "dict", "(", ")", "...
Retrieve access control list for a workspace
[ "Retrieve", "access", "control", "list", "for", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L161-L168
broadinstitute/fiss
firecloud/fiss.py
space_set_acl
def space_set_acl(args): """ Assign an ACL role to list of users for a workspace """ acl_updates = [{"email": user, "accessLevel": args.role} for user in args.users] r = fapi.update_workspace_acl(args.project, args.workspace, acl_updates) fapi._check_response_code(r, 200) errors =...
python
def space_set_acl(args): """ Assign an ACL role to list of users for a workspace """ acl_updates = [{"email": user, "accessLevel": args.role} for user in args.users] r = fapi.update_workspace_acl(args.project, args.workspace, acl_updates) fapi._check_response_code(r, 200) errors =...
[ "def", "space_set_acl", "(", "args", ")", ":", "acl_updates", "=", "[", "{", "\"email\"", ":", "user", ",", "\"accessLevel\"", ":", "args", ".", "role", "}", "for", "user", "in", "args", ".", "users", "]", "r", "=", "fapi", ".", "update_workspace_acl", ...
Assign an ACL role to list of users for a workspace
[ "Assign", "an", "ACL", "role", "to", "list", "of", "users", "for", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L171-L188
broadinstitute/fiss
firecloud/fiss.py
space_search
def space_search(args): """ Search for workspaces matching certain criteria """ r = fapi.list_workspaces() fapi._check_response_code(r, 200) # Parse the JSON for workspace + namespace; then filter by # search terms: each term is treated as a regular expression workspaces = r.json() extra_te...
python
def space_search(args): """ Search for workspaces matching certain criteria """ r = fapi.list_workspaces() fapi._check_response_code(r, 200) # Parse the JSON for workspace + namespace; then filter by # search terms: each term is treated as a regular expression workspaces = r.json() extra_te...
[ "def", "space_search", "(", "args", ")", ":", "r", "=", "fapi", ".", "list_workspaces", "(", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "# Parse the JSON for workspace + namespace; then filter by", "# search terms: each term is treated as a regul...
Search for workspaces matching certain criteria
[ "Search", "for", "workspaces", "matching", "certain", "criteria" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L191-L216
broadinstitute/fiss
firecloud/fiss.py
entity_import
def entity_import(args): """ Upload an entity loadfile. """ project = args.project workspace = args.workspace chunk_size = args.chunk_size with open(args.tsvfile) as tsvf: headerline = tsvf.readline().strip() entity_data = [l.rstrip('\n') for l in tsvf] return _batch_load(proje...
python
def entity_import(args): """ Upload an entity loadfile. """ project = args.project workspace = args.workspace chunk_size = args.chunk_size with open(args.tsvfile) as tsvf: headerline = tsvf.readline().strip() entity_data = [l.rstrip('\n') for l in tsvf] return _batch_load(proje...
[ "def", "entity_import", "(", "args", ")", ":", "project", "=", "args", ".", "project", "workspace", "=", "args", ".", "workspace", "chunk_size", "=", "args", ".", "chunk_size", "with", "open", "(", "args", ".", "tsvfile", ")", "as", "tsvf", ":", "headerl...
Upload an entity loadfile.
[ "Upload", "an", "entity", "loadfile", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L219-L229
broadinstitute/fiss
firecloud/fiss.py
set_export
def set_export(args): '''Return a list of lines in TSV form that would suffice to reconstitute a container (set) entity, if passed to entity_import. The first line in the list is the header, and subsequent lines are the container members. ''' r = fapi.get_entity(args.project, args.workspace,...
python
def set_export(args): '''Return a list of lines in TSV form that would suffice to reconstitute a container (set) entity, if passed to entity_import. The first line in the list is the header, and subsequent lines are the container members. ''' r = fapi.get_entity(args.project, args.workspace,...
[ "def", "set_export", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_entity", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "entity_type", ",", "args", ".", "entity", ")", "fapi", ".", "_check_response_code", "(", "r"...
Return a list of lines in TSV form that would suffice to reconstitute a container (set) entity, if passed to entity_import. The first line in the list is the header, and subsequent lines are the container members.
[ "Return", "a", "list", "of", "lines", "in", "TSV", "form", "that", "would", "suffice", "to", "reconstitute", "a", "container", "(", "set", ")", "entity", "if", "passed", "to", "entity_import", ".", "The", "first", "line", "in", "the", "list", "is", "the"...
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L232-L247
broadinstitute/fiss
firecloud/fiss.py
entity_types
def entity_types(args): """ List entity types in a workspace """ r = fapi.list_entity_types(args.project, args.workspace) fapi._check_response_code(r, 200) return r.json().keys()
python
def entity_types(args): """ List entity types in a workspace """ r = fapi.list_entity_types(args.project, args.workspace) fapi._check_response_code(r, 200) return r.json().keys()
[ "def", "entity_types", "(", "args", ")", ":", "r", "=", "fapi", ".", "list_entity_types", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "return", "r", ".", "json", "(", ...
List entity types in a workspace
[ "List", "entity", "types", "in", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L250-L254
broadinstitute/fiss
firecloud/fiss.py
entity_list
def entity_list(args): """ List entities in a workspace. """ r = fapi.get_entities_with_type(args.project, args.workspace) fapi._check_response_code(r, 200) return [ '{0}\t{1}'.format(e['entityType'], e['name']) for e in r.json() ]
python
def entity_list(args): """ List entities in a workspace. """ r = fapi.get_entities_with_type(args.project, args.workspace) fapi._check_response_code(r, 200) return [ '{0}\t{1}'.format(e['entityType'], e['name']) for e in r.json() ]
[ "def", "entity_list", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_entities_with_type", "(", "args", ".", "project", ",", "args", ".", "workspace", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")", "return", "[", "'{0}\\t{1}'", "...
List entities in a workspace.
[ "List", "entities", "in", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L257-L261
broadinstitute/fiss
firecloud/fiss.py
participant_list
def participant_list(args): ''' List participants within a container''' # Case 1: retrieve participants within a named data entity if args.entity_type and args.entity: # Edge case: caller asked for participant within participant (itself) if args.entity_type == 'participant': ret...
python
def participant_list(args): ''' List participants within a container''' # Case 1: retrieve participants within a named data entity if args.entity_type and args.entity: # Edge case: caller asked for participant within participant (itself) if args.entity_type == 'participant': ret...
[ "def", "participant_list", "(", "args", ")", ":", "# Case 1: retrieve participants within a named data entity", "if", "args", ".", "entity_type", "and", "args", ".", "entity", ":", "# Edge case: caller asked for participant within participant (itself)", "if", "args", ".", "en...
List participants within a container
[ "List", "participants", "within", "a", "container" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L283-L298
broadinstitute/fiss
firecloud/fiss.py
pair_list
def pair_list(args): ''' List pairs within a container. ''' # Case 1: retrieve pairs within a named data entity if args.entity_type and args.entity: # Edge case: caller asked for pair within a pair (itself) if args.entity_type == 'pair': return [ args.entity.strip() ] # ...
python
def pair_list(args): ''' List pairs within a container. ''' # Case 1: retrieve pairs within a named data entity if args.entity_type and args.entity: # Edge case: caller asked for pair within a pair (itself) if args.entity_type == 'pair': return [ args.entity.strip() ] # ...
[ "def", "pair_list", "(", "args", ")", ":", "# Case 1: retrieve pairs within a named data entity", "if", "args", ".", "entity_type", "and", "args", ".", "entity", ":", "# Edge case: caller asked for pair within a pair (itself)", "if", "args", ".", "entity_type", "==", "'pa...
List pairs within a container.
[ "List", "pairs", "within", "a", "container", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L301-L324
broadinstitute/fiss
firecloud/fiss.py
sample_list
def sample_list(args): ''' List samples within a container. ''' # Case 1: retrieve samples within a named data entity if args.entity_type and args.entity: # Edge case: caller asked for samples within a sample (itself) if args.entity_type == 'sample': return [ args.entity.strip()...
python
def sample_list(args): ''' List samples within a container. ''' # Case 1: retrieve samples within a named data entity if args.entity_type and args.entity: # Edge case: caller asked for samples within a sample (itself) if args.entity_type == 'sample': return [ args.entity.strip()...
[ "def", "sample_list", "(", "args", ")", ":", "# Case 1: retrieve samples within a named data entity", "if", "args", ".", "entity_type", "and", "args", ".", "entity", ":", "# Edge case: caller asked for samples within a sample (itself)", "if", "args", ".", "entity_type", "==...
List samples within a container.
[ "List", "samples", "within", "a", "container", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L327-L355
broadinstitute/fiss
firecloud/fiss.py
entity_delete
def entity_delete(args): """ Delete entity in a workspace. """ msg = "WARNING: this will delete {0} {1} in {2}/{3}".format( args.entity_type, args.entity, args.project, args.workspace) if not (args.yes or _confirm_prompt(msg)): return json_body=[{"entityType": args.entity_type, ...
python
def entity_delete(args): """ Delete entity in a workspace. """ msg = "WARNING: this will delete {0} {1} in {2}/{3}".format( args.entity_type, args.entity, args.project, args.workspace) if not (args.yes or _confirm_prompt(msg)): return json_body=[{"entityType": args.entity_type, ...
[ "def", "entity_delete", "(", "args", ")", ":", "msg", "=", "\"WARNING: this will delete {0} {1} in {2}/{3}\"", ".", "format", "(", "args", ".", "entity_type", ",", "args", ".", "entity", ",", "args", ".", "project", ",", "args", ".", "workspace", ")", "if", ...
Delete entity in a workspace.
[ "Delete", "entity", "in", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L363-L377
broadinstitute/fiss
firecloud/fiss.py
meth_new
def meth_new(args): """ Submit a new workflow (or update) to the methods repository. """ r = fapi.update_repository_method(args.namespace, args.method, args.synopsis, args.wdl, args.doc, args.comment) fapi._check_response_code(r, 20...
python
def meth_new(args): """ Submit a new workflow (or update) to the methods repository. """ r = fapi.update_repository_method(args.namespace, args.method, args.synopsis, args.wdl, args.doc, args.comment) fapi._check_response_code(r, 20...
[ "def", "meth_new", "(", "args", ")", ":", "r", "=", "fapi", ".", "update_repository_method", "(", "args", ".", "namespace", ",", "args", ".", "method", ",", "args", ".", "synopsis", ",", "args", ".", "wdl", ",", "args", ".", "doc", ",", "args", ".", ...
Submit a new workflow (or update) to the methods repository.
[ "Submit", "a", "new", "workflow", "(", "or", "update", ")", "to", "the", "methods", "repository", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L395-L404
broadinstitute/fiss
firecloud/fiss.py
meth_delete
def meth_delete(args): """ Remove (redact) a method from the method repository """ message = "WARNING: this will delete workflow \n\t{0}/{1}:{2}".format( args.namespace, args.method, args.snapshot_id) if not args.yes and not _confirm_prompt(message): return r...
python
def meth_delete(args): """ Remove (redact) a method from the method repository """ message = "WARNING: this will delete workflow \n\t{0}/{1}:{2}".format( args.namespace, args.method, args.snapshot_id) if not args.yes and not _confirm_prompt(message): return r...
[ "def", "meth_delete", "(", "args", ")", ":", "message", "=", "\"WARNING: this will delete workflow \\n\\t{0}/{1}:{2}\"", ".", "format", "(", "args", ".", "namespace", ",", "args", ".", "method", ",", "args", ".", "snapshot_id", ")", "if", "not", "args", ".", "...
Remove (redact) a method from the method repository
[ "Remove", "(", "redact", ")", "a", "method", "from", "the", "method", "repository" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L407-L419
broadinstitute/fiss
firecloud/fiss.py
meth_wdl
def meth_wdl(args): ''' Retrieve WDL for given version of a repository method''' r = fapi.get_repository_method(args.namespace, args.method, args.snapshot_id, True) fapi._check_response_code(r, 200) return r.text
python
def meth_wdl(args): ''' Retrieve WDL for given version of a repository method''' r = fapi.get_repository_method(args.namespace, args.method, args.snapshot_id, True) fapi._check_response_code(r, 200) return r.text
[ "def", "meth_wdl", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_repository_method", "(", "args", ".", "namespace", ",", "args", ".", "method", ",", "args", ".", "snapshot_id", ",", "True", ")", "fapi", ".", "_check_response_code", "(", "r", ",", ...
Retrieve WDL for given version of a repository method
[ "Retrieve", "WDL", "for", "given", "version", "of", "a", "repository", "method" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L422-L427
broadinstitute/fiss
firecloud/fiss.py
meth_acl
def meth_acl(args): ''' Retrieve access control list for given version of a repository method''' r = fapi.get_repository_method_acl(args.namespace, args.method, args.snapshot_id) fapi._check_response_code(r, 200) acls = sorted(r.json(), key=lambda k: k...
python
def meth_acl(args): ''' Retrieve access control list for given version of a repository method''' r = fapi.get_repository_method_acl(args.namespace, args.method, args.snapshot_id) fapi._check_response_code(r, 200) acls = sorted(r.json(), key=lambda k: k...
[ "def", "meth_acl", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_repository_method_acl", "(", "args", ".", "namespace", ",", "args", ".", "method", ",", "args", ".", "snapshot_id", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")",...
Retrieve access control list for given version of a repository method
[ "Retrieve", "access", "control", "list", "for", "given", "version", "of", "a", "repository", "method" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L430-L436
broadinstitute/fiss
firecloud/fiss.py
meth_set_acl
def meth_set_acl(args): """ Assign an ACL role to a list of users for a workflow. """ acl_updates = [{"user": user, "role": args.role} \ for user in set(expand_fc_groups(args.users)) \ if user != fapi.whoami()] id = args.snapshot_id if not id: # get the lat...
python
def meth_set_acl(args): """ Assign an ACL role to a list of users for a workflow. """ acl_updates = [{"user": user, "role": args.role} \ for user in set(expand_fc_groups(args.users)) \ if user != fapi.whoami()] id = args.snapshot_id if not id: # get the lat...
[ "def", "meth_set_acl", "(", "args", ")", ":", "acl_updates", "=", "[", "{", "\"user\"", ":", "user", ",", "\"role\"", ":", "args", ".", "role", "}", "for", "user", "in", "set", "(", "expand_fc_groups", "(", "args", ".", "users", ")", ")", "if", "user...
Assign an ACL role to a list of users for a workflow.
[ "Assign", "an", "ACL", "role", "to", "a", "list", "of", "users", "for", "a", "workflow", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L439-L466
broadinstitute/fiss
firecloud/fiss.py
expand_fc_groups
def expand_fc_groups(users): """ If user is a firecloud group, return all members of the group. Caveat is that only group admins may do this. """ groups = None for user in users: fcgroup = None if '@' not in user: fcgroup = user elif user.lower().endswith('@firecl...
python
def expand_fc_groups(users): """ If user is a firecloud group, return all members of the group. Caveat is that only group admins may do this. """ groups = None for user in users: fcgroup = None if '@' not in user: fcgroup = user elif user.lower().endswith('@firecl...
[ "def", "expand_fc_groups", "(", "users", ")", ":", "groups", "=", "None", "for", "user", "in", "users", ":", "fcgroup", "=", "None", "if", "'@'", "not", "in", "user", ":", "fcgroup", "=", "user", "elif", "user", ".", "lower", "(", ")", ".", "endswith...
If user is a firecloud group, return all members of the group. Caveat is that only group admins may do this.
[ "If", "user", "is", "a", "firecloud", "group", "return", "all", "members", "of", "the", "group", ".", "Caveat", "is", "that", "only", "group", "admins", "may", "do", "this", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L468-L499
broadinstitute/fiss
firecloud/fiss.py
meth_list
def meth_list(args): """ List workflows in the methods repository """ r = fapi.list_repository_methods(namespace=args.namespace, name=args.method, snapshotId=args.snapshot_id) fapi._check_response_code(r, 200) # Parse the JSON fo...
python
def meth_list(args): """ List workflows in the methods repository """ r = fapi.list_repository_methods(namespace=args.namespace, name=args.method, snapshotId=args.snapshot_id) fapi._check_response_code(r, 200) # Parse the JSON fo...
[ "def", "meth_list", "(", "args", ")", ":", "r", "=", "fapi", ".", "list_repository_methods", "(", "namespace", "=", "args", ".", "namespace", ",", "name", "=", "args", ".", "method", ",", "snapshotId", "=", "args", ".", "snapshot_id", ")", "fapi", ".", ...
List workflows in the methods repository
[ "List", "workflows", "in", "the", "methods", "repository" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L502-L519
broadinstitute/fiss
firecloud/fiss.py
config_start
def config_start(args): '''Invoke a task (method configuration), on given entity in given space''' # Try to use call caching (job avoidance)? Flexibly accept range of answers cache = getattr(args, "cache", True) cache = cache is True or (cache.lower() in ["y", "true", "yes", "t", "1"]) if not arg...
python
def config_start(args): '''Invoke a task (method configuration), on given entity in given space''' # Try to use call caching (job avoidance)? Flexibly accept range of answers cache = getattr(args, "cache", True) cache = cache is True or (cache.lower() in ["y", "true", "yes", "t", "1"]) if not arg...
[ "def", "config_start", "(", "args", ")", ":", "# Try to use call caching (job avoidance)? Flexibly accept range of answers", "cache", "=", "getattr", "(", "args", ",", "\"cache\"", ",", "True", ")", "cache", "=", "cache", "is", "True", "or", "(", "cache", ".", "l...
Invoke a task (method configuration), on given entity in given space
[ "Invoke", "a", "task", "(", "method", "configuration", ")", "on", "given", "entity", "in", "given", "space" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L529-L548
broadinstitute/fiss
firecloud/fiss.py
config_stop
def config_stop(args): '''Abort a task (method configuration) by submission ID in given space''' r = fapi.abort_submission(args.project, args.workspace, args.submission_id) fapi._check_response_code(r, 204) return ("Aborted {0} in {1}/{2}".format(args.submission_id, ...
python
def config_stop(args): '''Abort a task (method configuration) by submission ID in given space''' r = fapi.abort_submission(args.project, args.workspace, args.submission_id) fapi._check_response_code(r, 204) return ("Aborted {0} in {1}/{2}".format(args.submission_id, ...
[ "def", "config_stop", "(", "args", ")", ":", "r", "=", "fapi", ".", "abort_submission", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "submission_id", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "204", ")", ...
Abort a task (method configuration) by submission ID in given space
[ "Abort", "a", "task", "(", "method", "configuration", ")", "by", "submission", "ID", "in", "given", "space" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L551-L560
broadinstitute/fiss
firecloud/fiss.py
config_list
def config_list(args): """ List configuration(s) in the methods repository or a workspace. """ verbose = fcconfig.verbosity if args.workspace: if verbose: print("Retrieving method configs from space {0}".format(args.workspace)) if not args.project: eprint("No project ...
python
def config_list(args): """ List configuration(s) in the methods repository or a workspace. """ verbose = fcconfig.verbosity if args.workspace: if verbose: print("Retrieving method configs from space {0}".format(args.workspace)) if not args.project: eprint("No project ...
[ "def", "config_list", "(", "args", ")", ":", "verbose", "=", "fcconfig", ".", "verbosity", "if", "args", ".", "workspace", ":", "if", "verbose", ":", "print", "(", "\"Retrieving method configs from space {0}\"", ".", "format", "(", "args", ".", "workspace", ")...
List configuration(s) in the methods repository or a workspace.
[ "List", "configuration", "(", "s", ")", "in", "the", "methods", "repository", "or", "a", "workspace", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L563-L599
broadinstitute/fiss
firecloud/fiss.py
config_acl
def config_acl(args): ''' Retrieve access control list for a method configuration''' r = fapi.get_repository_config_acl(args.namespace, args.config, args.snapshot_id) fapi._check_response_code(r, 200) acls = sorted(r.json(), key=lambda k: k['user']) ...
python
def config_acl(args): ''' Retrieve access control list for a method configuration''' r = fapi.get_repository_config_acl(args.namespace, args.config, args.snapshot_id) fapi._check_response_code(r, 200) acls = sorted(r.json(), key=lambda k: k['user']) ...
[ "def", "config_acl", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_repository_config_acl", "(", "args", ".", "namespace", ",", "args", ".", "config", ",", "args", ".", "snapshot_id", ")", "fapi", ".", "_check_response_code", "(", "r", ",", "200", ")...
Retrieve access control list for a method configuration
[ "Retrieve", "access", "control", "list", "for", "a", "method", "configuration" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L602-L608
broadinstitute/fiss
firecloud/fiss.py
config_set_acl
def config_set_acl(args): """ Assign an ACL role to a list of users for a config. """ acl_updates = [{"user": user, "role": args.role} \ for user in set(expand_fc_groups(args.users)) \ if user != fapi.whoami()] id = args.snapshot_id if not id: # get the lat...
python
def config_set_acl(args): """ Assign an ACL role to a list of users for a config. """ acl_updates = [{"user": user, "role": args.role} \ for user in set(expand_fc_groups(args.users)) \ if user != fapi.whoami()] id = args.snapshot_id if not id: # get the lat...
[ "def", "config_set_acl", "(", "args", ")", ":", "acl_updates", "=", "[", "{", "\"user\"", ":", "user", ",", "\"role\"", ":", "args", ".", "role", "}", "for", "user", "in", "set", "(", "expand_fc_groups", "(", "args", ".", "users", ")", ")", "if", "us...
Assign an ACL role to a list of users for a config.
[ "Assign", "an", "ACL", "role", "to", "a", "list", "of", "users", "for", "a", "config", "." ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L611-L638
broadinstitute/fiss
firecloud/fiss.py
config_get
def config_get(args): """ Retrieve a method config from a workspace, send stdout """ r = fapi.get_workspace_config(args.project, args.workspace, args.namespace, args.config) fapi._check_response_code(r, 200) # Setting ensure_ascii to False ensures unicode string r...
python
def config_get(args): """ Retrieve a method config from a workspace, send stdout """ r = fapi.get_workspace_config(args.project, args.workspace, args.namespace, args.config) fapi._check_response_code(r, 200) # Setting ensure_ascii to False ensures unicode string r...
[ "def", "config_get", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_workspace_config", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "namespace", ",", "args", ".", "config", ")", "fapi", ".", "_check_response_code", "(...
Retrieve a method config from a workspace, send stdout
[ "Retrieve", "a", "method", "config", "from", "a", "workspace", "send", "stdout" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L641-L648
broadinstitute/fiss
firecloud/fiss.py
config_wdl
def config_wdl(args): """ Retrieve the WDL for a method config in a workspace, send stdout """ r = fapi.get_workspace_config(args.project, args.workspace, args.namespace, args.config) fapi._check_response_code(r, 200) method = r.json()["methodRepoMethod"] args....
python
def config_wdl(args): """ Retrieve the WDL for a method config in a workspace, send stdout """ r = fapi.get_workspace_config(args.project, args.workspace, args.namespace, args.config) fapi._check_response_code(r, 200) method = r.json()["methodRepoMethod"] args....
[ "def", "config_wdl", "(", "args", ")", ":", "r", "=", "fapi", ".", "get_workspace_config", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "namespace", ",", "args", ".", "config", ")", "fapi", ".", "_check_response_code", "(...
Retrieve the WDL for a method config in a workspace, send stdout
[ "Retrieve", "the", "WDL", "for", "a", "method", "config", "in", "a", "workspace", "send", "stdout" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L651-L662
broadinstitute/fiss
firecloud/fiss.py
config_diff
def config_diff(args): """Compare method configuration definitions across workspaces. Ignores methodConfigVersion if the verbose argument is not set""" config_1 = config_get(args).splitlines() args.project = args.Project args.workspace = args.Workspace cfg_1_name = args.config if args.Con...
python
def config_diff(args): """Compare method configuration definitions across workspaces. Ignores methodConfigVersion if the verbose argument is not set""" config_1 = config_get(args).splitlines() args.project = args.Project args.workspace = args.Workspace cfg_1_name = args.config if args.Con...
[ "def", "config_diff", "(", "args", ")", ":", "config_1", "=", "config_get", "(", "args", ")", ".", "splitlines", "(", ")", "args", ".", "project", "=", "args", ".", "Project", "args", ".", "workspace", "=", "args", ".", "Workspace", "cfg_1_name", "=", ...
Compare method configuration definitions across workspaces. Ignores methodConfigVersion if the verbose argument is not set
[ "Compare", "method", "configuration", "definitions", "across", "workspaces", ".", "Ignores", "methodConfigVersion", "if", "the", "verbose", "argument", "is", "not", "set" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L665-L680
broadinstitute/fiss
firecloud/fiss.py
config_put
def config_put(args): '''Install a valid method configuration into a workspace, in one of several ways: from a JSON file containing a config definition (both file names and objects are supported); as a string representing the content of such a JSON file; or as a dict generated from such JSON co...
python
def config_put(args): '''Install a valid method configuration into a workspace, in one of several ways: from a JSON file containing a config definition (both file names and objects are supported); as a string representing the content of such a JSON file; or as a dict generated from such JSON co...
[ "def", "config_put", "(", "args", ")", ":", "config", "=", "args", ".", "config", "if", "os", ".", "path", ".", "isfile", "(", "config", ")", ":", "with", "open", "(", "config", ",", "'r'", ")", "as", "fp", ":", "config", "=", "json", ".", "loads...
Install a valid method configuration into a workspace, in one of several ways: from a JSON file containing a config definition (both file names and objects are supported); as a string representing the content of such a JSON file; or as a dict generated from such JSON content, e.g via json.lo...
[ "Install", "a", "valid", "method", "configuration", "into", "a", "workspace", "in", "one", "of", "several", "ways", ":", "from", "a", "JSON", "file", "containing", "a", "config", "definition", "(", "both", "file", "names", "and", "objects", "are", "supported...
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L686-L708
broadinstitute/fiss
firecloud/fiss.py
config_new
def config_new(args): '''Attempt to install a new method config into a workspace, by: generating a template from a versioned method in the methods repo, then launching a local editor (respecting the $EDITOR environment variable) to fill in the incomplete input/output fields. Returns True if th...
python
def config_new(args): '''Attempt to install a new method config into a workspace, by: generating a template from a versioned method in the methods repo, then launching a local editor (respecting the $EDITOR environment variable) to fill in the incomplete input/output fields. Returns True if th...
[ "def", "config_new", "(", "args", ")", ":", "cfg", "=", "config_template", "(", "args", ")", "# Iteratively try to edit/install the config: exit iteration by EITHER", "# Successful config_put() after editing", "# Leaving config unchanged in editor, e.g. quitting out of VI with :q", ...
Attempt to install a new method config into a workspace, by: generating a template from a versioned method in the methods repo, then launching a local editor (respecting the $EDITOR environment variable) to fill in the incomplete input/output fields. Returns True if the config was successfu...
[ "Attempt", "to", "install", "a", "new", "method", "config", "into", "a", "workspace", "by", ":", "generating", "a", "template", "from", "a", "versioned", "method", "in", "the", "methods", "repo", "then", "launching", "a", "local", "editor", "(", "respecting"...
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L737-L765
broadinstitute/fiss
firecloud/fiss.py
config_delete
def config_delete(args): """ Remove a method config from a workspace """ r = fapi.delete_workspace_config(args.project, args.workspace, args.namespace, args.config) fapi._check_response_code(r, [200,204]) return r.text if r.text else None
python
def config_delete(args): """ Remove a method config from a workspace """ r = fapi.delete_workspace_config(args.project, args.workspace, args.namespace, args.config) fapi._check_response_code(r, [200,204]) return r.text if r.text else None
[ "def", "config_delete", "(", "args", ")", ":", "r", "=", "fapi", ".", "delete_workspace_config", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "namespace", ",", "args", ".", "config", ")", "fapi", ".", "_check_response_code"...
Remove a method config from a workspace
[ "Remove", "a", "method", "config", "from", "a", "workspace" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L768-L773
broadinstitute/fiss
firecloud/fiss.py
config_copy
def config_copy(args): """ Copy a method config to new name/space/namespace/project (or all 4) """ if not (args.tospace or args.toname or args.toproject or args.tonamespace): raise RuntimeError('A new config name OR workspace OR project OR ' + 'namespace must be given (or all)...
python
def config_copy(args): """ Copy a method config to new name/space/namespace/project (or all 4) """ if not (args.tospace or args.toname or args.toproject or args.tonamespace): raise RuntimeError('A new config name OR workspace OR project OR ' + 'namespace must be given (or all)...
[ "def", "config_copy", "(", "args", ")", ":", "if", "not", "(", "args", ".", "tospace", "or", "args", ".", "toname", "or", "args", ".", "toproject", "or", "args", ".", "tonamespace", ")", ":", "raise", "RuntimeError", "(", "'A new config name OR workspace OR ...
Copy a method config to new name/space/namespace/project (or all 4)
[ "Copy", "a", "method", "config", "to", "new", "name", "/", "space", "/", "namespace", "/", "project", "(", "or", "all", "4", ")" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L776-L812
broadinstitute/fiss
firecloud/fiss.py
attr_get
def attr_get(args): '''Return a dict of attribute name/value pairs: if entity name & type are specified then attributes will be retrieved from that entity, otherwise workspace-level attributes will be returned. By default all attributes attached to the given object will be returned, but a subset ca...
python
def attr_get(args): '''Return a dict of attribute name/value pairs: if entity name & type are specified then attributes will be retrieved from that entity, otherwise workspace-level attributes will be returned. By default all attributes attached to the given object will be returned, but a subset ca...
[ "def", "attr_get", "(", "args", ")", ":", "if", "args", ".", "entity_type", "and", "args", ".", "entity", ":", "r", "=", "fapi", ".", "get_entity", "(", "args", ".", "project", ",", "args", ".", "workspace", ",", "args", ".", "entity_type", ",", "arg...
Return a dict of attribute name/value pairs: if entity name & type are specified then attributes will be retrieved from that entity, otherwise workspace-level attributes will be returned. By default all attributes attached to the given object will be returned, but a subset can be selected by specifying...
[ "Return", "a", "dict", "of", "attribute", "name", "/", "value", "pairs", ":", "if", "entity", "name", "&", "type", "are", "specified", "then", "attributes", "will", "be", "retrieved", "from", "that", "entity", "otherwise", "workspace", "-", "level", "attribu...
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L815-L867
broadinstitute/fiss
firecloud/fiss.py
attr_list
def attr_list(args): '''Retrieve names of all attributes attached to a given object, either an entity (if entity type+name is provided) or workspace (if not)''' args.attributes = None result = attr_get(args) names = result.get("__header__",[]) if names: names = names[1:] else: ...
python
def attr_list(args): '''Retrieve names of all attributes attached to a given object, either an entity (if entity type+name is provided) or workspace (if not)''' args.attributes = None result = attr_get(args) names = result.get("__header__",[]) if names: names = names[1:] else: ...
[ "def", "attr_list", "(", "args", ")", ":", "args", ".", "attributes", "=", "None", "result", "=", "attr_get", "(", "args", ")", "names", "=", "result", ".", "get", "(", "\"__header__\"", ",", "[", "]", ")", "if", "names", ":", "names", "=", "names", ...
Retrieve names of all attributes attached to a given object, either an entity (if entity type+name is provided) or workspace (if not)
[ "Retrieve", "names", "of", "all", "attributes", "attached", "to", "a", "given", "object", "either", "an", "entity", "(", "if", "entity", "type", "+", "name", "is", "provided", ")", "or", "workspace", "(", "if", "not", ")" ]
train
https://github.com/broadinstitute/fiss/blob/dddf91547479506dbbafb69ec84d44dcc4a94ab4/firecloud/fiss.py#L870-L880