Skip to content

Commit 66e6b64

Browse files
authored
FISS v0.16.37 (broadinstitute#186)
api.py * get_workflow_metadata updated to include the arguments include_key, exclude_key, and expand_sub_workflows.
1 parent e973cbd commit 66e6b64

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Change Log for FISSFC: the (Fi)recloud (S)ervice (S)elector
33
================================================================================
44
Terms used below: HL = high level interface, LL = low level interface
55

6+
v0.16.37 - LL: enhanced get_workflow_metadata to include the arguments
7+
include_key, exclude_key, and expand_sub_workflows to match the API.
8+
69
v0.16.36 - Hotfix: the old billing API is being removed, HL and LL updated to
710
use the new one; Makefile updated to ensure image is built for
811
linux/amd64; Dockerfile updated to use latest Python-3.10.

firecloud/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Package version
2-
__version__ = "0.16.36"
2+
__version__ = "0.16.37"

firecloud/api.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,21 +1293,38 @@ def get_submission(namespace, workspace, submission_id):
12931293
workspace, submission_id)
12941294
return __get(uri)
12951295

1296-
def get_workflow_metadata(namespace, workspace, submission_id, workflow_id):
1296+
def get_workflow_metadata(namespace, workspace, submission_id, workflow_id,
1297+
include_key=None, exclude_key=None,
1298+
expand_sub_workflows=False):
12971299
"""Request the metadata for a workflow in a submission.
12981300
12991301
Args:
13001302
namespace (str): project to which workspace belongs
13011303
workspace (str): Workspace name
13021304
submission_id (str): Submission's unique identifier
13031305
workflow_id (str): Workflow's unique identifier.
1306+
include_key (array[str]): When specified, return only these keys in the
1307+
response. Matches any key in the response, including within nested
1308+
blocks. May not be used with exclude_key.
1309+
exclude_key (array[str]): When specified, omit these keys from the
1310+
response. Matches any key in the response, including within nested
1311+
blocks. May not be used with include_key.
1312+
expand_sub_workflows (bool): When true, metadata for sub workflows will
1313+
be fetched and inserted automatically in the metadata response.
13041314
13051315
Swagger:
13061316
https://api.firecloud.org/#!/Submissions/workflowMetadata
13071317
"""
13081318
uri = "workspaces/{0}/{1}/submissions/{2}/workflows/{3}".format(namespace,
13091319
workspace, submission_id, workflow_id)
1310-
return __get(uri)
1320+
params = {}
1321+
if include_key is not None:
1322+
params["includeKey"] = include_key
1323+
if exclude_key is not None:
1324+
params["excludeKey"] = exclude_key
1325+
if expand_sub_workflows:
1326+
params["expandSubWorkflows"] = expand_sub_workflows
1327+
return __get(uri, params=params)
13111328

13121329
def get_workflow_outputs(namespace, workspace, submission_id, workflow_id):
13131330
"""Request the outputs for a workflow in a submission.
@@ -1514,7 +1531,7 @@ def update_workspace_acl(namespace, workspace, acl_updates, invite_users_not_fou
15141531
return __SESSION.patch(uri, headers=headers, data=json.dumps(acl_updates))
15151532

15161533
def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace,
1517-
authorizationDomain="", copyFilesWithPrefix=None):
1534+
authorizationDomain="", copyFilesWithPrefix=None, bucketLocation=None):
15181535
"""Clone a FireCloud workspace.
15191536
15201537
A clone is a shallow copy of a FireCloud workspace, enabling
@@ -1549,6 +1566,8 @@ def clone_workspace(from_namespace, from_workspace, to_namespace, to_workspace,
15491566

15501567
if copyFilesWithPrefix is not None:
15511568
body["copyFilesWithPrefix"] = copyFilesWithPrefix
1569+
if bucketLocation is not None:
1570+
body["bucketLocation"] = bucketLocation
15521571

15531572
uri = "workspaces/{0}/{1}/clone".format(from_namespace, from_workspace)
15541573
return __post(uri, json=body)

0 commit comments

Comments
 (0)