2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/edab395a78b1/ Changeset: edab395a78b1 Branch: tool_api User: Kyle Ellrott Date: 2013-10-25 01:34:30 Summary: Adding output_name to /api/tool submit output. So files created by a tool can be mapped to the possible multiple output declaration it could have Affected #: 1 file diff -r bf0057b13f58f5c5438f1a6477b27bfceb14a2ce -r edab395a78b1f9d27bc2f2d233b2ded002b3080a lib/galaxy/webapps/galaxy/api/tools.py --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -119,14 +119,18 @@ return { "message": { "type": "error", "data" : vars[ 'errors' ] } } # TODO: check for errors and ensure that output dataset(s) are available. - output_datasets = vars.get( 'out_data', {} ).values() + output_datasets = vars.get( 'out_data', {} ).iteritems() rval = { "outputs": [] } outputs = rval[ "outputs" ] #TODO:?? poss. only return ids? - for output in output_datasets: + for output_name, output in output_datasets: output_dict = output.to_dict() + #add the output name back into the output data structure + #so it's possible to figure out which newly created elements + #correspond with which tool file outputs + output_dict['output_name'] = output_name outputs.append( trans.security.encode_dict_ids( output_dict ) ) return rval https://bitbucket.org/galaxy/galaxy-central/commits/115a6924dc4c/ Changeset: 115a6924dc4c User: jmchilton Date: 2013-10-25 04:08:11 Summary: Merged in kellrott/galaxy-central/tool_api (pull request #243) Adding output_name to /api/tool submit output Matching client code added to blend4j: https://github.com/jmchilton/blend4j/commit/991ec2b30fd538c0b8e97aa55e681aae.... Thanks for the contribution Kyle! Affected #: 1 file diff -r 97cb7306dc345ce5e81861e421c5277701161802 -r 115a6924dc4c459467ca162e10ee24ba04001a1e lib/galaxy/webapps/galaxy/api/tools.py --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -119,14 +119,18 @@ return { "message": { "type": "error", "data" : vars[ 'errors' ] } } # TODO: check for errors and ensure that output dataset(s) are available. - output_datasets = vars.get( 'out_data', {} ).values() + output_datasets = vars.get( 'out_data', {} ).iteritems() rval = { "outputs": [] } outputs = rval[ "outputs" ] #TODO:?? poss. only return ids? - for output in output_datasets: + for output_name, output in output_datasets: output_dict = output.to_dict() + #add the output name back into the output data structure + #so it's possible to figure out which newly created elements + #correspond with which tool file outputs + output_dict['output_name'] = output_name outputs.append( trans.security.encode_dict_ids( output_dict ) ) return rval Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.