8000 v0.16.26 by dheiman · Pull Request #137 · broadinstitute/fiss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dismiss alert

v0.16.26 #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Change Log for FISSFC: the (Fi)recloud (S)ervice (S)elector
=======================================================================
Terms used below: HL = high level interface, LL = low level interface

v0.16.26 - LL: added copyFilesWithPrefix parameter to clone_workspace,
create_submission no longer includes entity name and type in its
payload when they are not set; HL: added copyFilesWithPrefix
parameter to space_clone, config_start no longer requires entity to
be set in order to enable running non-data model configs.

v0.16.25 - HL: multiple enhancements to mop; only delete unreferenced files
generated by workflows, ignore more files generated by the execution
engine (e.g. rc, script, stdout, stderr), report file sizes, allow
Expand Down
2 changes: 1 addition & 1 deletion firecloud/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Package version
__version__ = "0.16.25"
__version__ = "0.16.26"
16 changes: 12 additions & 4 deletions firecloud/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ def list_submissions(namespace, workspace):
return __get(uri)

def create_submission(wnamespace, workspace, cnamespace, config,
entity, etype, expression=None, use_callcache=True):
entity=None, etype=None, expression=None, use_callcache=True):
"""Submit job in FireCloud workspace.

Args:
Expand All @@ -1058,11 +1058,15 @@ def create_submission(wnamespace, workspace, cnamespace, config,
body = {
"methodConfigurationNamespace" : cnamespace,
"methodConfigurationName" : config,
"entityType" : etype,
"entityName" : entity,
"useCallCache" : use_callcache
}

if etype:
body['entityType'] = etype

if entity:
body['entityName'] = entity

if expression:
body['expression'] = expression

Expand Down Expand Up @@ -1246,7 +1250,7 @@ def update_workspace_acl(namespace, workspace, acl_updates, invite_users_not_fou
return __SESSION.patch(uri, headers=headers, data=json.dumps(acl_updates))

def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace,
authorizationDomain=""):
authorizationDomain="", copyFilesWithPrefix=None):
"""Clone a FireCloud workspace.

A clone is a shallow copy of a FireCloud workspace, enabling
Expand All @@ -1258,6 +1262,7 @@ def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace,
to_namespace (str): project to which target workspace belongs
to_workspace (str): Target workspace's name
authorizationDomain: (str) required authorization domains
copyFilesWithPrefix: (str) prefix of bucket objects to copy to the destination workspace

Swagger:
https://api.firecloud.org/#!/Workspaces/cloneWorkspace
Expand All @@ -1277,6 +1282,9 @@ def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace,
"attributes": dict(),
"authorizationDomain": authDomain,
}

if copyFilesWithPrefix is not None:
body["copyFilesWithPrefix"] = copyFilesWithPrefix

uri = "workspaces/{0}/{1}/clone".format(from_namespace, from_workspace)
return __post(uri, json=body)
Expand Down
16 changes: 12 additions & 4 deletions firecloud/fiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def space_clone(args):
return 1

r = fapi.clone_workspace(args.project, args.workspace, args.to_project,
args.to_workspace)
args.to_workspace, args.copyFilesWithPrefix)
fapi._check_response_code(r, 201)

if fcconfig.verbosity:
Expand Down Expand Up @@ -567,6 +567,10 @@ def config_start(args):
args.namespace = fcconfig.method_ns
if not args.namespace:
raise RuntimeError("namespace not provided, or configured by default")

# If no entity name is given, unset entity_type
if args.entity is None:
args.entity_type = None

r = fapi.create_submission(args.project, args.workspace,args.namespace,
args.config, args.entity, args.entity_type,
Expand Down Expand Up @@ -2100,6 +2104,8 @@ def main(argv=None):
'be different from the workspace being cloned'
subp = subparsers.add_parser('space_clone', description=clone_desc,
parents=[workspace_parent, dest_space_parent])
subp.add_argument('-f', '--copyFilesWithPrefix', help='Specify a prefix ' +
'of bucket objects to copy to the destination workspace')
subp.set_defaults(func=space_clone)

# Import data into a workspace
Expand Down Expand Up @@ -2495,12 +2501,14 @@ def main(argv=None):
# Invoke a method configuration
subp = subparsers.add_parser('config_start',
description='Start running workflow in a given space',
parents=[workspace_parent, conf_parent, entity_parent])
parents=[workspace_parent, conf_parent])
subp.add_argument('-e', '--entity', help="Entity name (required if " +
"executing on an entity)")
# Duplicate entity type here since we want sample_set to be default
subp.add_argument('-t', '--entity-type', default='sample_set',
choices=etype_choices,
help='Entity type to assign null values, if attribute ' +
'is missing. Default: %(default)s')
help='Entity type of specified entity. Not used if no ' +
'entity is named. Default: %(default)s')
expr_help = "(optional) Entity expression to use when entity type " \
"doesn't match the method configuration." \
"Example: 'this.samples'"
Expand Down
0