Add new example based on Anton's bamtools split work and label all the outputs as visible - this should likely be the default but until it is might as well demonstrate them as visible since that is how they are most useful.
It was stubbing out connection stuff which worked fine when running test on its own - but after any test sets up the sql alchemy mappings this breaks down because events are trying to fire. This just uses actual model classes - which is just as easy anyway really.
Tool mapping "structure" logic no longer assumes tool outputs are datasets - could also potentially handle logic related to structure of output collections as well now.
These variable names will make for sense down the road when tools that explicitly create collections exist and can be mapped over.
Don't write out encode identifier, add to dict, and then reload object in dataset collection service - just pass through the object in the dictionary as is.
With refactoring to reduce cyclomatic complexity. Also renaming 'input_ext' what it actually is 'random_input_ext'. We should fix that or at least issue a huge warning if we detect 'input' could have reasonable been different things.
Reusing this logic will be useful in the context of creating datasets belonging to output collections. This also breaks up the big loop slightly and allows a small reduction in cyclomatic complexity in subsequent refactoring.
Breaks up the big loop in execute a little bit but will enable a much bigger breakup in subsequent refactoring because the loop will no longer have to update the object_store_id local variable - that will be tracked in new object.
Directly setting format attribute, setting to format to 'input' (ambigious, non-deterministic and should be deprecated IMO), using format_source, and using change_format actions.
Add data labels so the tools works in the workflow editor and added a conditional switches to some with collection params and multiple input data parameters to test some state-y logic in workflow editor.
- run_functional_tests.sh can be replaced with the backward compatible run_tests.sh.
- run_unit_tests.sh can be replaced with `run_tests.sh --unit` (or just -u)
- run_tool_shed_functional_tests.sh can be replaced with `./run_tests.sh -toolshed` (or just -t).
In each case run_tests.sh provides better documentation and superior argument parsing.
Detail bug report from Michael Crusoe here : https://trello.com/c/0mdGCx4P.
This also fixes a test case added in 289e48b which was both attempting to assert something wrong and was incorrectly implemented. Augmenting the workflow editor test suite with some actually valid test cases that assert the correct behaviors.
For a longer explaination - workflow input terminals have two related concepts 'canAccept' and 'attachable'. An output terminal is 'attachable' if in the abstract it could be attached to the input regardless of whether the input is already filled or not. 'canAccept' is more stateful in that an output terminal is 'canAccept'able if the input terminal is not filled ('_inputFilled') and it is 'attachable'.
So - the problem was 'attachable' was not correctly defined for a multiple input data parameters. 'attachable' was asserting that any connected input terminal could not be 'attachable' by an collection output terminal - so on these asynchronous node state changes collections attached to multiple input data parameters were being wiped out. The more percise/correct distinction is that if a multiple input data parameter has single inputs connected to it - it cannot also have a collection connected to it (yet anyway). This fixes the mentioned bug.
The problematic test case was conflating 'attachable' and 'canAccept'able - I have fixed the test case to verify the correct 'attachable' logic and added newer, higher level test cases to test the canAccept logic and the actual behavior the end user would observe (of the connector being destroy).
Doesn't seem to actually break the workflows because Galaxy tries to assign the value to the parameter afterward - fails and assigns it to None anyway and then connects up everything - but it does cause the workflow editor to pop-up an annoying warning about this value change.