Skip to content

Commit

Permalink
readd params argument to rerun_invocation, add note about runtime par…
Browse files Browse the repository at this point in the history
…ams to docs
  • Loading branch information
simonbray committed May 19, 2021
1 parent 586aac6 commit de65c1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions bioblend/galaxy/invocations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def show_invocation(self, invocation_id):
return self._get(url=url)

def rerun_invocation(self, invocation_id: str, remap: bool = False, inputs_update: Optional[dict] = None,
history_id: Optional[str] = None,
params_update: Optional[dict] = None, history_id: Optional[str] = None,
history_name: Optional[str] = None, import_inputs_to_history: bool = False,
replacement_params: Optional[dict] = None, allow_tool_state_corrections: bool = False,
inputs_by: Optional[str] = None, parameters_normalized: bool = False):
Expand All @@ -156,6 +156,12 @@ def rerun_invocation(self, invocation_id: str, remap: bool = False, inputs_updat
invocation, this should contain a mapping of workflow inputs to the new
datasets and dataset collections.
:type params: dict
:param params: If different non-dataset tool parameters should be
used to the original invocation, this should contain a mapping of the
new parameter values. Runtime parameters should be specified through
``inputs_update``.
:type history_id: str
:param history_id: The encoded history ID where to store the workflow
outputs. Alternatively, ``history_name`` may be specified to create a
Expand Down Expand Up @@ -222,7 +228,8 @@ def rerun_invocation(self, invocation_id: str, remap: bool = False, inputs_updat
for inp, input_value in inputs_update.items():
inputs[inp] = input_value
payload = {'inputs': inputs}

if params:
payload['parameters'] = params
if replacement_params:
payload['replacement_params'] = replacement_params
if history_id:
Expand Down
3 changes: 2 additions & 1 deletion bioblend/galaxy/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ def run_workflow(self, workflow_id, dataset_map=None, params=None,
(e.g. ``{'23': {'id': '29beef4fadeed09f', 'src': 'ld'}}``)
:type params: dict
:param params: A mapping of non-datasets tool parameters (see below)
:param params: A mapping of non-datasets tool parameters (see below). Runtime parameters
should be specified through ``inputs``.
:type history_id: str
:param history_id: The encoded history ID where to store the workflow
Expand Down

0 comments on commit de65c1e

Please sign in to comment.