Skip to content
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

Async update: support to collections #4198

Merged
merged 5 commits into from Aug 7, 2017

Conversation

Projects
None yet
5 participants
@fabio-cumbo
Copy link
Member

commented Jun 15, 2017

The asynchronous procedure expects that only one output is defined in the tool XML schema. This improvement permits to define also collections.

This feature is useful in conjunction with tools like galaxy-json-collect-data-source (please see the README of the tool for more information).

Backward compatibility:

It does not affect the behaviour of the asynchronous data sources previously developed.

How to test:

GDCWebApp, a web service to automatically query, filter, extract and convert all Genomic Data Commons experiments to BED format, has been recently develoed. It is possible to use the service as an asynchronous data source by installing the gdcwebapp Galaxy tool available in the Tool Shed. It exploits the new galaxy-json-collect-data-source tool and It obviously need this version of the async.py to work properly.

Async update 20170615
The asynchronous procedure expects that only one output is defined in
the tool XML schema. This improvement permits to define also
collections. This feature is useful in conjunction with tools like
[galaxy-json-collect-data-source](https://github.com/fabio-cumbo/galaxy-
json-collect-data-source) (please see the README of the tool for more
information).
It does not affect the behaviour of the asynchronous data sources
previously developed.

@galaxybot galaxybot added the triage label Jun 15, 2017

@galaxybot galaxybot added this to the 17.09 milestone Jun 15, 2017

@fabio-cumbo

This comment has been minimized.

Copy link
Member Author

commented Jun 15, 2017

Thanks @martenson

@martenson

This comment has been minimized.

Copy link
Member

commented Jun 16, 2017

@fabio-cumbo the travis errors is a result of linting fail, you might want to look into it, click on the 'details' here

@fabio-cumbo

This comment has been minimized.

Copy link
Member Author

commented Jun 21, 2017

@martenson could you please confirm me that it is ok now?

fabio-cumbo added a commit to fabio-cumbo/tools-iuc that referenced this pull request Jun 23, 2017

GDCWebApp pull request 20170623
Galaxy tool for the GDCWebApp asynchronous data source. A detailed
description of the service is reported on
[https://github.com/fabio-cumbo/GDCWebApp4Galaxy](https://github.com/fab
io-cumbo/GDCWebApp4Galaxy). This tool requires the version
[#4198](galaxyproject/galaxy#4198) of
*async.py* to work properly.
@bgruening

This comment has been minimized.

Copy link
Member

commented Jun 23, 2017

@blankenberg can we have a review here :)

# exclude outputs different from ToolOutput (e.g. collections) from the previous assumption
continue
if outputs_count > 1:
raise Exception( "Error: the tool should have just one output" )

This comment has been minimized.

Copy link
@blankenberg

blankenberg Jul 10, 2017

Member

This exception appears unreachable.

This comment has been minimized.

Copy link
@fabio-cumbo

fabio-cumbo Jul 11, 2017

Author Member

This exception will be thrown for the tools that do not respect the constraint of defining just one output in the xml schema (except for collections), as described in the comment Assume there is exactly one output. Does it make sense for you?

This comment has been minimized.

Copy link
@blankenberg

blankenberg Jul 11, 2017

Member

As written,outputs_count can only ever be 0 or 1, since there is a break after the only incrementation.

This comment has been minimized.

Copy link
@fabio-cumbo

fabio-cumbo Jul 12, 2017

Author Member

my mistake, thanks @blankenberg

if params.data_type:
GALAXY_TYPE = params.data_type
elif params.galaxyFileFormat == 'wig': # this is an undocumented legacy special case
GALAXY_TYPE = 'wig'
else:
GALAXY_TYPE = params.GALAXY_TYPE or tool.outputs.values()[0].format

This comment has been minimized.

Copy link
@blankenberg

blankenberg Jul 10, 2017

Member

If GALAXY_TYPE is provided, we don't need to do any of the looping below. Probably more straightforward to have

elif params.GALAXY_TYPE:
    GALAXY_TYPE = params.GALAXY_TYPE
else: #logic below w/o the params.GALAXY_TYPE.

This comment has been minimized.

Copy link
@fabio-cumbo

fabio-cumbo Jul 11, 2017

Author Member

It makes sense, I have separated that case, thanks

minor update 20170711
if GALAXY_TYPE is provided, we do not need to loop over
tool.outputs.values()
GALAXY_TYPE = obj.format
outputs_count += 1
break
except:

This comment has been minimized.

Copy link
@blankenberg

blankenberg Jul 11, 2017

Member

except Exception:

This comment has been minimized.

Copy link
@fabio-cumbo

fabio-cumbo Jul 11, 2017

Author Member

done

TOOL_OUTPUT_TYPE = obj.format
params[tool.outputs.keys()[idx]] = data.id
break
except:

This comment has been minimized.

Copy link
@blankenberg

blankenberg Jul 11, 2017

Member

except Exception:

We generally want to avoid bare excepts

This comment has been minimized.

Copy link
@fabio-cumbo

fabio-cumbo Jul 11, 2017

Author Member

Ok, clear, thanks

@blankenberg

This comment has been minimized.

Copy link
Member

commented Jul 12, 2017

This comment is still outstanding: #4198 (comment)

@fabio-cumbo

This comment has been minimized.

Copy link
Member Author

commented Jul 12, 2017

Fixed, thanks

@martenson martenson added status/review and removed status/WIP labels Aug 4, 2017

@martenson

This comment has been minimized.

Copy link
Member

commented Aug 7, 2017

Thank you @fabio-cumbo !

@martenson martenson merged commit d2394aa into galaxyproject:dev Aug 7, 2017

5 checks passed

api test Build finished. 279 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 150 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 37 tests run, 0 skipped, 0 failed.
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.