repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxjob.py
DXJob.add_tags
def add_tags(self, tags, **kwargs): """ :param tags: Tags to add to the job :type tags: list of strings Adds each of the specified tags to the job. Takes no action for tags that are already listed for the job. """ dxpy.api.job_add_tags(self._dxid, {"tags": tags...
python
def add_tags(self, tags, **kwargs): """ :param tags: Tags to add to the job :type tags: list of strings Adds each of the specified tags to the job. Takes no action for tags that are already listed for the job. """ dxpy.api.job_add_tags(self._dxid, {"tags": tags...
[ "def", "add_tags", "(", "self", ",", "tags", ",", "*", "*", "kwargs", ")", ":", "dxpy", ".", "api", ".", "job_add_tags", "(", "self", ".", "_dxid", ",", "{", "\"tags\"", ":", "tags", "}", ",", "*", "*", "kwargs", ")" ]
:param tags: Tags to add to the job :type tags: list of strings Adds each of the specified tags to the job. Takes no action for tags that are already listed for the job.
[ ":", "param", "tags", ":", "Tags", "to", "add", "to", "the", "job", ":", "type", "tags", ":", "list", "of", "strings" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxjob.py#L221-L231
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxjob.py
DXJob.remove_tags
def remove_tags(self, tags, **kwargs): """ :param tags: Tags to remove from the job :type tags: list of strings Removes each of the specified tags from the job. Takes no action for tags that the job does not currently have. """ dxpy.api.job_remove_tags(self._dx...
python
def remove_tags(self, tags, **kwargs): """ :param tags: Tags to remove from the job :type tags: list of strings Removes each of the specified tags from the job. Takes no action for tags that the job does not currently have. """ dxpy.api.job_remove_tags(self._dx...
[ "def", "remove_tags", "(", "self", ",", "tags", ",", "*", "*", "kwargs", ")", ":", "dxpy", ".", "api", ".", "job_remove_tags", "(", "self", ".", "_dxid", ",", "{", "\"tags\"", ":", "tags", "}", ",", "*", "*", "kwargs", ")" ]
:param tags: Tags to remove from the job :type tags: list of strings Removes each of the specified tags from the job. Takes no action for tags that the job does not currently have.
[ ":", "param", "tags", ":", "Tags", "to", "remove", "from", "the", "job", ":", "type", "tags", ":", "list", "of", "strings" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxjob.py#L233-L243
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxjob.py
DXJob.set_properties
def set_properties(self, properties, **kwargs): """ :param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the job for the given ...
python
def set_properties(self, properties, **kwargs): """ :param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the job for the given ...
[ "def", "set_properties", "(", "self", ",", "properties", ",", "*", "*", "kwargs", ")", ":", "dxpy", ".", "api", ".", "job_set_properties", "(", "self", ".", "_dxid", ",", "{", "\"properties\"", ":", "properties", "}", ",", "*", "*", "kwargs", ")" ]
:param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the job for the given property names. Any property with a value of :const:`None` ...
[ ":", "param", "properties", ":", "Property", "names", "and", "values", "given", "as", "key", "-", "value", "pairs", "of", "strings", ":", "type", "properties", ":", "dict" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxjob.py#L245-L260
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxjob.py
DXJob.wait_on_done
def wait_on_done(self, interval=2, timeout=3600*24*7, **kwargs): ''' :param interval: Number of seconds between queries to the job's state :type interval: integer :param timeout: Maximum amount of time to wait, in seconds, until the job is done running :type timeout: integer ...
python
def wait_on_done(self, interval=2, timeout=3600*24*7, **kwargs): ''' :param interval: Number of seconds between queries to the job's state :type interval: integer :param timeout: Maximum amount of time to wait, in seconds, until the job is done running :type timeout: integer ...
[ "def", "wait_on_done", "(", "self", ",", "interval", "=", "2", ",", "timeout", "=", "3600", "*", "24", "*", "7", ",", "*", "*", "kwargs", ")", ":", "elapsed", "=", "0", "while", "True", ":", "state", "=", "self", ".", "_get_state", "(", "*", "*",...
:param interval: Number of seconds between queries to the job's state :type interval: integer :param timeout: Maximum amount of time to wait, in seconds, until the job is done running :type timeout: integer :raises: :exc:`~dxpy.exceptions.DXError` if the timeout is reached before the job...
[ ":", "param", "interval", ":", "Number", "of", "seconds", "between", "queries", "to", "the", "job", "s", "state", ":", "type", "interval", ":", "integer", ":", "param", "timeout", ":", "Maximum", "amount", "of", "time", "to", "wait", "in", "seconds", "un...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxjob.py#L262-L291
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxjob.py
DXJob._get_state
def _get_state(self, **kwargs): ''' :returns: State of the remote object :rtype: string Queries the API server for the job's state. Note that this function is shorthand for: dxjob.describe(io=False, **kwargs)["state"] ''' return self.describe(fiel...
python
def _get_state(self, **kwargs): ''' :returns: State of the remote object :rtype: string Queries the API server for the job's state. Note that this function is shorthand for: dxjob.describe(io=False, **kwargs)["state"] ''' return self.describe(fiel...
[ "def", "_get_state", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "describe", "(", "fields", "=", "dict", "(", "state", "=", "True", ")", ",", "*", "*", "kwargs", ")", "[", "\"state\"", "]" ]
:returns: State of the remote object :rtype: string Queries the API server for the job's state. Note that this function is shorthand for: dxjob.describe(io=False, **kwargs)["state"]
[ ":", "returns", ":", "State", "of", "the", "remote", "object", ":", "rtype", ":", "string" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxjob.py#L330-L343
dnanexus/dx-toolkit
src/python/dxpy/cli/org.py
get_user_id
def get_user_id(user_id_or_username): """Gets the user ID based on the value `user_id_or_username` specified on the command-line, being extra lenient and lowercasing the value in all cases. """ user_id_or_username = user_id_or_username.lower() if not user_id_or_username.startswith("user-"): ...
python
def get_user_id(user_id_or_username): """Gets the user ID based on the value `user_id_or_username` specified on the command-line, being extra lenient and lowercasing the value in all cases. """ user_id_or_username = user_id_or_username.lower() if not user_id_or_username.startswith("user-"): ...
[ "def", "get_user_id", "(", "user_id_or_username", ")", ":", "user_id_or_username", "=", "user_id_or_username", ".", "lower", "(", ")", "if", "not", "user_id_or_username", ".", "startswith", "(", "\"user-\"", ")", ":", "user_id", "=", "\"user-\"", "+", "user_id_or_...
Gets the user ID based on the value `user_id_or_username` specified on the command-line, being extra lenient and lowercasing the value in all cases.
[ "Gets", "the", "user", "ID", "based", "on", "the", "value", "user_id_or_username", "specified", "on", "the", "command", "-", "line", "being", "extra", "lenient", "and", "lowercasing", "the", "value", "in", "all", "cases", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/cli/org.py#L32-L42
dnanexus/dx-toolkit
src/python/dxpy/cli/org.py
get_org_invite_args
def get_org_invite_args(user_id, args): """ Used by: - `dx new user` - `dx add member` PRECONDITION: - If /org-x/invite is being called in conjunction with /user/new, then `_validate_new_user_input()` has been called on `args`; otherwise, the parser must perform ...
python
def get_org_invite_args(user_id, args): """ Used by: - `dx new user` - `dx add member` PRECONDITION: - If /org-x/invite is being called in conjunction with /user/new, then `_validate_new_user_input()` has been called on `args`; otherwise, the parser must perform ...
[ "def", "get_org_invite_args", "(", "user_id", ",", "args", ")", ":", "org_invite_args", "=", "{", "\"invitee\"", ":", "user_id", "}", "org_invite_args", "[", "\"level\"", "]", "=", "args", ".", "level", "if", "\"set_bill_to\"", "in", "args", "and", "args", "...
Used by: - `dx new user` - `dx add member` PRECONDITION: - If /org-x/invite is being called in conjunction with /user/new, then `_validate_new_user_input()` has been called on `args`; otherwise, the parser must perform all the basic input validation.
[ "Used", "by", ":", "-", "dx", "new", "user", "-", "dx", "add", "member" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/cli/org.py#L45-L66
dnanexus/dx-toolkit
src/python/dxpy/scripts/dx.py
_get_user_new_args
def _get_user_new_args(args): """ PRECONDITION: `_validate_new_user_input()` has been called on `args`. """ user_new_args = {"username": args.username, "email": args.email} if args.first is not None: user_new_args["first"] = args.first if args.last is not None: ...
python
def _get_user_new_args(args): """ PRECONDITION: `_validate_new_user_input()` has been called on `args`. """ user_new_args = {"username": args.username, "email": args.email} if args.first is not None: user_new_args["first"] = args.first if args.last is not None: ...
[ "def", "_get_user_new_args", "(", "args", ")", ":", "user_new_args", "=", "{", "\"username\"", ":", "args", ".", "username", ",", "\"email\"", ":", "args", ".", "email", "}", "if", "args", ".", "first", "is", "not", "None", ":", "user_new_args", "[", "\"...
PRECONDITION: `_validate_new_user_input()` has been called on `args`.
[ "PRECONDITION", ":", "_validate_new_user_input", "()", "has", "been", "called", "on", "args", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/scripts/dx.py#L1332-L1354
dnanexus/dx-toolkit
src/python/dxpy/scripts/dx.py
_get_input_for_run
def _get_input_for_run(args, executable, preset_inputs=None, input_name_prefix=None): """ Returns an input dictionary that can be passed to executable.run() """ # The following may throw if the executable is a workflow with no # input spec available (because a stage is inaccessible) exec_inputs ...
python
def _get_input_for_run(args, executable, preset_inputs=None, input_name_prefix=None): """ Returns an input dictionary that can be passed to executable.run() """ # The following may throw if the executable is a workflow with no # input spec available (because a stage is inaccessible) exec_inputs ...
[ "def", "_get_input_for_run", "(", "args", ",", "executable", ",", "preset_inputs", "=", "None", ",", "input_name_prefix", "=", "None", ")", ":", "# The following may throw if the executable is a workflow with no", "# input spec available (because a stage is inaccessible)", "exec_...
Returns an input dictionary that can be passed to executable.run()
[ "Returns", "an", "input", "dictionary", "that", "can", "be", "passed", "to", "executable", ".", "run", "()" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/scripts/dx.py#L2683-L2709
dnanexus/dx-toolkit
src/python/dxpy/scripts/dx.py
register_parser
def register_parser(parser, subparsers_action=None, categories=('other', ), add_help=True): """Attaches `parser` to the global ``parser_map``. If `add_help` is truthy, then adds the helpstring of `parser` into the output of ``dx help...``, for each category in `categories`. :param subparsers_action: A ...
python
def register_parser(parser, subparsers_action=None, categories=('other', ), add_help=True): """Attaches `parser` to the global ``parser_map``. If `add_help` is truthy, then adds the helpstring of `parser` into the output of ``dx help...``, for each category in `categories`. :param subparsers_action: A ...
[ "def", "register_parser", "(", "parser", ",", "subparsers_action", "=", "None", ",", "categories", "=", "(", "'other'", ",", ")", ",", "add_help", "=", "True", ")", ":", "name", "=", "re", ".", "sub", "(", "'^dx '", ",", "''", ",", "parser", ".", "pr...
Attaches `parser` to the global ``parser_map``. If `add_help` is truthy, then adds the helpstring of `parser` into the output of ``dx help...``, for each category in `categories`. :param subparsers_action: A special action object that is returned by ``ArgumentParser.add_subparsers(...)``, or None. ...
[ "Attaches", "parser", "to", "the", "global", "parser_map", ".", "If", "add_help", "is", "truthy", "then", "adds", "the", "helpstring", "of", "parser", "into", "the", "output", "of", "dx", "help", "...", "for", "each", "category", "in", "categories", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/scripts/dx.py#L3805-L3825
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
_is_retryable_exception
def _is_retryable_exception(e): """Returns True if the exception is always safe to retry. This is True if the client was never able to establish a connection to the server (for example, name resolution failed or the connection could otherwise not be initialized). Conservatively, if we can't tell w...
python
def _is_retryable_exception(e): """Returns True if the exception is always safe to retry. This is True if the client was never able to establish a connection to the server (for example, name resolution failed or the connection could otherwise not be initialized). Conservatively, if we can't tell w...
[ "def", "_is_retryable_exception", "(", "e", ")", ":", "if", "isinstance", "(", "e", ",", "urllib3", ".", "exceptions", ".", "ProtocolError", ")", ":", "e", "=", "e", ".", "args", "[", "1", "]", "if", "isinstance", "(", "e", ",", "(", "socket", ".", ...
Returns True if the exception is always safe to retry. This is True if the client was never able to establish a connection to the server (for example, name resolution failed or the connection could otherwise not be initialized). Conservatively, if we can't tell whether a network connection could h...
[ "Returns", "True", "if", "the", "exception", "is", "always", "safe", "to", "retry", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L326-L345
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
_extract_msg_from_last_exception
def _extract_msg_from_last_exception(): ''' Extract a useful error message from the last thrown exception ''' last_exc_type, last_error, last_traceback = sys.exc_info() if isinstance(last_error, exceptions.DXAPIError): # Using the same code path as below would not # produce a useful message ...
python
def _extract_msg_from_last_exception(): ''' Extract a useful error message from the last thrown exception ''' last_exc_type, last_error, last_traceback = sys.exc_info() if isinstance(last_error, exceptions.DXAPIError): # Using the same code path as below would not # produce a useful message ...
[ "def", "_extract_msg_from_last_exception", "(", ")", ":", "last_exc_type", ",", "last_error", ",", "last_traceback", "=", "sys", ".", "exc_info", "(", ")", "if", "isinstance", "(", "last_error", ",", "exceptions", ".", "DXAPIError", ")", ":", "# Using the same cod...
Extract a useful error message from the last thrown exception
[ "Extract", "a", "useful", "error", "message", "from", "the", "last", "thrown", "exception" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L347-L357
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
_calculate_retry_delay
def _calculate_retry_delay(response, num_attempts): ''' Returns the time in seconds that we should wait. :param num_attempts: number of attempts that have been made to the resource, including the most recent failed one :type num_attempts: int ''' if response is not None and response.sta...
python
def _calculate_retry_delay(response, num_attempts): ''' Returns the time in seconds that we should wait. :param num_attempts: number of attempts that have been made to the resource, including the most recent failed one :type num_attempts: int ''' if response is not None and response.sta...
[ "def", "_calculate_retry_delay", "(", "response", ",", "num_attempts", ")", ":", "if", "response", "is", "not", "None", "and", "response", ".", "status", "==", "503", "and", "'retry-after'", "in", "response", ".", "headers", ":", "try", ":", "return", "int",...
Returns the time in seconds that we should wait. :param num_attempts: number of attempts that have been made to the resource, including the most recent failed one :type num_attempts: int
[ "Returns", "the", "time", "in", "seconds", "that", "we", "should", "wait", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L360-L379
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
DXHTTPRequest
def DXHTTPRequest(resource, data, method='POST', headers=None, auth=True, timeout=DEFAULT_TIMEOUT, use_compression=None, jsonify_data=True, want_full_response=False, decode_response_body=True, prepend_srv=True, session_handler=None, max_retries=DEF...
python
def DXHTTPRequest(resource, data, method='POST', headers=None, auth=True, timeout=DEFAULT_TIMEOUT, use_compression=None, jsonify_data=True, want_full_response=False, decode_response_body=True, prepend_srv=True, session_handler=None, max_retries=DEF...
[ "def", "DXHTTPRequest", "(", "resource", ",", "data", ",", "method", "=", "'POST'", ",", "headers", "=", "None", ",", "auth", "=", "True", ",", "timeout", "=", "DEFAULT_TIMEOUT", ",", "use_compression", "=", "None", ",", "jsonify_data", "=", "True", ",", ...
:param resource: API server route, e.g. "/record/new". If *prepend_srv* is False, a fully qualified URL is expected. If this argument is a callable, it will be called just before each request attempt, and expected to return a tuple (URL, headers). Headers returned by the callback are updated with *headers* (including h...
[ ":", "param", "resource", ":", "API", "server", "route", "e", ".", "g", ".", "/", "record", "/", "new", ".", "If", "*", "prepend_srv", "*", "is", "False", "a", "fully", "qualified", "URL", "is", "expected", ".", "If", "this", "argument", "is", "a", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L487-L820
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
set_api_server_info
def set_api_server_info(host=None, port=None, protocol=None): ''' :param host: API server hostname :type host: string :param port: API server port. If not specified, *port* is guessed based on *protocol*. :type port: string :param protocol: Either "http" or "https" :type protocol: string ...
python
def set_api_server_info(host=None, port=None, protocol=None): ''' :param host: API server hostname :type host: string :param port: API server port. If not specified, *port* is guessed based on *protocol*. :type port: string :param protocol: Either "http" or "https" :type protocol: string ...
[ "def", "set_api_server_info", "(", "host", "=", "None", ",", "port", "=", "None", ",", "protocol", "=", "None", ")", ":", "global", "APISERVER_PROTOCOL", ",", "APISERVER_HOST", ",", "APISERVER_PORT", ",", "APISERVER", "if", "host", "is", "not", "None", ":", ...
:param host: API server hostname :type host: string :param port: API server port. If not specified, *port* is guessed based on *protocol*. :type port: string :param protocol: Either "http" or "https" :type protocol: string Overrides the current settings for which API server to communicate w...
[ ":", "param", "host", ":", "API", "server", "hostname", ":", "type", "host", ":", "string", ":", "param", "port", ":", "API", "server", "port", ".", "If", "not", "specified", "*", "port", "*", "is", "guessed", "based", "on", "*", "protocol", "*", "."...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L878-L901
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
get_auth_server_name
def get_auth_server_name(host_override=None, port_override=None, protocol='https'): """ Chooses the auth server name from the currently configured API server name. Raises DXError if the auth server name cannot be guessed and the overrides are not provided (or improperly provided). """ if host_o...
python
def get_auth_server_name(host_override=None, port_override=None, protocol='https'): """ Chooses the auth server name from the currently configured API server name. Raises DXError if the auth server name cannot be guessed and the overrides are not provided (or improperly provided). """ if host_o...
[ "def", "get_auth_server_name", "(", "host_override", "=", "None", ",", "port_override", "=", "None", ",", "protocol", "=", "'https'", ")", ":", "if", "host_override", "is", "not", "None", "or", "port_override", "is", "not", "None", ":", "if", "host_override", ...
Chooses the auth server name from the currently configured API server name. Raises DXError if the auth server name cannot be guessed and the overrides are not provided (or improperly provided).
[ "Chooses", "the", "auth", "server", "name", "from", "the", "currently", "configured", "API", "server", "name", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L964-L991
dnanexus/dx-toolkit
src/python/dxpy/__init__.py
append_underlying_workflow_describe
def append_underlying_workflow_describe(globalworkflow_desc): """ Adds the "workflowDescribe" field to the config for each region of the global workflow. The value is the description of an underlying workflow in that region. """ if not globalworkflow_desc or \ globalworkflow_desc['cl...
python
def append_underlying_workflow_describe(globalworkflow_desc): """ Adds the "workflowDescribe" field to the config for each region of the global workflow. The value is the description of an underlying workflow in that region. """ if not globalworkflow_desc or \ globalworkflow_desc['cl...
[ "def", "append_underlying_workflow_describe", "(", "globalworkflow_desc", ")", ":", "if", "not", "globalworkflow_desc", "or", "globalworkflow_desc", "[", "'class'", "]", "!=", "'globalworkflow'", "or", "not", "'regionalOptions'", "in", "globalworkflow_desc", ":", "return"...
Adds the "workflowDescribe" field to the config for each region of the global workflow. The value is the description of an underlying workflow in that region.
[ "Adds", "the", "workflowDescribe", "field", "to", "the", "config", "for", "each", "region", "of", "the", "global", "workflow", ".", "The", "value", "is", "the", "description", "of", "an", "underlying", "workflow", "in", "that", "region", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/__init__.py#L1011-L1026
dnanexus/dx-toolkit
src/python/dxpy/cli/exec_io.py
_construct_jbor
def _construct_jbor(job_id, field_name_and_maybe_index): ''' :param job_id: Job ID :type job_id: string :param field_name_and_maybe_index: Field name, plus possibly ".N" where N is an array index :type field_name_and_maybe_index: string :returns: dict of JBOR ''' link = {"$dnanexus_link"...
python
def _construct_jbor(job_id, field_name_and_maybe_index): ''' :param job_id: Job ID :type job_id: string :param field_name_and_maybe_index: Field name, plus possibly ".N" where N is an array index :type field_name_and_maybe_index: string :returns: dict of JBOR ''' link = {"$dnanexus_link"...
[ "def", "_construct_jbor", "(", "job_id", ",", "field_name_and_maybe_index", ")", ":", "link", "=", "{", "\"$dnanexus_link\"", ":", "{", "\"job\"", ":", "job_id", "}", "}", "if", "'.'", "in", "field_name_and_maybe_index", ":", "split_by_dot", "=", "field_name_and_m...
:param job_id: Job ID :type job_id: string :param field_name_and_maybe_index: Field name, plus possibly ".N" where N is an array index :type field_name_and_maybe_index: string :returns: dict of JBOR
[ ":", "param", "job_id", ":", "Job", "ID", ":", "type", "job_id", ":", "string", ":", "param", "field_name_and_maybe_index", ":", "Field", "name", "plus", "possibly", ".", "N", "where", "N", "is", "an", "array", "index", ":", "type", "field_name_and_maybe_ind...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/cli/exec_io.py#L78-L93
dnanexus/dx-toolkit
src/python/dxpy/cli/exec_io.py
ExecutableInputs.update
def update(self, new_inputs, strip_prefix=True): """ Updates the inputs dictionary with the key/value pairs from new_inputs, overwriting existing keys. """ if strip_prefix and self.input_name_prefix is not None: for i in new_inputs: if i.startswith(self.input_...
python
def update(self, new_inputs, strip_prefix=True): """ Updates the inputs dictionary with the key/value pairs from new_inputs, overwriting existing keys. """ if strip_prefix and self.input_name_prefix is not None: for i in new_inputs: if i.startswith(self.input_...
[ "def", "update", "(", "self", ",", "new_inputs", ",", "strip_prefix", "=", "True", ")", ":", "if", "strip_prefix", "and", "self", ".", "input_name_prefix", "is", "not", "None", ":", "for", "i", "in", "new_inputs", ":", "if", "i", ".", "startswith", "(", ...
Updates the inputs dictionary with the key/value pairs from new_inputs, overwriting existing keys.
[ "Updates", "the", "inputs", "dictionary", "with", "the", "key", "/", "value", "pairs", "from", "new_inputs", "overwriting", "existing", "keys", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/cli/exec_io.py#L486-L495
dnanexus/dx-toolkit
src/python/dxpy/cli/exec_io.py
ExecutableInputs._update_requires_resolution_inputs
def _update_requires_resolution_inputs(self): """ Updates self.inputs with resolved input values (the input values that were provided as paths to items that require resolutions, eg. folder or job/analyses ids) """ input_paths = [quad[1] for quad in self.requires_resolution] ...
python
def _update_requires_resolution_inputs(self): """ Updates self.inputs with resolved input values (the input values that were provided as paths to items that require resolutions, eg. folder or job/analyses ids) """ input_paths = [quad[1] for quad in self.requires_resolution] ...
[ "def", "_update_requires_resolution_inputs", "(", "self", ")", ":", "input_paths", "=", "[", "quad", "[", "1", "]", "for", "quad", "in", "self", ".", "requires_resolution", "]", "results", "=", "resolve_multiple_existing_paths", "(", "input_paths", ")", "for", "...
Updates self.inputs with resolved input values (the input values that were provided as paths to items that require resolutions, eg. folder or job/analyses ids)
[ "Updates", "self", ".", "inputs", "with", "resolved", "input", "values", "(", "the", "input", "values", "that", "were", "provided", "as", "paths", "to", "items", "that", "require", "resolutions", "eg", ".", "folder", "or", "job", "/", "analyses", "ids", ")...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/cli/exec_io.py#L497-L559
dnanexus/dx-toolkit
src/python/dxpy/utils/pretty_print.py
escape_unicode_string
def escape_unicode_string(u): """ Escapes the nonprintable chars 0-31 and 127, and backslash; preferably with a friendly equivalent such as '\n' if available, but otherwise with a Python-style backslashed hex escape. """ def replacer(matchobj): if ord(matchobj.group(1)) == 127: ...
python
def escape_unicode_string(u): """ Escapes the nonprintable chars 0-31 and 127, and backslash; preferably with a friendly equivalent such as '\n' if available, but otherwise with a Python-style backslashed hex escape. """ def replacer(matchobj): if ord(matchobj.group(1)) == 127: ...
[ "def", "escape_unicode_string", "(", "u", ")", ":", "def", "replacer", "(", "matchobj", ")", ":", "if", "ord", "(", "matchobj", ".", "group", "(", "1", ")", ")", "==", "127", ":", "return", "\"\\\\x7f\"", "if", "ord", "(", "matchobj", ".", "group", "...
Escapes the nonprintable chars 0-31 and 127, and backslash; preferably with a friendly equivalent such as '\n' if available, but otherwise with a Python-style backslashed hex escape.
[ "Escapes", "the", "nonprintable", "chars", "0", "-", "31", "and", "127", "and", "backslash", ";", "preferably", "with", "a", "friendly", "equivalent", "such", "as", "\\", "n", "if", "available", "but", "otherwise", "with", "a", "Python", "-", "style", "bac...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/pretty_print.py#L61-L73
dnanexus/dx-toolkit
src/python/dxpy/utils/pretty_print.py
format_tree
def format_tree(tree, root=None): ''' Tree pretty printer. Expects trees to be given as mappings (dictionaries). Keys will be printed; values will be traversed if they are mappings. To preserve order, use collections.OrderedDict. Example: print format_tree(collections.OrderedDict({'foo': 0, 'b...
python
def format_tree(tree, root=None): ''' Tree pretty printer. Expects trees to be given as mappings (dictionaries). Keys will be printed; values will be traversed if they are mappings. To preserve order, use collections.OrderedDict. Example: print format_tree(collections.OrderedDict({'foo': 0, 'b...
[ "def", "format_tree", "(", "tree", ",", "root", "=", "None", ")", ":", "formatted_tree", "=", "[", "root", "]", "if", "root", "is", "not", "None", "else", "[", "]", "def", "_format", "(", "tree", ",", "prefix", "=", "' '", ")", ":", "nodes", "="...
Tree pretty printer. Expects trees to be given as mappings (dictionaries). Keys will be printed; values will be traversed if they are mappings. To preserve order, use collections.OrderedDict. Example: print format_tree(collections.OrderedDict({'foo': 0, 'bar': {'xyz': 0}}))
[ "Tree", "pretty", "printer", ".", "Expects", "trees", "to", "be", "given", "as", "mappings", "(", "dictionaries", ")", ".", "Keys", "will", "be", "printed", ";", "values", "will", "be", "traversed", "if", "they", "are", "mappings", ".", "To", "preserve", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/pretty_print.py#L75-L110
dnanexus/dx-toolkit
src/python/dxpy/utils/pretty_print.py
format_table
def format_table(table, column_names=None, column_specs=None, max_col_width=32, report_dimensions=False): ''' Table pretty printer. Expects tables to be given as arrays of arrays. Example: print format_table([[1, "2"], [3, "456"]], column_names=['A', 'B']) ''' if len(tabl...
python
def format_table(table, column_names=None, column_specs=None, max_col_width=32, report_dimensions=False): ''' Table pretty printer. Expects tables to be given as arrays of arrays. Example: print format_table([[1, "2"], [3, "456"]], column_names=['A', 'B']) ''' if len(tabl...
[ "def", "format_table", "(", "table", ",", "column_names", "=", "None", ",", "column_specs", "=", "None", ",", "max_col_width", "=", "32", ",", "report_dimensions", "=", "False", ")", ":", "if", "len", "(", "table", ")", ">", "0", ":", "col_widths", "=", ...
Table pretty printer. Expects tables to be given as arrays of arrays. Example: print format_table([[1, "2"], [3, "456"]], column_names=['A', 'B'])
[ "Table", "pretty", "printer", ".", "Expects", "tables", "to", "be", "given", "as", "arrays", "of", "arrays", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/pretty_print.py#L112-L182
dnanexus/dx-toolkit
src/python/dxpy/utils/pretty_print.py
flatten_json_array
def flatten_json_array(json_string, array_name): """ Flattens all arrays with the same name in the JSON string :param json_string: JSON string :type json_string: str :param array_name: Array name to flatten :type array_name: str """ result = re.sub('"{}": \\[\r?\n\\s*'.format(array_nam...
python
def flatten_json_array(json_string, array_name): """ Flattens all arrays with the same name in the JSON string :param json_string: JSON string :type json_string: str :param array_name: Array name to flatten :type array_name: str """ result = re.sub('"{}": \\[\r?\n\\s*'.format(array_nam...
[ "def", "flatten_json_array", "(", "json_string", ",", "array_name", ")", ":", "result", "=", "re", ".", "sub", "(", "'\"{}\": \\\\[\\r?\\n\\\\s*'", ".", "format", "(", "array_name", ")", ",", "'\"{}\": ['", ".", "format", "(", "array_name", ")", ",", "json_str...
Flattens all arrays with the same name in the JSON string :param json_string: JSON string :type json_string: str :param array_name: Array name to flatten :type array_name: str
[ "Flattens", "all", "arrays", "with", "the", "same", "name", "in", "the", "JSON", "string" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/pretty_print.py#L184-L199
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
new_dxworkflow
def new_dxworkflow(title=None, summary=None, description=None, output_folder=None, init_from=None, **kwargs): ''' :param title: Workflow title (optional) :type title: string :param summary: Workflow summary (optional) :type summary: string :param description: Workflow description (optional) ...
python
def new_dxworkflow(title=None, summary=None, description=None, output_folder=None, init_from=None, **kwargs): ''' :param title: Workflow title (optional) :type title: string :param summary: Workflow summary (optional) :type summary: string :param description: Workflow description (optional) ...
[ "def", "new_dxworkflow", "(", "title", "=", "None", ",", "summary", "=", "None", ",", "description", "=", "None", ",", "output_folder", "=", "None", ",", "init_from", "=", "None", ",", "*", "*", "kwargs", ")", ":", "dxworkflow", "=", "DXWorkflow", "(", ...
:param title: Workflow title (optional) :type title: string :param summary: Workflow summary (optional) :type summary: string :param description: Workflow description (optional) :type description: string :param output_folder: Default output folder of the workflow (optional) :type output_fold...
[ ":", "param", "title", ":", "Workflow", "title", "(", "optional", ")", ":", "type", "title", ":", "string", ":", "param", "summary", ":", "Workflow", "summary", "(", "optional", ")", ":", "type", "summary", ":", "string", ":", "param", "description", ":"...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L40-L71
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow._new
def _new(self, dx_hash, **kwargs): """ :param dx_hash: Standard hash populated in :func:`dxpy.bindings.DXDataObject.new()` containing attributes common to all data object classes. :type dx_hash: dict :param title: Workflow title (optional) :type title: string :param summa...
python
def _new(self, dx_hash, **kwargs): """ :param dx_hash: Standard hash populated in :func:`dxpy.bindings.DXDataObject.new()` containing attributes common to all data object classes. :type dx_hash: dict :param title: Workflow title (optional) :type title: string :param summa...
[ "def", "_new", "(", "self", ",", "dx_hash", ",", "*", "*", "kwargs", ")", ":", "def", "_set_dx_hash", "(", "kwargs", ",", "dxhash", ",", "key", ",", "new_key", "=", "None", ")", ":", "new_key", "=", "key", "if", "new_key", "is", "None", "else", "ne...
:param dx_hash: Standard hash populated in :func:`dxpy.bindings.DXDataObject.new()` containing attributes common to all data object classes. :type dx_hash: dict :param title: Workflow title (optional) :type title: string :param summary: Workflow summary (optional) :type summary: ...
[ ":", "param", "dx_hash", ":", "Standard", "hash", "populated", "in", ":", "func", ":", "dxpy", ".", "bindings", ".", "DXDataObject", ".", "new", "()", "containing", "attributes", "common", "to", "all", "data", "object", "classes", ".", ":", "type", "dx_has...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L94-L148
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow._get_stage_id
def _get_stage_id(self, stage): ''' :param stage: A stage ID, name, or index (stage index is the number n for the nth stage, starting from 0; can be provided as an int or a string) :type stage: int or string :returns: The stage ID (this is a no-op if it was already a stage ID) :r...
python
def _get_stage_id(self, stage): ''' :param stage: A stage ID, name, or index (stage index is the number n for the nth stage, starting from 0; can be provided as an int or a string) :type stage: int or string :returns: The stage ID (this is a no-op if it was already a stage ID) :r...
[ "def", "_get_stage_id", "(", "self", ",", "stage", ")", ":", "# first, if it is a string, see if it is an integer", "if", "isinstance", "(", "stage", ",", "basestring", ")", ":", "try", ":", "stage", "=", "int", "(", "stage", ")", "except", ":", "# we'll try par...
:param stage: A stage ID, name, or index (stage index is the number n for the nth stage, starting from 0; can be provided as an int or a string) :type stage: int or string :returns: The stage ID (this is a no-op if it was already a stage ID) :raises: :class:`~dxpy.exceptions.DXError` if *stage* ...
[ ":", "param", "stage", ":", "A", "stage", "ID", "name", "or", "index", "(", "stage", "index", "is", "the", "number", "n", "for", "the", "nth", "stage", "starting", "from", "0", ";", "can", "be", "provided", "as", "an", "int", "or", "a", "string", "...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L156-L196
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.add_stage
def add_stage(self, executable, stage_id=None, name=None, folder=None, stage_input=None, instance_type=None, edit_version=None, **kwargs): ''' :param executable: string or a handler for an app or applet :type executable: string, DXApplet, or DXApp :param stage_id: id fo...
python
def add_stage(self, executable, stage_id=None, name=None, folder=None, stage_input=None, instance_type=None, edit_version=None, **kwargs): ''' :param executable: string or a handler for an app or applet :type executable: string, DXApplet, or DXApp :param stage_id: id fo...
[ "def", "add_stage", "(", "self", ",", "executable", ",", "stage_id", "=", "None", ",", "name", "=", "None", ",", "folder", "=", "None", ",", "stage_input", "=", "None", ",", "instance_type", "=", "None", ",", "edit_version", "=", "None", ",", "*", "*",...
:param executable: string or a handler for an app or applet :type executable: string, DXApplet, or DXApp :param stage_id: id for the stage (optional) :type stage_id: string :param name: name for the stage (optional) :type name: string :param folder: default output folder ...
[ ":", "param", "executable", ":", "string", "or", "a", "handler", "for", "an", "app", "or", "applet", ":", "type", "executable", ":", "string", "DXApplet", "or", "DXApp", ":", "param", "stage_id", ":", "id", "for", "the", "stage", "(", "optional", ")", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L198-L243
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.get_stage
def get_stage(self, stage, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :returns: Hash of stage descriptor in workflow ''' stage_id = self._get_stage_...
python
def get_stage(self, stage, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :returns: Hash of stage descriptor in workflow ''' stage_id = self._get_stage_...
[ "def", "get_stage", "(", "self", ",", "stage", ",", "*", "*", "kwargs", ")", ":", "stage_id", "=", "self", ".", "_get_stage_id", "(", "stage", ")", "result", "=", "next", "(", "(", "stage", "for", "stage", "in", "self", ".", "stages", "if", "stage", ...
:param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :returns: Hash of stage descriptor in workflow
[ ":", "param", "stage", ":", "A", "number", "for", "the", "stage", "index", "(", "for", "the", "nth", "stage", "starting", "from", "0", ")", "or", "a", "string", "of", "the", "stage", "index", "name", "or", "ID", ":", "type", "stage", ":", "int", "o...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L245-L255
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.remove_stage
def remove_stage(self, stage, edit_version=None, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :param edit_version: if provided, the edit version of the workflow that ...
python
def remove_stage(self, stage, edit_version=None, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :param edit_version: if provided, the edit version of the workflow that ...
[ "def", "remove_stage", "(", "self", ",", "stage", ",", "edit_version", "=", "None", ",", "*", "*", "kwargs", ")", ":", "stage_id", "=", "self", ".", "_get_stage_id", "(", "stage", ")", "remove_stage_input", "=", "{", "\"stage\"", ":", "stage_id", "}", "s...
:param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :param edit_version: if provided, the edit version of the workflow that should be modified; if not provided, the current edit version will be used (opti...
[ ":", "param", "stage", ":", "A", "number", "for", "the", "stage", "index", "(", "for", "the", "nth", "stage", "starting", "from", "0", ")", "or", "a", "string", "of", "the", "stage", "index", "name", "or", "ID", ":", "type", "stage", ":", "int", "o...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L257-L275
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.move_stage
def move_stage(self, stage, new_index, edit_version=None, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :param new_index: The new position in the order of stages that ...
python
def move_stage(self, stage, new_index, edit_version=None, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :param new_index: The new position in the order of stages that ...
[ "def", "move_stage", "(", "self", ",", "stage", ",", "new_index", ",", "edit_version", "=", "None", ",", "*", "*", "kwargs", ")", ":", "stage_id", "=", "self", ".", "_get_stage_id", "(", "stage", ")", "move_stage_input", "=", "{", "\"stage\"", ":", "stag...
:param stage: A number for the stage index (for the nth stage, starting from 0), or a string of the stage index, name, or ID :type stage: int or string :param new_index: The new position in the order of stages that the specified stage should have (where 0 indicates the first stage) :type new_ind...
[ ":", "param", "stage", ":", "A", "number", "for", "the", "stage", "index", "(", "for", "the", "nth", "stage", "starting", "from", "0", ")", "or", "a", "string", "of", "the", "stage", "index", "name", "or", "ID", ":", "type", "stage", ":", "int", "o...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L277-L295
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.update
def update(self, title=None, unset_title=False, summary=None, description=None, output_folder=None, unset_output_folder=False, workflow_inputs=None, unset_workflow_inputs=False, workflow_outputs=None, unset_workflow_outputs=False, stages=None, edit_version=Non...
python
def update(self, title=None, unset_title=False, summary=None, description=None, output_folder=None, unset_output_folder=False, workflow_inputs=None, unset_workflow_inputs=False, workflow_outputs=None, unset_workflow_outputs=False, stages=None, edit_version=Non...
[ "def", "update", "(", "self", ",", "title", "=", "None", ",", "unset_title", "=", "False", ",", "summary", "=", "None", ",", "description", "=", "None", ",", "output_folder", "=", "None", ",", "unset_output_folder", "=", "False", ",", "workflow_inputs", "=...
:param title: workflow title to set; cannot be provided with *unset_title* set to True :type title: string :param unset_title: whether to unset the title; cannot be provided with string value for *title* :type unset_title: boolean :param summary: workflow summary to set :type sum...
[ ":", "param", "title", ":", "workflow", "title", "to", "set", ";", "cannot", "be", "provided", "with", "*", "unset_title", "*", "set", "to", "True", ":", "type", "title", ":", "string", ":", "param", "unset_title", ":", "whether", "to", "unset", "the", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L297-L365
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.update_stage
def update_stage(self, stage, executable=None, force=False, name=None, unset_name=False, folder=None, unset_folder=False, stage_input=None, instance_type=None, edit_version=None, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, start...
python
def update_stage(self, stage, executable=None, force=False, name=None, unset_name=False, folder=None, unset_folder=False, stage_input=None, instance_type=None, edit_version=None, **kwargs): ''' :param stage: A number for the stage index (for the nth stage, start...
[ "def", "update_stage", "(", "self", ",", "stage", ",", "executable", "=", "None", ",", "force", "=", "False", ",", "name", "=", "None", ",", "unset_name", "=", "False", ",", "folder", "=", "None", ",", "unset_folder", "=", "False", ",", "stage_input", ...
:param stage: A number for the stage index (for the nth stage, starting from 0), or a string stage index, name, or ID :type stage: int or string :param executable: string or a handler for an app or applet :type executable: string, DXApplet, or DXApp :param force: whether to use *executab...
[ ":", "param", "stage", ":", "A", "number", "for", "the", "stage", "index", "(", "for", "the", "nth", "stage", "starting", "from", "0", ")", "or", "a", "string", "stage", "index", "name", "or", "ID", ":", "type", "stage", ":", "int", "or", "string", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L367-L437
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow._get_input_name
def _get_input_name(self, input_str, region=None, describe_output=None): ''' :param input_str: A string of one of the forms: "<exported input field name>", "<explicit workflow input field name>", "<stage ID>.<input field name>", "<stage index>.<input field name>", "<stage name>.<input field name>" ...
python
def _get_input_name(self, input_str, region=None, describe_output=None): ''' :param input_str: A string of one of the forms: "<exported input field name>", "<explicit workflow input field name>", "<stage ID>.<input field name>", "<stage index>.<input field name>", "<stage name>.<input field name>" ...
[ "def", "_get_input_name", "(", "self", ",", "input_str", ",", "region", "=", "None", ",", "describe_output", "=", "None", ")", ":", "if", "'.'", "in", "input_str", ":", "stage_identifier", ",", "input_name", "=", "input_str", ".", "split", "(", "'.'", ",",...
:param input_str: A string of one of the forms: "<exported input field name>", "<explicit workflow input field name>", "<stage ID>.<input field name>", "<stage index>.<input field name>", "<stage name>.<input field name>" :type input_str: string :returns: If the given form was one of those which uses th...
[ ":", "param", "input_str", ":", "A", "string", "of", "one", "of", "the", "forms", ":", "<exported", "input", "field", "name", ">", "<explicit", "workflow", "input", "field", "name", ">", "<stage", "ID", ">", ".", "<input", "field", "name", ">", "<stage",...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L442-L453
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxworkflow.py
DXWorkflow.run
def run(self, workflow_input, *args, **kwargs): ''' :param workflow_input: Dictionary of the workflow's input arguments; see below for more details :type workflow_input: dict :param instance_type: Instance type on which all stages' jobs will be run, or a dict mapping function names to in...
python
def run(self, workflow_input, *args, **kwargs): ''' :param workflow_input: Dictionary of the workflow's input arguments; see below for more details :type workflow_input: dict :param instance_type: Instance type on which all stages' jobs will be run, or a dict mapping function names to in...
[ "def", "run", "(", "self", ",", "workflow_input", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "DXWorkflow", ",", "self", ")", ".", "run", "(", "workflow_input", ",", "*", "args", ",", "*", "*", "kwargs", ")" ]
:param workflow_input: Dictionary of the workflow's input arguments; see below for more details :type workflow_input: dict :param instance_type: Instance type on which all stages' jobs will be run, or a dict mapping function names to instance types. These may be overridden on a per-stage basis if stage_...
[ ":", "param", "workflow_input", ":", "Dictionary", "of", "the", "workflow", "s", "input", "arguments", ";", "see", "below", "for", "more", "details", ":", "type", "workflow_input", ":", "dict", ":", "param", "instance_type", ":", "Instance", "type", "on", "w...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxworkflow.py#L503-L541
dnanexus/dx-toolkit
src/python/dxpy/utils/completer.py
get_folder_matches
def get_folder_matches(text, delim_pos, dxproj, folderpath): ''' :param text: String to be tab-completed; still in escaped form :type text: string :param delim_pos: index of last unescaped "/" in text :type delim_pos: int :param dxproj: DXProject handler to use :type dxproj: DXProject :p...
python
def get_folder_matches(text, delim_pos, dxproj, folderpath): ''' :param text: String to be tab-completed; still in escaped form :type text: string :param delim_pos: index of last unescaped "/" in text :type delim_pos: int :param dxproj: DXProject handler to use :type dxproj: DXProject :p...
[ "def", "get_folder_matches", "(", "text", ",", "delim_pos", ",", "dxproj", ",", "folderpath", ")", ":", "try", ":", "folders", "=", "dxproj", ".", "list_folder", "(", "folder", "=", "folderpath", ",", "only", "=", "'folders'", ")", "[", "'folders'", "]", ...
:param text: String to be tab-completed; still in escaped form :type text: string :param delim_pos: index of last unescaped "/" in text :type delim_pos: int :param dxproj: DXProject handler to use :type dxproj: DXProject :param folderpath: Unescaped path in which to search for folder matches ...
[ ":", "param", "text", ":", "String", "to", "be", "tab", "-", "completed", ";", "still", "in", "escaped", "form", ":", "type", "text", ":", "string", ":", "param", "delim_pos", ":", "index", "of", "last", "unescaped", "/", "in", "text", ":", "type", "...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/completer.py#L87-L111
dnanexus/dx-toolkit
src/python/dxpy/utils/completer.py
get_data_matches
def get_data_matches(text, delim_pos, dxproj, folderpath, classname=None, typespec=None, visibility=None): ''' :param text: String to be tab-completed; still in escaped form :type text: string :param delim_pos: index of last unescaped "/" or ":" in text :type delim_pos: int ...
python
def get_data_matches(text, delim_pos, dxproj, folderpath, classname=None, typespec=None, visibility=None): ''' :param text: String to be tab-completed; still in escaped form :type text: string :param delim_pos: index of last unescaped "/" or ":" in text :type delim_pos: int ...
[ "def", "get_data_matches", "(", "text", ",", "delim_pos", ",", "dxproj", ",", "folderpath", ",", "classname", "=", "None", ",", "typespec", "=", "None", ",", "visibility", "=", "None", ")", ":", "#unescaped_text = unescape_completion_name_str(text[delim_pos + 1:])", ...
:param text: String to be tab-completed; still in escaped form :type text: string :param delim_pos: index of last unescaped "/" or ":" in text :type delim_pos: int :param dxproj: DXProject handler to use :type dxproj: DXProject :param folderpath: Unescaped path in which to search for data object...
[ ":", "param", "text", ":", "String", "to", "be", "tab", "-", "completed", ";", "still", "in", "escaped", "form", ":", "type", "text", ":", "string", ":", "param", "delim_pos", ":", "index", "of", "last", "unescaped", "/", "or", ":", "in", "text", ":"...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/completer.py#L113-L157
dnanexus/dx-toolkit
src/python/dxpy/utils/completer.py
path_completer
def path_completer(text, expected=None, classes=None, perm_level=None, include_current_proj=False, typespec=None, visibility=None): ''' :param text: String to tab-complete to a path matching the syntax project-name:folder/entity_or_folder_name :type text: string :param expected: "fold...
python
def path_completer(text, expected=None, classes=None, perm_level=None, include_current_proj=False, typespec=None, visibility=None): ''' :param text: String to tab-complete to a path matching the syntax project-name:folder/entity_or_folder_name :type text: string :param expected: "fold...
[ "def", "path_completer", "(", "text", ",", "expected", "=", "None", ",", "classes", "=", "None", ",", "perm_level", "=", "None", ",", "include_current_proj", "=", "False", ",", "typespec", "=", "None", ",", "visibility", "=", "None", ")", ":", "colon_pos",...
:param text: String to tab-complete to a path matching the syntax project-name:folder/entity_or_folder_name :type text: string :param expected: "folder", "entity", "project", or None (no restriction) as to the types of answers to look for :type expected: string :param classes: if expected="entity", the ...
[ ":", "param", "text", ":", "String", "to", "tab", "-", "complete", "to", "a", "path", "matching", "the", "syntax", "project", "-", "name", ":", "folder", "/", "entity_or_folder_name", ":", "type", "text", ":", "string", ":", "param", "expected", ":", "fo...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/completer.py#L159-L249
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
verify_string_dxid
def verify_string_dxid(dxid, expected_classes): ''' :param dxid: Value to verify as a DNAnexus ID of class *expected_class* :param expected_classes: Single string or list of strings of allowed classes of the ID, e.g. "file" or ["project", "container"] :type expected_classes: string or list of strings ...
python
def verify_string_dxid(dxid, expected_classes): ''' :param dxid: Value to verify as a DNAnexus ID of class *expected_class* :param expected_classes: Single string or list of strings of allowed classes of the ID, e.g. "file" or ["project", "container"] :type expected_classes: string or list of strings ...
[ "def", "verify_string_dxid", "(", "dxid", ",", "expected_classes", ")", ":", "if", "isinstance", "(", "expected_classes", ",", "basestring", ")", ":", "expected_classes", "=", "[", "expected_classes", "]", "if", "not", "isinstance", "(", "expected_classes", ",", ...
:param dxid: Value to verify as a DNAnexus ID of class *expected_class* :param expected_classes: Single string or list of strings of allowed classes of the ID, e.g. "file" or ["project", "container"] :type expected_classes: string or list of strings :raises: :exc:`~dxpy.exceptions.DXError` if *dxid* is not ...
[ ":", "param", "dxid", ":", "Value", "to", "verify", "as", "a", "DNAnexus", "ID", "of", "class", "*", "expected_class", "*", ":", "param", "expected_classes", ":", "Single", "string", "or", "list", "of", "strings", "of", "allowed", "classes", "of", "the", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L32-L52
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXObject.set_id
def set_id(self, dxid): ''' :param dxid: New ID to be associated with the handler :type dxid: string Discards the currently stored ID and associates the handler with *dxid* ''' if dxid is not None: verify_string_dxid(dxid, self._class) self._dxid = d...
python
def set_id(self, dxid): ''' :param dxid: New ID to be associated with the handler :type dxid: string Discards the currently stored ID and associates the handler with *dxid* ''' if dxid is not None: verify_string_dxid(dxid, self._class) self._dxid = d...
[ "def", "set_id", "(", "self", ",", "dxid", ")", ":", "if", "dxid", "is", "not", "None", ":", "verify_string_dxid", "(", "dxid", ",", "self", ".", "_class", ")", "self", ".", "_dxid", "=", "dxid" ]
:param dxid: New ID to be associated with the handler :type dxid: string Discards the currently stored ID and associates the handler with *dxid*
[ ":", "param", "dxid", ":", "New", "ID", "to", "be", "associated", "with", "the", "handler", ":", "type", "dxid", ":", "string" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L113-L123
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.new
def new(self, **kwargs): ''' :param project: Project ID in which to create the new remote object :type project: string :param name: Name for the object :type name: string :param tags: Tags to add for the object :type tags: list of strings :param types: Typ...
python
def new(self, **kwargs): ''' :param project: Project ID in which to create the new remote object :type project: string :param name: Name for the object :type name: string :param tags: Tags to add for the object :type tags: list of strings :param types: Typ...
[ "def", "new", "(", "self", ",", "*", "*", "kwargs", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'_class'", ")", ":", "raise", "NotImplementedError", "(", "\"DXDataObject is an abstract class; a subclass should\"", "+", "\"be initialized instead.\"", ")", ...
:param project: Project ID in which to create the new remote object :type project: string :param name: Name for the object :type name: string :param tags: Tags to add for the object :type tags: list of strings :param types: Types to add to the object :type types: ...
[ ":", "param", "project", ":", "Project", "ID", "in", "which", "to", "create", "the", "new", "remote", "object", ":", "type", "project", ":", "string", ":", "param", "name", ":", "Name", "for", "the", "object", ":", "type", "name", ":", "string", ":", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L222-L258
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.set_ids
def set_ids(self, dxid, project=None): ''' :param dxid: Object ID or a DNAnexus link (a dict with key "$dnanexus_link"); if a project ID is provided in the DNAnexus link, it will be used as *project* unless *project* has been explictly provided :type dxid: string or dict :param project: ...
python
def set_ids(self, dxid, project=None): ''' :param dxid: Object ID or a DNAnexus link (a dict with key "$dnanexus_link"); if a project ID is provided in the DNAnexus link, it will be used as *project* unless *project* has been explictly provided :type dxid: string or dict :param project: ...
[ "def", "set_ids", "(", "self", ",", "dxid", ",", "project", "=", "None", ")", ":", "if", "is_dxlink", "(", "dxid", ")", ":", "dxid", ",", "project_from_link", "=", "get_dxlink_ids", "(", "dxid", ")", "if", "project", "is", "None", ":", "project", "=", ...
:param dxid: Object ID or a DNAnexus link (a dict with key "$dnanexus_link"); if a project ID is provided in the DNAnexus link, it will be used as *project* unless *project* has been explictly provided :type dxid: string or dict :param project: Project ID :type project: string Discards ...
[ ":", "param", "dxid", ":", "Object", "ID", "or", "a", "DNAnexus", "link", "(", "a", "dict", "with", "key", "$dnanexus_link", ")", ";", "if", "a", "project", "ID", "is", "provided", "in", "the", "DNAnexus", "link", "it", "will", "be", "used", "as", "*...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L271-L297
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.describe
def describe(self, incl_properties=False, incl_details=False, fields=None, default_fields=None, **kwargs): """ :param fields: set of fields to include in the output, for example ``{'name', 'modified'}``. The field ``id`` is always implicitly included. If ``fields`` is specified, ...
python
def describe(self, incl_properties=False, incl_details=False, fields=None, default_fields=None, **kwargs): """ :param fields: set of fields to include in the output, for example ``{'name', 'modified'}``. The field ``id`` is always implicitly included. If ``fields`` is specified, ...
[ "def", "describe", "(", "self", ",", "incl_properties", "=", "False", ",", "incl_details", "=", "False", ",", "fields", "=", "None", ",", "default_fields", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_dxid", "is", "None", ":", ...
:param fields: set of fields to include in the output, for example ``{'name', 'modified'}``. The field ``id`` is always implicitly included. If ``fields`` is specified, the default fields are not included (that is, only the fields specified here, and ``id``, are included)...
[ ":", "param", "fields", ":", "set", "of", "fields", "to", "include", "in", "the", "output", "for", "example", "{", "name", "modified", "}", ".", "The", "field", "id", "is", "always", "implicitly", "included", ".", "If", "fields", "is", "specified", "the"...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L311-L376
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.add_types
def add_types(self, types, **kwargs): """ :param types: Types to add to the object :type types: list of strings :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Adds each of the specified types to the remote object. Takes no action f...
python
def add_types(self, types, **kwargs): """ :param types: Types to add to the object :type types: list of strings :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Adds each of the specified types to the remote object. Takes no action f...
[ "def", "add_types", "(", "self", ",", "types", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_add_types", "(", "self", ".", "_dxid", ",", "{", "\"types\"", ":", "types", "}", ",", "*", "*", "kwargs", ")" ]
:param types: Types to add to the object :type types: list of strings :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Adds each of the specified types to the remote object. Takes no action for types that are already listed for the object.
[ ":", "param", "types", ":", "Types", "to", "add", "to", "the", "object", ":", "type", "types", ":", "list", "of", "strings", ":", "raises", ":", ":", "class", ":", "~dxpy", ".", "exceptions", ".", "DXAPIError", "if", "the", "object", "is", "not", "in...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L378-L389
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.remove_types
def remove_types(self, types, **kwargs): """ :param types: Types to remove from the object :type types: list of strings :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Removes each the specified types from the remote object. Takes n...
python
def remove_types(self, types, **kwargs): """ :param types: Types to remove from the object :type types: list of strings :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Removes each the specified types from the remote object. Takes n...
[ "def", "remove_types", "(", "self", ",", "types", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_remove_types", "(", "self", ".", "_dxid", ",", "{", "\"types\"", ":", "types", "}", ",", "*", "*", "kwargs", ")" ]
:param types: Types to remove from the object :type types: list of strings :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Removes each the specified types from the remote object. Takes no action for types that the object does not currently have.
[ ":", "param", "types", ":", "Types", "to", "remove", "from", "the", "object", ":", "type", "types", ":", "list", "of", "strings", ":", "raises", ":", ":", "class", ":", "~dxpy", ".", "exceptions", ".", "DXAPIError", "if", "the", "object", "is", "not", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L391-L402
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.set_details
def set_details(self, details, **kwargs): """ :param details: Details to set for the object :type details: dict or list :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Sets the details for the remote object with the specified value. ...
python
def set_details(self, details, **kwargs): """ :param details: Details to set for the object :type details: dict or list :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Sets the details for the remote object with the specified value. ...
[ "def", "set_details", "(", "self", ",", "details", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "_set_details", "(", "self", ".", "_dxid", ",", "details", ",", "*", "*", "kwargs", ")" ]
:param details: Details to set for the object :type details: dict or list :raises: :class:`~dxpy.exceptions.DXAPIError` if the object is not in the "open" state Sets the details for the remote object with the specified value. If the input contains the string ``"$dnanexus_link"`` as a ke...
[ ":", "param", "details", ":", "Details", "to", "set", "for", "the", "object", ":", "type", "details", ":", "dict", "or", "list", ":", "raises", ":", ":", "class", ":", "~dxpy", ".", "exceptions", ".", "DXAPIError", "if", "the", "object", "is", "not", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L413-L426
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.rename
def rename(self, name, **kwargs): """ :param name: New name for the object :type name: string Renames the remote object. The name is changed on the copy of the object in the project associated with the handler. """ return self._rename(self._dxid, {"pro...
python
def rename(self, name, **kwargs): """ :param name: New name for the object :type name: string Renames the remote object. The name is changed on the copy of the object in the project associated with the handler. """ return self._rename(self._dxid, {"pro...
[ "def", "rename", "(", "self", ",", "name", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "_rename", "(", "self", ".", "_dxid", ",", "{", "\"project\"", ":", "self", ".", "_proj", ",", "\"name\"", ":", "name", "}", ",", "*", "*", "kwar...
:param name: New name for the object :type name: string Renames the remote object. The name is changed on the copy of the object in the project associated with the handler.
[ ":", "param", "name", ":", "New", "name", "for", "the", "object", ":", "type", "name", ":", "string" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L448-L461
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.set_properties
def set_properties(self, properties, **kwargs): """ :param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the object for the given ...
python
def set_properties(self, properties, **kwargs): """ :param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the object for the given ...
[ "def", "set_properties", "(", "self", ",", "properties", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_set_properties", "(", "self", ".", "_dxid", ",", "{", "\"project\"", ":", "self", ".", "_proj", ",", "\"properties\"", ":", "properties", "}", ",",...
:param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the object for the given property names. Any property with a value of :const:`None` ...
[ ":", "param", "properties", ":", "Property", "names", "and", "values", "given", "as", "key", "-", "value", "pairs", "of", "strings", ":", "type", "properties", ":", "dict" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L476-L505
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.add_tags
def add_tags(self, tags, **kwargs): """ :param tags: Tags to add to the object :type tags: list of strings Adds each of the specified tags to the remote object. Takes no action for tags that are already listed for the object. The tags are added to the copy of the object...
python
def add_tags(self, tags, **kwargs): """ :param tags: Tags to add to the object :type tags: list of strings Adds each of the specified tags to the remote object. Takes no action for tags that are already listed for the object. The tags are added to the copy of the object...
[ "def", "add_tags", "(", "self", ",", "tags", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_add_tags", "(", "self", ".", "_dxid", ",", "{", "\"project\"", ":", "self", ".", "_proj", ",", "\"tags\"", ":", "tags", "}", ",", "*", "*", "kwargs", "...
:param tags: Tags to add to the object :type tags: list of strings Adds each of the specified tags to the remote object. Takes no action for tags that are already listed for the object. The tags are added to the copy of the object in the project associated with the handler.
[ ":", "param", "tags", ":", "Tags", "to", "add", "to", "the", "object", ":", "type", "tags", ":", "list", "of", "strings" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L507-L521
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.remove_tags
def remove_tags(self, tags, **kwargs): """ :param tags: Tags to remove from the object :type tags: list of strings Removes each of the specified tags from the remote object. Takes no action for tags that the object does not currently have. The tags are removed from the ...
python
def remove_tags(self, tags, **kwargs): """ :param tags: Tags to remove from the object :type tags: list of strings Removes each of the specified tags from the remote object. Takes no action for tags that the object does not currently have. The tags are removed from the ...
[ "def", "remove_tags", "(", "self", ",", "tags", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_remove_tags", "(", "self", ".", "_dxid", ",", "{", "\"project\"", ":", "self", ".", "_proj", ",", "\"tags\"", ":", "tags", "}", ",", "*", "*", "kwargs...
:param tags: Tags to remove from the object :type tags: list of strings Removes each of the specified tags from the remote object. Takes no action for tags that the object does not currently have. The tags are removed from the copy of the object in the project associated with t...
[ ":", "param", "tags", ":", "Tags", "to", "remove", "from", "the", "object", ":", "type", "tags", ":", "list", "of", "strings" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L523-L537
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.remove
def remove(self, **kwargs): ''' :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object Permanently removes the associated remote object from the associated project. ''' if self._proj is None: raise DXError("Remove called when a ...
python
def remove(self, **kwargs): ''' :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object Permanently removes the associated remote object from the associated project. ''' if self._proj is None: raise DXError("Remove called when a ...
[ "def", "remove", "(", "self", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_proj", "is", "None", ":", "raise", "DXError", "(", "\"Remove called when a project ID was not associated with this object handler\"", ")", "dxpy", ".", "api", ".", "project_remov...
:raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object Permanently removes the associated remote object from the associated project.
[ ":", "raises", ":", ":", "exc", ":", "~dxpy", ".", "exceptions", ".", "DXError", "if", "no", "project", "is", "associated", "with", "the", "object" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L559-L576
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.move
def move(self, folder, **kwargs): ''' :param folder: Folder route to which to move the object :type folder: string :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object Moves the associated remote object to *folder*. ''' if self._...
python
def move(self, folder, **kwargs): ''' :param folder: Folder route to which to move the object :type folder: string :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object Moves the associated remote object to *folder*. ''' if self._...
[ "def", "move", "(", "self", ",", "folder", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_proj", "is", "None", ":", "raise", "DXError", "(", "\"Move called when a project ID was not associated with this object handler\"", ")", "dxpy", ".", "api", ".", ...
:param folder: Folder route to which to move the object :type folder: string :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object Moves the associated remote object to *folder*.
[ ":", "param", "folder", ":", "Folder", "route", "to", "which", "to", "move", "the", "object", ":", "type", "folder", ":", "string", ":", "raises", ":", ":", "exc", ":", "~dxpy", ".", "exceptions", ".", "DXError", "if", "no", "project", "is", "associate...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L578-L593
dnanexus/dx-toolkit
src/python/dxpy/bindings/__init__.py
DXDataObject.clone
def clone(self, project, folder="/", **kwargs): ''' :param project: Destination project ID :type project: string :param folder: Folder route to which to move the object :type folder: string :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the obje...
python
def clone(self, project, folder="/", **kwargs): ''' :param project: Destination project ID :type project: string :param folder: Folder route to which to move the object :type folder: string :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the obje...
[ "def", "clone", "(", "self", ",", "project", ",", "folder", "=", "\"/\"", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_proj", "is", "None", ":", "raise", "DXError", "(", "\"Clone called when a project ID was not associated with this object handler\"", ...
:param project: Destination project ID :type project: string :param folder: Folder route to which to move the object :type folder: string :raises: :exc:`~dxpy.exceptions.DXError` if no project is associated with the object :returns: An object handler for the new cloned object ...
[ ":", "param", "project", ":", "Destination", "project", "ID", ":", "type", "project", ":", "string", ":", "param", "folder", ":", "Folder", "route", "to", "which", "to", "move", "the", "object", ":", "type", "folder", ":", "string", ":", "raises", ":", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/__init__.py#L596-L622
dnanexus/dx-toolkit
src/python/dxpy/utils/config.py
DXConfig.get_session_conf_dir
def get_session_conf_dir(self, cleanup=False): """ Tries to find the session configuration directory by looking in ~/.dnanexus_config/sessions/<PID>, where <PID> is pid of the parent of this process, then its parent, and so on. If none of those exist, the path for the immediate parent is...
python
def get_session_conf_dir(self, cleanup=False): """ Tries to find the session configuration directory by looking in ~/.dnanexus_config/sessions/<PID>, where <PID> is pid of the parent of this process, then its parent, and so on. If none of those exist, the path for the immediate parent is...
[ "def", "get_session_conf_dir", "(", "self", ",", "cleanup", "=", "False", ")", ":", "sessions_dir", "=", "os", ".", "path", ".", "join", "(", "self", ".", "_user_conf_dir", ",", "\"sessions\"", ")", "try", ":", "from", "psutil", "import", "Process", ",", ...
Tries to find the session configuration directory by looking in ~/.dnanexus_config/sessions/<PID>, where <PID> is pid of the parent of this process, then its parent, and so on. If none of those exist, the path for the immediate parent is given, even if it doesn't exist. If *cleanup* is True, lo...
[ "Tries", "to", "find", "the", "session", "configuration", "directory", "by", "looking", "in", "~", "/", ".", "dnanexus_config", "/", "sessions", "/", "<PID", ">", "where", "<PID", ">", "is", "pid", "of", "the", "parent", "of", "this", "process", "then", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/utils/config.py#L161-L208
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxdataobject_functions.py
dxlink
def dxlink(object_id, project_id=None, field=None): ''' :param object_id: Object ID or the object handler itself :type object_id: string or :class:`~dxpy.bindings.DXDataObject` :param project_id: A project ID, if creating a cross-project DXLink :type project_id: string :param field: A field name...
python
def dxlink(object_id, project_id=None, field=None): ''' :param object_id: Object ID or the object handler itself :type object_id: string or :class:`~dxpy.bindings.DXDataObject` :param project_id: A project ID, if creating a cross-project DXLink :type project_id: string :param field: A field name...
[ "def", "dxlink", "(", "object_id", ",", "project_id", "=", "None", ",", "field", "=", "None", ")", ":", "if", "is_dxlink", "(", "object_id", ")", ":", "return", "object_id", "if", "isinstance", "(", "object_id", ",", "DXDataObject", ")", ":", "object_id", ...
:param object_id: Object ID or the object handler itself :type object_id: string or :class:`~dxpy.bindings.DXDataObject` :param project_id: A project ID, if creating a cross-project DXLink :type project_id: string :param field: A field name, if creating a job-based object reference :type field: stri...
[ ":", "param", "object_id", ":", "Object", "ID", "or", "the", "object", "handler", "itself", ":", "type", "object_id", ":", "string", "or", ":", "class", ":", "~dxpy", ".", "bindings", ".", "DXDataObject", ":", "param", "project_id", ":", "A", "project", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxdataobject_functions.py#L37-L76
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxdataobject_functions.py
is_dxlink
def is_dxlink(x): ''' :param x: A potential DNAnexus link Returns whether *x* appears to be a DNAnexus link (is a dict with key ``"$dnanexus_link"``) with a referenced data object. ''' if not isinstance(x, dict): return False if '$dnanexus_link' not in x: return False li...
python
def is_dxlink(x): ''' :param x: A potential DNAnexus link Returns whether *x* appears to be a DNAnexus link (is a dict with key ``"$dnanexus_link"``) with a referenced data object. ''' if not isinstance(x, dict): return False if '$dnanexus_link' not in x: return False li...
[ "def", "is_dxlink", "(", "x", ")", ":", "if", "not", "isinstance", "(", "x", ",", "dict", ")", ":", "return", "False", "if", "'$dnanexus_link'", "not", "in", "x", ":", "return", "False", "link", "=", "x", "[", "'$dnanexus_link'", "]", "if", "isinstance...
:param x: A potential DNAnexus link Returns whether *x* appears to be a DNAnexus link (is a dict with key ``"$dnanexus_link"``) with a referenced data object.
[ ":", "param", "x", ":", "A", "potential", "DNAnexus", "link" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxdataobject_functions.py#L78-L94
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxdataobject_functions.py
get_dxlink_ids
def get_dxlink_ids(link): ''' :param link: A DNAnexus link :type link: dict :returns: (Object ID, Project ID) if the link is to a data object (or :const:`None` if no project specified in the link), or (Job ID, Field) if the link is a job-based object reference (JBOR). :rtype: tuple ...
python
def get_dxlink_ids(link): ''' :param link: A DNAnexus link :type link: dict :returns: (Object ID, Project ID) if the link is to a data object (or :const:`None` if no project specified in the link), or (Job ID, Field) if the link is a job-based object reference (JBOR). :rtype: tuple ...
[ "def", "get_dxlink_ids", "(", "link", ")", ":", "if", "not", "is_dxlink", "(", "link", ")", ":", "raise", "DXError", "(", "'Invalid link: %r'", "%", "link", ")", "if", "isinstance", "(", "link", "[", "'$dnanexus_link'", "]", ",", "basestring", ")", ":", ...
:param link: A DNAnexus link :type link: dict :returns: (Object ID, Project ID) if the link is to a data object (or :const:`None` if no project specified in the link), or (Job ID, Field) if the link is a job-based object reference (JBOR). :rtype: tuple Get the object ID and detail from ...
[ ":", "param", "link", ":", "A", "DNAnexus", "link", ":", "type", "link", ":", "dict", ":", "returns", ":", "(", "Object", "ID", "Project", "ID", ")", "if", "the", "link", "is", "to", "a", "data", "object", "(", "or", ":", "const", ":", "None", "i...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxdataobject_functions.py#L96-L121
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxdataobject_functions.py
get_handler
def get_handler(id_or_link, project=None): ''' :param id_or_link: String containing an object ID or dict containing a DXLink :type id_or_link: string or dict :param project: String project ID to use as the context if the the object is a data object :type project: string :rtype: :class:`~dxpy.bin...
python
def get_handler(id_or_link, project=None): ''' :param id_or_link: String containing an object ID or dict containing a DXLink :type id_or_link: string or dict :param project: String project ID to use as the context if the the object is a data object :type project: string :rtype: :class:`~dxpy.bin...
[ "def", "get_handler", "(", "id_or_link", ",", "project", "=", "None", ")", ":", "try", ":", "cls", "=", "_guess_link_target_type", "(", "id_or_link", ")", "except", "Exception", "as", "e", ":", "raise", "DXError", "(", "\"Could not parse link {}: {}\"", ".", "...
:param id_or_link: String containing an object ID or dict containing a DXLink :type id_or_link: string or dict :param project: String project ID to use as the context if the the object is a data object :type project: string :rtype: :class:`~dxpy.bindings.DXObject`, :class:`~dxpy.bindings.DXApp`, or :cla...
[ ":", "param", "id_or_link", ":", "String", "containing", "an", "object", "ID", "or", "dict", "containing", "a", "DXLink", ":", "type", "id_or_link", ":", "string", "or", "dict", ":", "param", "project", ":", "String", "project", "ID", "to", "use", "as", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxdataobject_functions.py#L136-L174
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxdataobject_functions.py
describe
def describe(id_or_link, **kwargs): ''' :param id_or_link: String containing an object ID or dict containing a DXLink, or a list of object IDs or dicts containing a DXLink. Given an object ID, calls :meth:`~dxpy.bindings.DXDataObject.describe` on the object. Example:: d...
python
def describe(id_or_link, **kwargs): ''' :param id_or_link: String containing an object ID or dict containing a DXLink, or a list of object IDs or dicts containing a DXLink. Given an object ID, calls :meth:`~dxpy.bindings.DXDataObject.describe` on the object. Example:: d...
[ "def", "describe", "(", "id_or_link", ",", "*", "*", "kwargs", ")", ":", "# If this is a list, extract the ids.", "# TODO: modify the procedure to use project ID when possible", "if", "isinstance", "(", "id_or_link", ",", "basestring", ")", "or", "is_dxlink", "(", "id_or_...
:param id_or_link: String containing an object ID or dict containing a DXLink, or a list of object IDs or dicts containing a DXLink. Given an object ID, calls :meth:`~dxpy.bindings.DXDataObject.describe` on the object. Example:: describe("file-1234") Given a list of object...
[ ":", "param", "id_or_link", ":", "String", "containing", "an", "object", "ID", "or", "dict", "containing", "a", "DXLink", "or", "a", "list", "of", "object", "IDs", "or", "dicts", "containing", "a", "DXLink", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxdataobject_functions.py#L176-L229
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.describe
def describe(self, **kwargs): """ :returns: A hash containing attributes of the project or container. :rtype: dict Returns a hash with key-value pairs as specified by the API specification for the `/project-xxxx/describe <https://wiki.dnanexus.com/API-Specification-v1.0....
python
def describe(self, **kwargs): """ :returns: A hash containing attributes of the project or container. :rtype: dict Returns a hash with key-value pairs as specified by the API specification for the `/project-xxxx/describe <https://wiki.dnanexus.com/API-Specification-v1.0....
[ "def", "describe", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# TODO: link to /container-xxxx/describe", "api_method", "=", "dxpy", ".", "api", ".", "container_describe", "if", "isinstance", "(", "self", ",", "DXProject", ")", ":", "api_method", "=", "dx...
:returns: A hash containing attributes of the project or container. :rtype: dict Returns a hash with key-value pairs as specified by the API specification for the `/project-xxxx/describe <https://wiki.dnanexus.com/API-Specification-v1.0.0/Projects#API-method%3A-%2Fproject-xxxx%2Fdescrib...
[ ":", "returns", ":", "A", "hash", "containing", "attributes", "of", "the", "project", "or", "container", ".", ":", "rtype", ":", "dict" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L58-L75
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.new_folder
def new_folder(self, folder, parents=False, **kwargs): """ :param folder: Full path to the new folder to create :type folder: string :param parents: If True, recursively create any parent folders that are missing :type parents: boolean Creates a new folder in the project...
python
def new_folder(self, folder, parents=False, **kwargs): """ :param folder: Full path to the new folder to create :type folder: string :param parents: If True, recursively create any parent folders that are missing :type parents: boolean Creates a new folder in the project...
[ "def", "new_folder", "(", "self", ",", "folder", ",", "parents", "=", "False", ",", "*", "*", "kwargs", ")", ":", "api_method", "=", "dxpy", ".", "api", ".", "container_new_folder", "if", "isinstance", "(", "self", ",", "DXProject", ")", ":", "api_method...
:param folder: Full path to the new folder to create :type folder: string :param parents: If True, recursively create any parent folders that are missing :type parents: boolean Creates a new folder in the project or container.
[ ":", "param", "folder", ":", "Full", "path", "to", "the", "new", "folder", "to", "create", ":", "type", "folder", ":", "string", ":", "param", "parents", ":", "If", "True", "recursively", "create", "any", "parent", "folders", "that", "are", "missing", ":...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L77-L93
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.list_folder
def list_folder(self, folder="/", describe=False, only="all", includeHidden=False, **kwargs): """ :param folder: Full path to the folder to list :type folder: string :param describe: If True, returns the output of ``/describe`` on each object (see below for notes) :type describe:...
python
def list_folder(self, folder="/", describe=False, only="all", includeHidden=False, **kwargs): """ :param folder: Full path to the folder to list :type folder: string :param describe: If True, returns the output of ``/describe`` on each object (see below for notes) :type describe:...
[ "def", "list_folder", "(", "self", ",", "folder", "=", "\"/\"", ",", "describe", "=", "False", ",", "only", "=", "\"all\"", ",", "includeHidden", "=", "False", ",", "*", "*", "kwargs", ")", ":", "# TODO: it would be nice if we could supply describe", "# fields/d...
:param folder: Full path to the folder to list :type folder: string :param describe: If True, returns the output of ``/describe`` on each object (see below for notes) :type describe: bool or dict :param only: Indicate "objects" for only objects, "folders" for only folders, or "all" for b...
[ ":", "param", "folder", ":", "Full", "path", "to", "the", "folder", "to", "list", ":", "type", "folder", ":", "string", ":", "param", "describe", ":", "If", "True", "returns", "the", "output", "of", "/", "describe", "on", "each", "object", "(", "see", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L95-L135
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.move
def move(self, destination, objects=[], folders=[], **kwargs): """ :param destination: Path of destination folder :type destination: string :param objects: List of object IDs to move :type objects: list of strings :param folders: List of full paths to folders to move ...
python
def move(self, destination, objects=[], folders=[], **kwargs): """ :param destination: Path of destination folder :type destination: string :param objects: List of object IDs to move :type objects: list of strings :param folders: List of full paths to folders to move ...
[ "def", "move", "(", "self", ",", "destination", ",", "objects", "=", "[", "]", ",", "folders", "=", "[", "]", ",", "*", "*", "kwargs", ")", ":", "api_method", "=", "dxpy", ".", "api", ".", "container_move", "if", "isinstance", "(", "self", ",", "DX...
:param destination: Path of destination folder :type destination: string :param objects: List of object IDs to move :type objects: list of strings :param folders: List of full paths to folders to move :type folders: list of strings Moves the specified objects and folders...
[ ":", "param", "destination", ":", "Path", "of", "destination", "folder", ":", "type", "destination", ":", "string", ":", "param", "objects", ":", "List", "of", "object", "IDs", "to", "move", ":", "type", "objects", ":", "list", "of", "strings", ":", "par...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L137-L161
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.move_folder
def move_folder(self, folder, destination, **kwargs): """ :param folder: Full path to the folder to move :type folder: string :param destination: Full path to the destination folder that will contain *folder* :type destination: string Moves *folder* to reside in *destina...
python
def move_folder(self, folder, destination, **kwargs): """ :param folder: Full path to the folder to move :type folder: string :param destination: Full path to the destination folder that will contain *folder* :type destination: string Moves *folder* to reside in *destina...
[ "def", "move_folder", "(", "self", ",", "folder", ",", "destination", ",", "*", "*", "kwargs", ")", ":", "api_method", "=", "dxpy", ".", "api", ".", "container_move", "if", "isinstance", "(", "self", ",", "DXProject", ")", ":", "api_method", "=", "dxpy",...
:param folder: Full path to the folder to move :type folder: string :param destination: Full path to the destination folder that will contain *folder* :type destination: string Moves *folder* to reside in *destination* in the same project or container. All objects and subfolders...
[ ":", "param", "folder", ":", "Full", "path", "to", "the", "folder", "to", "move", ":", "type", "folder", ":", "string", ":", "param", "destination", ":", "Full", "path", "to", "the", "destination", "folder", "that", "will", "contain", "*", "folder", "*",...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L163-L181
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.remove_folder
def remove_folder(self, folder, recurse=False, force=False, **kwargs): """ :param folder: Full path to the folder to remove :type folder: string :param recurse: If True, recursively remove all objects and subfolders in the folder :type recurse: bool :param force: If True,...
python
def remove_folder(self, folder, recurse=False, force=False, **kwargs): """ :param folder: Full path to the folder to remove :type folder: string :param recurse: If True, recursively remove all objects and subfolders in the folder :type recurse: bool :param force: If True,...
[ "def", "remove_folder", "(", "self", ",", "folder", ",", "recurse", "=", "False", ",", "force", "=", "False", ",", "*", "*", "kwargs", ")", ":", "api_method", "=", "dxpy", ".", "api", ".", "container_remove_folder", "if", "isinstance", "(", "self", ",", ...
:param folder: Full path to the folder to remove :type folder: string :param recurse: If True, recursively remove all objects and subfolders in the folder :type recurse: bool :param force: If True, will suppress errors for folders that do not exist :type force: bool Remo...
[ ":", "param", "folder", ":", "Full", "path", "to", "the", "folder", "to", "remove", ":", "type", "folder", ":", "string", ":", "param", "recurse", ":", "If", "True", "recursively", "remove", "all", "objects", "and", "subfolders", "in", "the", "folder", "...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L183-L213
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.remove_objects
def remove_objects(self, objects, force=False, **kwargs): """ :param objects: List of object IDs to remove from the project or container :type objects: list of strings :param force: If True, will suppress errors for objects that do not exist :type force: bool Removes the...
python
def remove_objects(self, objects, force=False, **kwargs): """ :param objects: List of object IDs to remove from the project or container :type objects: list of strings :param force: If True, will suppress errors for objects that do not exist :type force: bool Removes the...
[ "def", "remove_objects", "(", "self", ",", "objects", ",", "force", "=", "False", ",", "*", "*", "kwargs", ")", ":", "api_method", "=", "dxpy", ".", "api", ".", "container_remove_objects", "if", "isinstance", "(", "self", ",", "DXProject", ")", ":", "api...
:param objects: List of object IDs to remove from the project or container :type objects: list of strings :param force: If True, will suppress errors for objects that do not exist :type force: bool Removes the specified objects from the project or container. Removal propagates ...
[ ":", "param", "objects", ":", "List", "of", "object", "IDs", "to", "remove", "from", "the", "project", "or", "container", ":", "type", "objects", ":", "list", "of", "strings", ":", "param", "force", ":", "If", "True", "will", "suppress", "errors", "for",...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L215-L236
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXContainer.clone
def clone(self, container, destination="/", objects=[], folders=[], parents=False, **kwargs): """ :param container: Destination container ID :type container: string :param destination: Path of destination folder in the destination container :type destination: string :para...
python
def clone(self, container, destination="/", objects=[], folders=[], parents=False, **kwargs): """ :param container: Destination container ID :type container: string :param destination: Path of destination folder in the destination container :type destination: string :para...
[ "def", "clone", "(", "self", ",", "container", ",", "destination", "=", "\"/\"", ",", "objects", "=", "[", "]", ",", "folders", "=", "[", "]", ",", "parents", "=", "False", ",", "*", "*", "kwargs", ")", ":", "api_method", "=", "dxpy", ".", "api", ...
:param container: Destination container ID :type container: string :param destination: Path of destination folder in the destination container :type destination: string :param objects: List of object IDs to move :type objects: list of strings :param folders: List of full ...
[ ":", "param", "container", ":", "Destination", "container", "ID", ":", "type", "container", ":", "string", ":", "param", "destination", ":", "Path", "of", "destination", "folder", "in", "the", "destination", "container", ":", "type", "destination", ":", "strin...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L238-L273
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXProject.new
def new(self, name, summary=None, description=None, protected=None, restricted=None, download_restricted=None, contains_phi=None, tags=None, properties=None, bill_to=None, **kwargs): """ :param name: The name of the project :type name: string :param summary: If pr...
python
def new(self, name, summary=None, description=None, protected=None, restricted=None, download_restricted=None, contains_phi=None, tags=None, properties=None, bill_to=None, **kwargs): """ :param name: The name of the project :type name: string :param summary: If pr...
[ "def", "new", "(", "self", ",", "name", ",", "summary", "=", "None", ",", "description", "=", "None", ",", "protected", "=", "None", ",", "restricted", "=", "None", ",", "download_restricted", "=", "None", ",", "contains_phi", "=", "None", ",", "tags", ...
:param name: The name of the project :type name: string :param summary: If provided, a short summary of what the project contains :type summary: string :param description: If provided, the new project description :type name: string :param protected: If provided, whether t...
[ ":", "param", "name", ":", "The", "name", "of", "the", "project", ":", "type", "name", ":", "string", ":", "param", "summary", ":", "If", "provided", "a", "short", "summary", "of", "what", "the", "project", "contains", ":", "type", "summary", ":", "str...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L284-L339
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXProject.update
def update(self, name=None, summary=None, description=None, protected=None, restricted=None, download_restricted=None, version=None, **kwargs): """ :param name: If provided, the new project name :type name: string :param summary: If provided, the new project summary ...
python
def update(self, name=None, summary=None, description=None, protected=None, restricted=None, download_restricted=None, version=None, **kwargs): """ :param name: If provided, the new project name :type name: string :param summary: If provided, the new project summary ...
[ "def", "update", "(", "self", ",", "name", "=", "None", ",", "summary", "=", "None", ",", "description", "=", "None", ",", "protected", "=", "None", ",", "restricted", "=", "None", ",", "download_restricted", "=", "None", ",", "version", "=", "None", "...
:param name: If provided, the new project name :type name: string :param summary: If provided, the new project summary :type summary: string :param description: If provided, the new project description :type name: string :param protected: If provided, whether the project ...
[ ":", "param", "name", ":", "If", "provided", "the", "new", "project", "name", ":", "type", "name", ":", "string", ":", "param", "summary", ":", "If", "provided", "the", "new", "project", "summary", ":", "type", "summary", ":", "string", ":", "param", "...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L341-L381
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXProject.invite
def invite(self, invitee, level, send_email=True, **kwargs): """ :param invitee: Username (of the form "user-USERNAME") or email address of person to be invited to the project; use "PUBLIC" to make the project publicly available (in which case level must be set to "VIEW"). :type invitee: string ...
python
def invite(self, invitee, level, send_email=True, **kwargs): """ :param invitee: Username (of the form "user-USERNAME") or email address of person to be invited to the project; use "PUBLIC" to make the project publicly available (in which case level must be set to "VIEW"). :type invitee: string ...
[ "def", "invite", "(", "self", ",", "invitee", ",", "level", ",", "send_email", "=", "True", ",", "*", "*", "kwargs", ")", ":", "return", "dxpy", ".", "api", ".", "project_invite", "(", "self", ".", "_dxid", ",", "{", "\"invitee\"", ":", "invitee", ",...
:param invitee: Username (of the form "user-USERNAME") or email address of person to be invited to the project; use "PUBLIC" to make the project publicly available (in which case level must be set to "VIEW"). :type invitee: string :param level: Permissions level that the invitee would get ("VIEW", "UPLO...
[ ":", "param", "invitee", ":", "Username", "(", "of", "the", "form", "user", "-", "USERNAME", ")", "or", "email", "address", "of", "person", "to", "be", "invited", "to", "the", "project", ";", "use", "PUBLIC", "to", "make", "the", "project", "publicly", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L383-L399
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXProject.decrease_perms
def decrease_perms(self, member, level, **kwargs): """ :param member: Username (of the form "user-USERNAME") of the project member whose permissions will be decreased. :type member: string :param level: Permissions level that the member will have after this operation (None, "VIEW", "UPLO...
python
def decrease_perms(self, member, level, **kwargs): """ :param member: Username (of the form "user-USERNAME") of the project member whose permissions will be decreased. :type member: string :param level: Permissions level that the member will have after this operation (None, "VIEW", "UPLO...
[ "def", "decrease_perms", "(", "self", ",", "member", ",", "level", ",", "*", "*", "kwargs", ")", ":", "input_hash", "=", "{", "}", "input_hash", "[", "member", "]", "=", "level", "return", "dxpy", ".", "api", ".", "project_decrease_permissions", "(", "se...
:param member: Username (of the form "user-USERNAME") of the project member whose permissions will be decreased. :type member: string :param level: Permissions level that the member will have after this operation (None, "VIEW", "UPLOAD", or "CONTRIBUTE") :type level: string or None Decr...
[ ":", "param", "member", ":", "Username", "(", "of", "the", "form", "user", "-", "USERNAME", ")", "of", "the", "project", "member", "whose", "permissions", "will", "be", "decreased", ".", ":", "type", "member", ":", "string", ":", "param", "level", ":", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L401-L417
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxproject.py
DXProject.set_properties
def set_properties(self, properties, **kwargs): """ :param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the project for the given ...
python
def set_properties(self, properties, **kwargs): """ :param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the project for the given ...
[ "def", "set_properties", "(", "self", ",", "properties", ",", "*", "*", "kwargs", ")", ":", "return", "dxpy", ".", "api", ".", "project_set_properties", "(", "self", ".", "_dxid", ",", "{", "\"properties\"", ":", "properties", "}", ",", "*", "*", "kwargs...
:param properties: Property names and values given as key-value pairs of strings :type properties: dict Given key-value pairs in *properties* for property names and values, the properties are set on the project for the given property names. Any property with a value of :const:`None` ...
[ ":", "param", "properties", ":", "Property", "names", "and", "values", "given", "as", "key", "-", "value", "pairs", "of", "strings", ":", "type", "properties", ":", "dict" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxproject.py#L426-L441
dnanexus/dx-toolkit
src/python/dxpy/exceptions.py
format_exception
def format_exception(e): """Returns a string containing the type and text of the exception. """ from .utils.printing import fill return '\n'.join(fill(line) for line in traceback.format_exception_only(type(e), e))
python
def format_exception(e): """Returns a string containing the type and text of the exception. """ from .utils.printing import fill return '\n'.join(fill(line) for line in traceback.format_exception_only(type(e), e))
[ "def", "format_exception", "(", "e", ")", ":", "from", ".", "utils", ".", "printing", "import", "fill", "return", "'\\n'", ".", "join", "(", "fill", "(", "line", ")", "for", "line", "in", "traceback", ".", "format_exception_only", "(", "type", "(", "e", ...
Returns a string containing the type and text of the exception.
[ "Returns", "a", "string", "containing", "the", "type", "and", "text", "of", "the", "exception", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/exceptions.py#L185-L190
dnanexus/dx-toolkit
src/python/dxpy/exceptions.py
exit_with_exc_info
def exit_with_exc_info(code=1, message='', print_tb=False, exception=None): '''Exits the program, printing information about the last exception (if any) and an optional error message. Uses *exception* instead if provided. :param code: Exit code. :type code: integer (valid exit code, 0-255) :param ...
python
def exit_with_exc_info(code=1, message='', print_tb=False, exception=None): '''Exits the program, printing information about the last exception (if any) and an optional error message. Uses *exception* instead if provided. :param code: Exit code. :type code: integer (valid exit code, 0-255) :param ...
[ "def", "exit_with_exc_info", "(", "code", "=", "1", ",", "message", "=", "''", ",", "print_tb", "=", "False", ",", "exception", "=", "None", ")", ":", "exc_type", ",", "exc_value", "=", "(", "exception", ".", "__class__", ",", "exception", ")", "if", "...
Exits the program, printing information about the last exception (if any) and an optional error message. Uses *exception* instead if provided. :param code: Exit code. :type code: integer (valid exit code, 0-255) :param message: Message to be printed after the exception information. :type message: ...
[ "Exits", "the", "program", "printing", "information", "about", "the", "last", "exception", "(", "if", "any", ")", "and", "an", "optional", "error", "message", ".", "Uses", "*", "exception", "*", "instead", "if", "provided", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/exceptions.py#L193-L220
dnanexus/dx-toolkit
src/python/dxpy/exceptions.py
err_exit
def err_exit(message='', code=None, expected_exceptions=default_expected_exceptions, arg_parser=None, ignore_sigpipe=True, exception=None): '''Exits the program, printing information about the last exception (if any) and an optional error message. Uses *exception* instead if provided. Uses **...
python
def err_exit(message='', code=None, expected_exceptions=default_expected_exceptions, arg_parser=None, ignore_sigpipe=True, exception=None): '''Exits the program, printing information about the last exception (if any) and an optional error message. Uses *exception* instead if provided. Uses **...
[ "def", "err_exit", "(", "message", "=", "''", ",", "code", "=", "None", ",", "expected_exceptions", "=", "default_expected_exceptions", ",", "arg_parser", "=", "None", ",", "ignore_sigpipe", "=", "True", ",", "exception", "=", "None", ")", ":", "if", "arg_pa...
Exits the program, printing information about the last exception (if any) and an optional error message. Uses *exception* instead if provided. Uses **expected_exceptions** to set the error code decide whether to suppress the error traceback. :param message: Message to be printed after the exception i...
[ "Exits", "the", "program", "printing", "information", "about", "the", "last", "exception", "(", "if", "any", ")", "and", "an", "optional", "error", "message", ".", "Uses", "*", "exception", "*", "instead", "if", "provided", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/exceptions.py#L235-L269
dnanexus/dx-toolkit
src/python/dxpy/exceptions.py
DXAPIError.error_message
def error_message(self): "Returns a one-line description of the error." output = self.msg + ", code " + str(self.code) output += ". Request Time={}, Request ID={}".format(self.timestamp, self.req_id) if self.name != self.__class__.__name__: output = self.name + ": " + output ...
python
def error_message(self): "Returns a one-line description of the error." output = self.msg + ", code " + str(self.code) output += ". Request Time={}, Request ID={}".format(self.timestamp, self.req_id) if self.name != self.__class__.__name__: output = self.name + ": " + output ...
[ "def", "error_message", "(", "self", ")", ":", "output", "=", "self", ".", "msg", "+", "\", code \"", "+", "str", "(", "self", ".", "code", ")", "output", "+=", "\". Request Time={}, Request ID={}\"", ".", "format", "(", "self", ".", "timestamp", ",", "sel...
Returns a one-line description of the error.
[ "Returns", "a", "one", "-", "line", "description", "of", "the", "error", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/exceptions.py#L51-L57
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxglobalworkflow.py
DXGlobalWorkflow.publish
def publish(self, **kwargs): """ Publishes the global workflow, so all users can find it and use it on the platform. The current user must be a developer of the workflow. """ if self._dxid is not None: return dxpy.api.global_workflow_publish(self._dxid, **kwargs) ...
python
def publish(self, **kwargs): """ Publishes the global workflow, so all users can find it and use it on the platform. The current user must be a developer of the workflow. """ if self._dxid is not None: return dxpy.api.global_workflow_publish(self._dxid, **kwargs) ...
[ "def", "publish", "(", "self", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_dxid", "is", "not", "None", ":", "return", "dxpy", ".", "api", ".", "global_workflow_publish", "(", "self", ".", "_dxid", ",", "*", "*", "kwargs", ")", "else", "...
Publishes the global workflow, so all users can find it and use it on the platform. The current user must be a developer of the workflow.
[ "Publishes", "the", "global", "workflow", "so", "all", "users", "can", "find", "it", "and", "use", "it", "on", "the", "platform", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxglobalworkflow.py#L152-L161
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxglobalworkflow.py
DXGlobalWorkflow.describe_underlying_workflow
def describe_underlying_workflow(self, region, describe_output=None): """ :param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object description of a workflow :rtype: : dict...
python
def describe_underlying_workflow(self, region, describe_output=None): """ :param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object description of a workflow :rtype: : dict...
[ "def", "describe_underlying_workflow", "(", "self", ",", "region", ",", "describe_output", "=", "None", ")", ":", "assert", "(", "describe_output", "is", "None", "or", "describe_output", ".", "get", "(", "'class'", ",", "''", ")", "==", "'globalworkflow'", ")"...
:param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object description of a workflow :rtype: : dict Returns an object description of an underlying workflow from a given region.
[ ":", "param", "region", ":", "region", "name", ":", "type", "region", ":", "string", ":", "param", "describe_output", ":", "description", "of", "a", "global", "workflow", ":", "type", "describe_output", ":", "dict", ":", "returns", ":", "object", "descriptio...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxglobalworkflow.py#L163-L195
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxglobalworkflow.py
DXGlobalWorkflow.get_underlying_workflow
def get_underlying_workflow(self, region, describe_output=None): """ :param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object handler of a workflow :rtype: :class:`~dxpy.b...
python
def get_underlying_workflow(self, region, describe_output=None): """ :param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object handler of a workflow :rtype: :class:`~dxpy.b...
[ "def", "get_underlying_workflow", "(", "self", ",", "region", ",", "describe_output", "=", "None", ")", ":", "assert", "(", "describe_output", "is", "None", "or", "describe_output", ".", "get", "(", "'class'", ")", "==", "'globalworkflow'", ")", "if", "region"...
:param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object handler of a workflow :rtype: :class:`~dxpy.bindings.dxworkflow.DXWorkflow` Returns an object handler of an underlying wo...
[ ":", "param", "region", ":", "region", "name", ":", "type", "region", ":", "string", ":", "param", "describe_output", ":", "description", "of", "a", "global", "workflow", ":", "type", "describe_output", ":", "dict", ":", "returns", ":", "object", "handler", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxglobalworkflow.py#L197-L227
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxglobalworkflow.py
DXGlobalWorkflow.append_underlying_workflow_desc
def append_underlying_workflow_desc(self, describe_output, region): """ :param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object description of the global workflow :rtype:...
python
def append_underlying_workflow_desc(self, describe_output, region): """ :param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object description of the global workflow :rtype:...
[ "def", "append_underlying_workflow_desc", "(", "self", ",", "describe_output", ",", "region", ")", ":", "assert", "(", "describe_output", "is", "None", "or", "describe_output", ".", "get", "(", "'class'", ")", "==", "'globalworkflow'", ")", "underlying_workflow_desc...
:param region: region name :type region: string :param describe_output: description of a global workflow :type describe_output: dict :returns: object description of the global workflow :rtype: : dict Appends stages, inputs, outputs and other workflow-specific metadata to...
[ ":", "param", "region", ":", "region", "name", ":", "type", "region", ":", "string", ":", "param", "describe_output", ":", "description", "of", "a", "global", "workflow", ":", "type", "describe_output", ":", "dict", ":", "returns", ":", "object", "descriptio...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxglobalworkflow.py#L229-L250
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxglobalworkflow.py
DXGlobalWorkflow._get_run_input
def _get_run_input(self, workflow_input, project=None, **kwargs): """ Checks the region in which the global workflow is run and returns the input associated with the underlying workflow from that region. """ region = dxpy.api.project_describe(project, ...
python
def _get_run_input(self, workflow_input, project=None, **kwargs): """ Checks the region in which the global workflow is run and returns the input associated with the underlying workflow from that region. """ region = dxpy.api.project_describe(project, ...
[ "def", "_get_run_input", "(", "self", ",", "workflow_input", ",", "project", "=", "None", ",", "*", "*", "kwargs", ")", ":", "region", "=", "dxpy", ".", "api", ".", "project_describe", "(", "project", ",", "input_params", "=", "{", "\"fields\"", ":", "{"...
Checks the region in which the global workflow is run and returns the input associated with the underlying workflow from that region.
[ "Checks", "the", "region", "in", "which", "the", "global", "workflow", "is", "run", "and", "returns", "the", "input", "associated", "with", "the", "underlying", "workflow", "from", "that", "region", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxglobalworkflow.py#L256-L265
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxglobalworkflow.py
DXGlobalWorkflow.run
def run(self, workflow_input, *args, **kwargs): ''' :param workflow_input: Dictionary of the workflow's input arguments; see below for more details :type workflow_input: dict :param instance_type: Instance type on which all stages' jobs will be run, or a dict mapping function names to in...
python
def run(self, workflow_input, *args, **kwargs): ''' :param workflow_input: Dictionary of the workflow's input arguments; see below for more details :type workflow_input: dict :param instance_type: Instance type on which all stages' jobs will be run, or a dict mapping function names to in...
[ "def", "run", "(", "self", ",", "workflow_input", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "DXGlobalWorkflow", ",", "self", ")", ".", "run", "(", "workflow_input", ",", "*", "args", ",", "*", "*", "kwargs", ")" ]
:param workflow_input: Dictionary of the workflow's input arguments; see below for more details :type workflow_input: dict :param instance_type: Instance type on which all stages' jobs will be run, or a dict mapping function names to instance types. These may be overridden on a per-stage basis if stage_...
[ ":", "param", "workflow_input", ":", "Dictionary", "of", "the", "workflow", "s", "input", "arguments", ";", "see", "below", "for", "more", "details", ":", "type", "workflow_input", ":", "dict", ":", "param", "instance_type", ":", "Instance", "type", "on", "w...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxglobalworkflow.py#L275-L311
dnanexus/dx-toolkit
src/python/dxpy/compat.py
unwrap_stream
def unwrap_stream(stream_name): """ Temporarily unwraps a given stream (stdin, stdout, or stderr) to undo the effects of wrap_stdio_in_codecs(). """ wrapped_stream = None try: wrapped_stream = getattr(sys, stream_name) if hasattr(wrapped_stream, '_original_stream'): setat...
python
def unwrap_stream(stream_name): """ Temporarily unwraps a given stream (stdin, stdout, or stderr) to undo the effects of wrap_stdio_in_codecs(). """ wrapped_stream = None try: wrapped_stream = getattr(sys, stream_name) if hasattr(wrapped_stream, '_original_stream'): setat...
[ "def", "unwrap_stream", "(", "stream_name", ")", ":", "wrapped_stream", "=", "None", "try", ":", "wrapped_stream", "=", "getattr", "(", "sys", ",", "stream_name", ")", "if", "hasattr", "(", "wrapped_stream", ",", "'_original_stream'", ")", ":", "setattr", "(",...
Temporarily unwraps a given stream (stdin, stdout, or stderr) to undo the effects of wrap_stdio_in_codecs().
[ "Temporarily", "unwraps", "a", "given", "stream", "(", "stdin", "stdout", "or", "stderr", ")", "to", "undo", "the", "effects", "of", "wrap_stdio_in_codecs", "()", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/compat.py#L206-L218
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
open_dxfile
def open_dxfile(dxid, project=None, mode=None, read_buffer_size=dxfile.DEFAULT_BUFFER_SIZE): ''' :param dxid: file ID :type dxid: string :rtype: :class:`~dxpy.bindings.dxfile.DXFile` Given the object ID of an uploaded file, returns a remote file handler that is a Python file-like object. E...
python
def open_dxfile(dxid, project=None, mode=None, read_buffer_size=dxfile.DEFAULT_BUFFER_SIZE): ''' :param dxid: file ID :type dxid: string :rtype: :class:`~dxpy.bindings.dxfile.DXFile` Given the object ID of an uploaded file, returns a remote file handler that is a Python file-like object. E...
[ "def", "open_dxfile", "(", "dxid", ",", "project", "=", "None", ",", "mode", "=", "None", ",", "read_buffer_size", "=", "dxfile", ".", "DEFAULT_BUFFER_SIZE", ")", ":", "return", "DXFile", "(", "dxid", ",", "project", "=", "project", ",", "mode", "=", "mo...
:param dxid: file ID :type dxid: string :rtype: :class:`~dxpy.bindings.dxfile.DXFile` Given the object ID of an uploaded file, returns a remote file handler that is a Python file-like object. Example:: with open_dxfile("file-xxxx") as fd: for line in fd: ... Not...
[ ":", "param", "dxid", ":", "file", "ID", ":", "type", "dxid", ":", "string", ":", "rtype", ":", ":", "class", ":", "~dxpy", ".", "bindings", ".", "dxfile", ".", "DXFile" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L43-L63
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
new_dxfile
def new_dxfile(mode=None, write_buffer_size=dxfile.DEFAULT_BUFFER_SIZE, expected_file_size=None, file_is_mmapd=False, **kwargs): ''' :param mode: One of "w" or "a" for write and append modes, respectively :type mode: string :rtype: :class:`~dxpy.bindings.dxfile.DXFile` Additional opt...
python
def new_dxfile(mode=None, write_buffer_size=dxfile.DEFAULT_BUFFER_SIZE, expected_file_size=None, file_is_mmapd=False, **kwargs): ''' :param mode: One of "w" or "a" for write and append modes, respectively :type mode: string :rtype: :class:`~dxpy.bindings.dxfile.DXFile` Additional opt...
[ "def", "new_dxfile", "(", "mode", "=", "None", ",", "write_buffer_size", "=", "dxfile", ".", "DEFAULT_BUFFER_SIZE", ",", "expected_file_size", "=", "None", ",", "file_is_mmapd", "=", "False", ",", "*", "*", "kwargs", ")", ":", "dx_file", "=", "DXFile", "(", ...
:param mode: One of "w" or "a" for write and append modes, respectively :type mode: string :rtype: :class:`~dxpy.bindings.dxfile.DXFile` Additional optional parameters not listed: all those under :func:`dxpy.bindings.DXDataObject.new`. Creates a new remote file object that is ready to be written t...
[ ":", "param", "mode", ":", "One", "of", "w", "or", "a", "for", "write", "and", "append", "modes", "respectively", ":", "type", "mode", ":", "string", ":", "rtype", ":", ":", "class", ":", "~dxpy", ".", "bindings", ".", "dxfile", ".", "DXFile" ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L66-L94
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
download_dxfile
def download_dxfile(dxid, filename, chunksize=dxfile.DEFAULT_BUFFER_SIZE, append=False, show_progress=False, project=None, describe_output=None, **kwargs): ''' :param dxid: DNAnexus file ID or DXFile (file handler) object :type dxid: string or DXFile :param filename: Local filename ...
python
def download_dxfile(dxid, filename, chunksize=dxfile.DEFAULT_BUFFER_SIZE, append=False, show_progress=False, project=None, describe_output=None, **kwargs): ''' :param dxid: DNAnexus file ID or DXFile (file handler) object :type dxid: string or DXFile :param filename: Local filename ...
[ "def", "download_dxfile", "(", "dxid", ",", "filename", ",", "chunksize", "=", "dxfile", ".", "DEFAULT_BUFFER_SIZE", ",", "append", "=", "False", ",", "show_progress", "=", "False", ",", "project", "=", "None", ",", "describe_output", "=", "None", ",", "*", ...
:param dxid: DNAnexus file ID or DXFile (file handler) object :type dxid: string or DXFile :param filename: Local filename :type filename: string :param append: If True, appends to the local file (default is to truncate local file if it exists) :type append: boolean :param project: project to us...
[ ":", "param", "dxid", ":", "DNAnexus", "file", "ID", "or", "DXFile", "(", "file", "handler", ")", "object", ":", "type", "dxid", ":", "string", "or", "DXFile", ":", "param", "filename", ":", "Local", "filename", ":", "type", "filename", ":", "string", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L97-L135
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
_download_dxfile
def _download_dxfile(dxid, filename, part_retry_counter, chunksize=dxfile.DEFAULT_BUFFER_SIZE, append=False, show_progress=False, project=None, describe_output=None, **kwargs): ''' Core of download logic. Download file-id *dxid* and store it in a local file *filenam...
python
def _download_dxfile(dxid, filename, part_retry_counter, chunksize=dxfile.DEFAULT_BUFFER_SIZE, append=False, show_progress=False, project=None, describe_output=None, **kwargs): ''' Core of download logic. Download file-id *dxid* and store it in a local file *filenam...
[ "def", "_download_dxfile", "(", "dxid", ",", "filename", ",", "part_retry_counter", ",", "chunksize", "=", "dxfile", ".", "DEFAULT_BUFFER_SIZE", ",", "append", "=", "False", ",", "show_progress", "=", "False", ",", "project", "=", "None", ",", "describe_output",...
Core of download logic. Download file-id *dxid* and store it in a local file *filename*. The return value is as follows: - True means the download was successfully completed - False means the download was stopped because of a retryable error - Exception raised for other errors
[ "Core", "of", "download", "logic", ".", "Download", "file", "-", "id", "*", "dxid", "*", "and", "store", "it", "in", "a", "local", "file", "*", "filename", "*", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L225-L401
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
upload_local_file
def upload_local_file(filename=None, file=None, media_type=None, keep_open=False, wait_on_close=False, use_existing_dxfile=None, show_progress=False, write_buffer_size=None, multithread=True, **kwargs): ''' :param filename: Local filename :type filename: string ...
python
def upload_local_file(filename=None, file=None, media_type=None, keep_open=False, wait_on_close=False, use_existing_dxfile=None, show_progress=False, write_buffer_size=None, multithread=True, **kwargs): ''' :param filename: Local filename :type filename: string ...
[ "def", "upload_local_file", "(", "filename", "=", "None", ",", "file", "=", "None", ",", "media_type", "=", "None", ",", "keep_open", "=", "False", ",", "wait_on_close", "=", "False", ",", "use_existing_dxfile", "=", "None", ",", "show_progress", "=", "False...
:param filename: Local filename :type filename: string :param file: File-like object :type file: File-like object :param media_type: Internet Media Type :type media_type: string :param keep_open: If False, closes the file after uploading :type keep_open: boolean :param write_buffer_size:...
[ ":", "param", "filename", ":", "Local", "filename", ":", "type", "filename", ":", "string", ":", "param", "file", ":", "File", "-", "like", "object", ":", "type", "file", ":", "File", "-", "like", "object", ":", "param", "media_type", ":", "Internet", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L403-L559
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
upload_string
def upload_string(to_upload, media_type=None, keep_open=False, wait_on_close=False, **kwargs): """ :param to_upload: String to upload into a file :type to_upload: string :param media_type: Internet Media Type :type media_type: string :param keep_open: If False, closes the file after uploading ...
python
def upload_string(to_upload, media_type=None, keep_open=False, wait_on_close=False, **kwargs): """ :param to_upload: String to upload into a file :type to_upload: string :param media_type: Internet Media Type :type media_type: string :param keep_open: If False, closes the file after uploading ...
[ "def", "upload_string", "(", "to_upload", ",", "media_type", "=", "None", ",", "keep_open", "=", "False", ",", "wait_on_close", "=", "False", ",", "*", "*", "kwargs", ")", ":", "# Use 'a' mode because we will be responsible for closing the file", "# ourselves later (if ...
:param to_upload: String to upload into a file :type to_upload: string :param media_type: Internet Media Type :type media_type: string :param keep_open: If False, closes the file after uploading :type keep_open: boolean :param wait_on_close: If True, waits for the file to close :type wait_on...
[ ":", "param", "to_upload", ":", "String", "to", "upload", "into", "a", "file", ":", "type", "to_upload", ":", "string", ":", "param", "media_type", ":", "Internet", "Media", "Type", ":", "type", "media_type", ":", "string", ":", "param", "keep_open", ":", ...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L561-L595
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
list_subfolders
def list_subfolders(project, path, recurse=True): ''' :param project: Project ID to use as context for the listing :type project: string :param path: Subtree root path :type path: string :param recurse: Return a complete subfolders tree :type recurse: boolean Returns a list of subfolder...
python
def list_subfolders(project, path, recurse=True): ''' :param project: Project ID to use as context for the listing :type project: string :param path: Subtree root path :type path: string :param recurse: Return a complete subfolders tree :type recurse: boolean Returns a list of subfolder...
[ "def", "list_subfolders", "(", "project", ",", "path", ",", "recurse", "=", "True", ")", ":", "project_folders", "=", "dxpy", ".", "get_handler", "(", "project", ")", ".", "describe", "(", "input_params", "=", "{", "'folders'", ":", "True", "}", ")", "["...
:param project: Project ID to use as context for the listing :type project: string :param path: Subtree root path :type path: string :param recurse: Return a complete subfolders tree :type recurse: boolean Returns a list of subfolders for the remote *path* (included to the result) of the *proje...
[ ":", "param", "project", ":", "Project", "ID", "to", "use", "as", "context", "for", "the", "listing", ":", "type", "project", ":", "string", ":", "param", "path", ":", "Subtree", "root", "path", ":", "type", "path", ":", "string", ":", "param", "recurs...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L597-L619
dnanexus/dx-toolkit
src/python/dxpy/bindings/dxfile_functions.py
download_folder
def download_folder(project, destdir, folder="/", overwrite=False, chunksize=dxfile.DEFAULT_BUFFER_SIZE, show_progress=False, **kwargs): ''' :param project: Project ID to use as context for this download. :type project: string :param destdir: Local destination location :type dest...
python
def download_folder(project, destdir, folder="/", overwrite=False, chunksize=dxfile.DEFAULT_BUFFER_SIZE, show_progress=False, **kwargs): ''' :param project: Project ID to use as context for this download. :type project: string :param destdir: Local destination location :type dest...
[ "def", "download_folder", "(", "project", ",", "destdir", ",", "folder", "=", "\"/\"", ",", "overwrite", "=", "False", ",", "chunksize", "=", "dxfile", ".", "DEFAULT_BUFFER_SIZE", ",", "show_progress", "=", "False", ",", "*", "*", "kwargs", ")", ":", "def"...
:param project: Project ID to use as context for this download. :type project: string :param destdir: Local destination location :type destdir: string :param folder: Path to the remote folder to download :type folder: string :param overwrite: Overwrite existing files :type overwrite: boolean...
[ ":", "param", "project", ":", "Project", "ID", "to", "use", "as", "context", "for", "this", "download", ".", ":", "type", "project", ":", "string", ":", "param", "destdir", ":", "Local", "destination", "location", ":", "type", "destdir", ":", "string", "...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/bindings/dxfile_functions.py#L621-L708
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
build
def build(src_dir, parallel_build=True): """ Runs any build scripts that are found in the specified directory. In particular, runs ``./configure`` if it exists, followed by ``make -jN`` if it exists (building with as many parallel tasks as there are CPUs on the system). """ # TODO: use Gent...
python
def build(src_dir, parallel_build=True): """ Runs any build scripts that are found in the specified directory. In particular, runs ``./configure`` if it exists, followed by ``make -jN`` if it exists (building with as many parallel tasks as there are CPUs on the system). """ # TODO: use Gent...
[ "def", "build", "(", "src_dir", ",", "parallel_build", "=", "True", ")", ":", "# TODO: use Gentoo or deb buildsystem", "config_script", "=", "os", ".", "path", ".", "join", "(", "src_dir", ",", "\"configure\"", ")", "if", "os", ".", "path", ".", "isfile", "(...
Runs any build scripts that are found in the specified directory. In particular, runs ``./configure`` if it exists, followed by ``make -jN`` if it exists (building with as many parallel tasks as there are CPUs on the system).
[ "Runs", "any", "build", "scripts", "that", "are", "found", "in", "the", "specified", "directory", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L93-L123
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
is_link_local
def is_link_local(link_target): """ :param link_target: The target of a symbolic link, as given by os.readlink() :type link_target: string :returns: A boolean indicating the link is local to the current directory. This is defined to mean that os.path.isabs(link_target) == False ...
python
def is_link_local(link_target): """ :param link_target: The target of a symbolic link, as given by os.readlink() :type link_target: string :returns: A boolean indicating the link is local to the current directory. This is defined to mean that os.path.isabs(link_target) == False ...
[ "def", "is_link_local", "(", "link_target", ")", ":", "is_local", "=", "(", "not", "os", ".", "path", ".", "isabs", "(", "link_target", ")", ")", "if", "is_local", ":", "# make sure that the path NEVER extends outside the resources directory!", "d", ",", "l", "=",...
:param link_target: The target of a symbolic link, as given by os.readlink() :type link_target: string :returns: A boolean indicating the link is local to the current directory. This is defined to mean that os.path.isabs(link_target) == False and the link NEVER references the parent ...
[ ":", "param", "link_target", ":", "The", "target", "of", "a", "symbolic", "link", "as", "given", "by", "os", ".", "readlink", "()", ":", "type", "link_target", ":", "string", ":", "returns", ":", "A", "boolean", "indicating", "the", "link", "is", "local"...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L140-L165
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
_fix_perms
def _fix_perms(perm_obj): """ :param perm_obj: A permissions object, as given by os.stat() :type perm_obj: integer :returns: A permissions object that is the result of "chmod a+rX" on the given permission object. This is defined to be the permission object bitwise or-ed with...
python
def _fix_perms(perm_obj): """ :param perm_obj: A permissions object, as given by os.stat() :type perm_obj: integer :returns: A permissions object that is the result of "chmod a+rX" on the given permission object. This is defined to be the permission object bitwise or-ed with...
[ "def", "_fix_perms", "(", "perm_obj", ")", ":", "ret_perm", "=", "perm_obj", "|", "stat", ".", "S_IROTH", "|", "stat", ".", "S_IRGRP", "|", "stat", ".", "S_IRUSR", "if", "ret_perm", "&", "stat", ".", "S_IXUSR", ":", "ret_perm", "=", "ret_perm", "|", "s...
:param perm_obj: A permissions object, as given by os.stat() :type perm_obj: integer :returns: A permissions object that is the result of "chmod a+rX" on the given permission object. This is defined to be the permission object bitwise or-ed with all stat.S_IR*, and if the stat.S_IXU...
[ ":", "param", "perm_obj", ":", "A", "permissions", "object", "as", "given", "by", "os", ".", "stat", "()", ":", "type", "perm_obj", ":", "integer", ":", "returns", ":", "A", "permissions", "object", "that", "is", "the", "result", "of", "chmod", "a", "+...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L167-L182
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
upload_resources
def upload_resources(src_dir, project=None, folder='/', ensure_upload=False, force_symlinks=False): """ :param ensure_upload: If True, will bypass checksum of resources directory and upload resources bundle unconditionally; will NOT be able to reuse this bundl...
python
def upload_resources(src_dir, project=None, folder='/', ensure_upload=False, force_symlinks=False): """ :param ensure_upload: If True, will bypass checksum of resources directory and upload resources bundle unconditionally; will NOT be able to reuse this bundl...
[ "def", "upload_resources", "(", "src_dir", ",", "project", "=", "None", ",", "folder", "=", "'/'", ",", "ensure_upload", "=", "False", ",", "force_symlinks", "=", "False", ")", ":", "applet_spec", "=", "_get_applet_spec", "(", "src_dir", ")", "if", "project"...
:param ensure_upload: If True, will bypass checksum of resources directory and upload resources bundle unconditionally; will NOT be able to reuse this bundle in future builds. Else if False, will compute checksum and upload bundle ...
[ ":", "param", "ensure_upload", ":", "If", "True", "will", "bypass", "checksum", "of", "resources", "directory", "and", "upload", "resources", "bundle", "unconditionally", ";", "will", "NOT", "be", "able", "to", "reuse", "this", "bundle", "in", "future", "build...
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L195-L424
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
upload_applet
def upload_applet(src_dir, uploaded_resources, check_name_collisions=True, overwrite=False, archive=False, project=None, override_folder=None, override_name=None, dx_toolkit_autodep="stable", dry_run=False, **kwargs): """ Creates a new applet object. :param project: ID of container in which to create the a...
python
def upload_applet(src_dir, uploaded_resources, check_name_collisions=True, overwrite=False, archive=False, project=None, override_folder=None, override_name=None, dx_toolkit_autodep="stable", dry_run=False, **kwargs): """ Creates a new applet object. :param project: ID of container in which to create the a...
[ "def", "upload_applet", "(", "src_dir", ",", "uploaded_resources", ",", "check_name_collisions", "=", "True", ",", "overwrite", "=", "False", ",", "archive", "=", "False", ",", "project", "=", "None", ",", "override_folder", "=", "None", ",", "override_name", ...
Creates a new applet object. :param project: ID of container in which to create the applet. :type project: str, or None to use whatever is specified in dxapp.json :param override_folder: folder name for the resulting applet which, if specified, overrides that given in dxapp.json :type override_folder: ...
[ "Creates", "a", "new", "applet", "object", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L427-L666
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
_create_or_update_version
def _create_or_update_version(app_name, version, app_spec, try_update=True): """ Creates a new version of the app. Returns an app_id, or None if the app has already been created and published. """ # This has a race condition since the app could have been created or # published since we last look...
python
def _create_or_update_version(app_name, version, app_spec, try_update=True): """ Creates a new version of the app. Returns an app_id, or None if the app has already been created and published. """ # This has a race condition since the app could have been created or # published since we last look...
[ "def", "_create_or_update_version", "(", "app_name", ",", "version", ",", "app_spec", ",", "try_update", "=", "True", ")", ":", "# This has a race condition since the app could have been created or", "# published since we last looked.", "try", ":", "app_id", "=", "dxpy", "....
Creates a new version of the app. Returns an app_id, or None if the app has already been created and published.
[ "Creates", "a", "new", "version", "of", "the", "app", ".", "Returns", "an", "app_id", "or", "None", "if", "the", "app", "has", "already", "been", "created", "and", "published", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L669-L690
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
_update_version
def _update_version(app_name, version, app_spec, try_update=True): """ Updates a version of the app in place. Returns an app_id, or None if the app has already been published. """ if not try_update: return None try: app_id = dxpy.api.app_update("app-" + app_name, version, app_spe...
python
def _update_version(app_name, version, app_spec, try_update=True): """ Updates a version of the app in place. Returns an app_id, or None if the app has already been published. """ if not try_update: return None try: app_id = dxpy.api.app_update("app-" + app_name, version, app_spe...
[ "def", "_update_version", "(", "app_name", ",", "version", ",", "app_spec", ",", "try_update", "=", "True", ")", ":", "if", "not", "try_update", ":", "return", "None", "try", ":", "app_id", "=", "dxpy", ".", "api", ".", "app_update", "(", "\"app-\"", "+"...
Updates a version of the app in place. Returns an app_id, or None if the app has already been published.
[ "Updates", "a", "version", "of", "the", "app", "in", "place", ".", "Returns", "an", "app_id", "or", "None", "if", "the", "app", "has", "already", "been", "published", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L692-L706
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
create_app_multi_region
def create_app_multi_region(regional_options, app_name, src_dir, publish=False, set_default=False, billTo=None, try_versions=None, try_update=True, confirm=True): """ Creates a new app object from the specified applet(s). :param regional_options: Region-specific options for the ...
python
def create_app_multi_region(regional_options, app_name, src_dir, publish=False, set_default=False, billTo=None, try_versions=None, try_update=True, confirm=True): """ Creates a new app object from the specified applet(s). :param regional_options: Region-specific options for the ...
[ "def", "create_app_multi_region", "(", "regional_options", ",", "app_name", ",", "src_dir", ",", "publish", "=", "False", ",", "set_default", "=", "False", ",", "billTo", "=", "None", ",", "try_versions", "=", "None", ",", "try_update", "=", "True", ",", "co...
Creates a new app object from the specified applet(s). :param regional_options: Region-specific options for the app. See https://wiki.dnanexus.com/API-Specification-v1.0.0/Apps#API-method:-/app/new for details; this should contain keys for each region the app is to be enabled in, and for th...
[ "Creates", "a", "new", "app", "object", "from", "the", "specified", "applet", "(", "s", ")", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L709-L724
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
create_app
def create_app(applet_id, applet_name, src_dir, publish=False, set_default=False, billTo=None, try_versions=None, try_update=True, confirm=True, regional_options=None): """ Creates a new app object from the specified applet. .. deprecated:: 0.204.0 Use :func:`create_app_multi_region()...
python
def create_app(applet_id, applet_name, src_dir, publish=False, set_default=False, billTo=None, try_versions=None, try_update=True, confirm=True, regional_options=None): """ Creates a new app object from the specified applet. .. deprecated:: 0.204.0 Use :func:`create_app_multi_region()...
[ "def", "create_app", "(", "applet_id", ",", "applet_name", ",", "src_dir", ",", "publish", "=", "False", ",", "set_default", "=", "False", ",", "billTo", "=", "None", ",", "try_versions", "=", "None", ",", "try_update", "=", "True", ",", "confirm", "=", ...
Creates a new app object from the specified applet. .. deprecated:: 0.204.0 Use :func:`create_app_multi_region()` instead.
[ "Creates", "a", "new", "app", "object", "from", "the", "specified", "applet", "." ]
train
https://github.com/dnanexus/dx-toolkit/blob/74befb53ad90fcf902d8983ae6d74580f402d619/src/python/dxpy/app_builder.py#L727-L740