-
Notifications
You must be signed in to change notification settings - Fork 80
Analysis refactor allow users change dflt params #2136
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
Changes from all commits
3601c29
0d6788e
12406cc
958fcbe
a57ef23
2ead7a6
73a78e7
e64a22a
0dcae8b
4a5bbbc
f99975c
ed899a8
d508320
025cc1e
599bcde
d12ccfe
b33983b
b4f1b1f
62a1b93
2e36141
e006e20
c174693
131dd6a
ccb55bd
dfe2e83
15fcceb
7f97f2a
9eb9dbb
23104d7
1f1e826
19a9dda
19889f9
4e380e0
6f0dd71
ed9fc65
4b19b45
d9b41e8
5ef06ae
5e3504a
d10096a
661342f
fcd249b
f3c1216
a91a6fd
7b9fa6f
33bcbe5
5e4bd9b
8bf3d6e
7807bac
6360675
811b7a7
751d4ad
65a86df
b1817dd
18d77e1
01c656c
53188a6
1ab4e3b
1e8332e
cb67d3d
5a5127d
0033480
3e3f6e1
6a20c1b
a1b3c90
3809ad5
067f14f
cf4862d
3b07151
a6595a9
6343b49
a3505c2
c8113ea
f4835d5
f731768
7542658
e0180e8
f55ca5c
1fa4b19
b61ae87
bb68303
b31a025
378d7ff
444da08
f6b4c46
e9d3af3
69b6412
60cd430
be099cb
819e9a5
e941fa7
d6ebcb4
6ada2ba
7d70a38
e8ca9db
4bf4808
aa68a21
0c6ffa7
586660b
6cdc574
7bae13e
cf801a4
7c2454e
c2eb6ae
aeeac62
2795046
a77b040
ff9eda9
6145976
7153efb
46dd73d
08eafaa
b1a3e99
c9580b7
85d4aa7
1ffa231
9e14cc6
4cd34d2
bf33527
3529556
ca5a331
b934d68
fa00d60
b2ac959
0326a63
cd6b61c
cccb1d4
0a584f3
a33d14f
66986ab
3e36212
e04d03d
dc3a51e
12235a7
f5c5811
08554e1
04a0c26
4330dae
3b8acdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,13 +41,15 @@ def process_artifact_handler_get_req(artifact_id): | |
'study_id': artifact.study.id} | ||
|
||
|
||
def list_commands_handler_get_req(artifact_types): | ||
def list_commands_handler_get_req(artifact_types, exclude_analysis): | ||
"""Retrieves the commands that can process the given artifact types | ||
|
||
Parameters | ||
---------- | ||
artifact_types : str | ||
Comma-separated list of artifact types | ||
exclude_analysis : bool | ||
If True, return commands that are not part of the analysis pipeline | ||
|
||
Returns | ||
------- | ||
|
@@ -62,7 +64,8 @@ def list_commands_handler_get_req(artifact_types): | |
artifact_types = artifact_types.split(',') | ||
cmd_info = [ | ||
{'id': cmd.id, 'command': cmd.name, 'output': cmd.outputs} | ||
for cmd in Command.get_commands_by_input_type(artifact_types)] | ||
for cmd in Command.get_commands_by_input_type( | ||
artifact_types, exclude_analysis=exclude_analysis)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm remain not jazzed about the arbitrary binary partitioning of commands but I think I'm out voted on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "arbitrary" partitioning is matching the "upstream" and "downstream" commands that has been in Qiime for a long time. i.e. commands that you need to run to get a BIOM table, and commands that you run in a BIOM table to gain insight. |
||
|
||
return {'status': 'success', | ||
'message': '', | ||
|
@@ -92,21 +95,22 @@ def list_options_handler_get_req(command_id): | |
return {'status': 'success', | ||
'message': '', | ||
'options': options, | ||
'req_options': command.required_parameters} | ||
'req_options': command.required_parameters, | ||
'opt_options': command.optional_parameters} | ||
|
||
|
||
def workflow_handler_post_req(user_id, dflt_params_id, req_params): | ||
def workflow_handler_post_req(user_id, command_id, params): | ||
"""Creates a new workflow in the system | ||
|
||
Parameters | ||
---------- | ||
user_id : str | ||
The user creating the workflow | ||
dflt_params_id : int | ||
The default parameters to use for the first command of the workflow | ||
req_params : str | ||
JSON representations of the required parameters for the first | ||
command of the workflow | ||
command_id : int | ||
The first command to execute in the workflow | ||
params : str | ||
JSON representations of the parameters for the first command of | ||
the workflow | ||
|
||
Returns | ||
------- | ||
|
@@ -116,9 +120,7 @@ def workflow_handler_post_req(user_id, dflt_params_id, req_params): | |
'message': str, | ||
'workflow_id': int} | ||
""" | ||
dflt_params = DefaultParameters(dflt_params_id) | ||
req_params = loads(req_params) | ||
parameters = Parameters.from_default_params(dflt_params, req_params) | ||
parameters = Parameters.load(Command(command_id), json_str=params) | ||
wf = ProcessingWorkflow.from_scratch(User(user_id), parameters) | ||
# this is safe as we are creating the workflow for the first time and there | ||
# is only one node. Remember networkx doesn't assure order of nodes | ||
|
@@ -136,14 +138,14 @@ def workflow_handler_post_req(user_id, dflt_params_id, req_params): | |
|
||
def workflow_handler_patch_req(req_op, req_path, req_value=None, | ||
req_from=None): | ||
"""Patches an ontology | ||
"""Patches a workflow | ||
|
||
Parameters | ||
---------- | ||
req_op : str | ||
The operation to perform on the ontology | ||
The operation to perform on the workflow | ||
req_path : str | ||
The ontology to patch | ||
Path parameter with the workflow to patch | ||
req_value : str, optional | ||
The value that needs to be modified | ||
req_from : str, optional | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this check be done immediately after line 285?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, line 291 makes sure that
dflt_val
is a list so this call works as expected.