Commit Graph
50 Commits
Author SHA1 Message Date
mvdbeek dff6307e91 Allow DCE as outer input to to_cwl 2024-06-07 17:29:07 +02:00
mvdbeek a2cb91487a Merge branch 'release_23.1' into release_23.2 2024-01-15 12:05:09 +01:00
mvdbeek 01502917f7 Fix `to_cwl` for nested collections
Fixes
```
TypeError
Object of type DatasetCollection is not JSON serializable
```
seen when running https://github.com/galaxyproject/iwc/pull/315
2024-01-12 12:24:59 +01:00
John Chilton dce53769bd Implement default locations for data and collection parameters.
Works for both files and collections. Workflow defaults override tool defaults.

TODO:

- Unit test case to ensure this only works for non-default, non-multi data parameters.
- Implement XSD once syntax is finalized.
2023-11-01 11:52:44 -04:00
mvdbeek eb8a49d805 Drop delayed_tool_init config setting 2023-08-26 10:08:13 +02:00
mvdbeek 5cbc192c31 Merge branch 'release_23.1' into dev 2023-08-23 17:14:39 +02:00
mvdbeek c001ce0dcc Fix conditional step evaluation with datasets in repeats
For instance when this is the step state:

```
{
    queries: [
        {
            __index__: 0,
            inputs2: ["<galaxy.model.HistoryDatasetAssociation(141277566) at 0x7fc2099417f0>"]
        }
    ],
when: False
}
```

as seen in https://sentry.galaxyproject.org/share/issue/995445a10402461aa80328db5ceba491/
2023-08-22 18:14:25 +02:00
mvdbeek edeaf26720 Drop delayed_tool_init config setting 2023-08-17 11:44:29 +02:00
Nicola Soranzo 30f60493c3 Format Python code with black 23.1.0
with manual fixes to 3 files to make them compatible with black 22.12.0 .

We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00
John Chilton 1efec9f8ba Address some of the new mypy notes about unchecked annotations. 2022-12-11 23:28:12 -05:00
mvdbeek 66c143fc12 Inject modules & connections, then build runtime state for all steps
That means steps can reason about connections that otherwise wouldn't
have modules attached when building runtime inputs.
2022-10-28 17:05:51 +02:00
mvdbeek 8a8acc625f Fix refactor action dropping outputs on subworkflow connection
I thought it would be cleaner to make a distinction between the output
name and the output label when reasoning about a subworkflow step in
the context of a parent workflow
(https://github.com/galaxyproject/galaxy/pull/14473/commits/b0727be9e0b096a2dacacb767a1f4ac0fc3e6540#diff-a50bcc5c08ade11249449c4100ea8c286727df601b52a5b9588eb2a385d97da7R543),
in case we'd later want to do something with the label.

I don't think I thought about this correctly though,
and it breaks connections between steps that were made by referencing
the subworkflow's output name.

This wasn't necessary for the main goal of
https://github.com/galaxyproject/galaxy/pull/14473, so I'm partially
reverting that here.

Fixes https://github.com/galaxyproject/planemo/pull/1262#issuecomment-1223874571
2022-08-23 14:12:29 +02:00
mvdbeek b0727be9e0 Fix change_datatype not reflected in tool and workflow output terminals 2022-08-16 15:46:11 +02:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
John Chilton 7006e2a7e5 More unit test fixes. 2021-10-08 11:04:00 -04:00
Nicola Soranzo 9d74bba7fb Drop support for retired Python 3.5
Upgrade syntax using `pyupgrade --py36-plus` .

Manually drop several `six` imports.

Also:
- Remove broken pr_cache in scripts/bootstrap_history.py
- Fix broken prefix removal in lib/galaxy/tool_util/deps/mulled/mulled_build.py
2020-10-07 11:52:13 +01:00
guerler 0547ec6cfc Do not automatically overwrite the output labels for subworkflows 2020-06-26 15:29:46 -04:00
mvdbeek 785cfce3fa Fix unit tests 2020-04-25 20:40:26 +02:00
John Chilton 26d5150245 Eliminate extensions=['input_collection'].
The existing hack of extensions=['input'] is bad enough and should work fine for collections. Not sure what past-John was thinking by adding this.
2019-12-11 12:26:32 -05:00
mvdbeek 5e8cbcd5b4 Allow connecting ExpressionTool outputs to inputs of correct type
This means we can now connect these tools in the workflow editor.
2019-03-20 12:55:04 +01:00
mvdbeek d36d1a25e6 Simple filter_output
This obviously doesn't work (yet) with filters that work
on the input dataset, but this already removes a lot of
outputs that arent' going to be produced based on static
options. Since exceptions default to priduing the dataset
this isn't much harm.
2019-03-05 11:26:08 +01:00
mvdbeek 667f8aa761 Only add collection_type if collection_type has been specified
We don't force the collection_type to be set in any way.
We might want to think about defaulting to list if not specified,
but that's not for now.
2019-01-28 17:12:50 +01:00
mvdbeek 6a4307609d Unit test resolve_collection_type 2019-01-23 15:25:44 +01:00
John Chilton 67efd072ae Track workflow step input definitions in our model.
We don't track workflow step inputs in any formal way in our model currently. This has resulted in some current hacks and prevents future enhancements. This commit splits WorkflowStepConnection into two models WorkflowStepInput and WorkflowStepConnection - normalizing the previous table workflow_step_connection on input step and input name.

In terms of current hacks forced on it by restricting all of tool state to be confined to a big JSON blob in the database - we have problems distinguishing keys and values when walking tool state. As we store more and more JSON blobs inside of the giant tool state blob - the worse this problem gets. Take for instance checking for runtime parameters or the rules parameter values - these both use JSON blobs that aren't simple values, so it is hard to tell looking at the tool state blob in the database or the workflow export to tell what is a key or what is a value. Tracking state as normalized inputs with default values and explicit attributes runtime values should allow much more percise state definition and construction.

This variant of the models would also potentially allow defining runtime values with non-tool default values (so default values defined for the workflow but still explicitly settable at runtime). The combinations of overriding defaults and defining runtime values were not representable before.

In terms of future enhancements, there is a lot we cannot track with the current models - such as map/reduce options for collection operations (https://github.com/galaxyproject/galaxy/issues/4623#issuecomment-389544980). This should enable a lot of that. Obviously there are a lot of attributes defined here that are not yet utilized, but I'm using most (all?) of them downstream in the CWL branch. I'd rather populate this table fully realized and fill in the implementation around it as work continues to stream in from the CWL branch - to keep things simple and avoid extra database migrations. But I understand if this feels like speculative complexity we want to avoid despite the implementation being readily available for inspection downstream.
2018-11-15 21:34:02 +01:00
mvdbeek 60c4162ffa Fix unit tests that access output label 2018-09-26 14:29:22 +02:00
mvdbeek a44baa5642 Look up collection_type if collection_type_source is set
We do this in the wf-editor and in the backend, so this works for
subworkflows. This should make quite some tools more usable in a
workflow scenario. Should fix
- https://github.com/galaxyproject/galaxy/issues/6514
- https://github.com/galaxyproject/galaxy/issues/6012
- https://github.com/galaxyproject/galaxy/issues/6569
- https://github.com/galaxyproject/galaxy/issues/1889
and perhaps more issues related to this.
2018-09-18 17:11:40 +02:00
guerler 028d07323d Adjust test case 2018-03-31 03:08:25 -04:00
Nicola Soranzo 2cd95c48f6 Fix import order everywhere
- Add flake8-import-order to flake8 Pipfile and remove py27-lint-imports
  and py27-lint-imports-include-list tox envs
- Fix most E201 and E202 errors reported by flake8-import-order v0.15,
  but pin flake8-import-order to v0.14.3 until
  https://github.com/PyCQA/flake8-import-order/issues/123
  is fixed

This let us drop 2 jobs on Travis per each job.
2017-11-14 19:42:39 +00:00
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00
guerler 05687b8a19 Strip debug output 2017-02-22 13:03:43 -05:00
guerler ae751adac8 Adjust unit test to use labels instead of name through state 2017-02-22 12:14:23 -05:00
guerler c4c870991a Fix blank lines 2016-12-28 04:08:04 -05:00
guerler ebbeecd7b3 Adjust unit tests 2016-12-27 21:18:58 -05:00
guerler 648d717298 Improve state building resilience, fix test cases 2016-12-08 10:24:35 -05:00
guerler 61df5ac6f5 Remove redundant and unused update state from test cases, replace with recover state 2016-12-05 17:57:40 -05:00
Nicola Soranzo a8746c4f52 Fix import order and Python3 compatibility for test/unit/ 2016-11-16 10:29:09 +00:00
Nicola Soranzo 1d17a29c79 Fixes for pycodestyle 2.2.0 2016-11-15 16:56:50 +00:00
guerler 96b1274b12 Remove encode_runtime_state 2016-03-05 13:00:02 -05:00
guerler 9f5b7a5f66 Revise tool state encryption, remove copy/paste hacks 2016-03-05 12:34:14 -05:00
Eric Rasche 5a441044fb Merge pull request #1308 from jmchilton/multi_collection_types
Allow input collections to specify multiple collection types.
2016-01-04 14:43:37 -06:00
John Chilton 157939aa8f Implement nested workflows.
Details:

 - Add a new workflow module describing subworkflows.
 - Add workflow list to editor side panel - with options to link in a subworkflow module or copy the target workflow into the workflow being editted node for node.
 - Update workflow, workflow step, and workflow invocation models to track subworkflow connections and execution.
 - Extend workflow outputs with concepts of labels (and UUIDs while I'm there) to match workflow inputs. This allow us to have something to label outputs with in the workflow editor and to reference in the format 2 workflow description language.
 - Extend workflow editor UI to allow labeling workflow outputs (and enforce that these are unique across a workflow).
 - Extend workflow invocation and progress tracking to allow invoking a subworkflow as part of another workflow invocation.
 - Extend workflow import and export code to allow a nested representation of workflows.
 - Update format 2 workflow description to allow testing nested workflows.

Most relevant new and modified test cases can be run using the following commands:

```
./run_tests.sh -api test/api/test_workflows.py:WorkflowsApiTestCase.test_run_subworkflow_simple
./run_tests.sh -api test/api/test_workflows_from_yaml.py:WorkflowsFromYamlApiTestCase.test_subworkflow_simple
./run_tests.sh -api test/api/test_workflows_from_yaml.py:WorkflowsFromYamlApiTestCase.test_outputs
nosetests test/unit/test_galaxy_mapping.py
nosetests test/unit/workflows/test_workflow_progress.py
```
2015-12-16 15:22:18 +00:00
John Chilton 8af5671953 Allow input collections to specify mutiple collection types.
Parallelling format specifier which can take multiple formats.
2015-12-13 13:38:50 +00:00
John Chilton f6d26c9ee6 Small refactor making workflow views and modules tad more generic.
- Reduce duplication between initializing generic modules and tool modules.
 - Switch tool_id to content_id as variable names throughout the client.
 - Rename get_tool_id to get_content_id on workflow modules.
 - Add some minimal documentation to the workflow module about get_content_id.

Downstream in the subworkflow commit I switch the over-the-wire communication to use content_id instead of tool_id also and use content_ids to refer to workflow ids in subworkflow moduls.
2015-12-06 10:43:09 +00:00
Nate Coraor f334764627 Egg cleaning in test/ 2015-09-22 10:32:16 -04:00
John Chilton 974a4c124f Introduce abstraction shielding toolbox.tools_by_id from galaxy.workflow.modules.
That was the last module outside of ToolBox itself that was accessing tools_by_id directly.
2014-12-26 09:55:27 -05:00
John Chilton 30e44896be Better OOP design for separation between input and input collection modules.
(Lot easier now that I understand what all of the module methods are doing and have an example of a 4th module downstream.) Now with even more unit tests.
2014-09-12 09:32:22 -04:00
John Chilton 5f6e5bd5e9 More workflow module documentation improvements.
I nearly understand workflow modules...
2014-09-12 09:32:22 -04:00
John Chilton f2735a693d Work on workflow module testing. 2014-09-11 16:01:08 -04:00
John Chilton e1c0d419fd Delete incorrect unit test added in d15f9a1.
Don't know what I was thinking - it doesn't look like that method ever had that behavior.
2014-09-03 08:43:25 -04:00
John Chilton 4dcfe4c561 Some very basic unit tests and docs for workflow modules.
Just a start - I need to keep going with this and test and document all methods.
2014-08-26 10:02:49 -04:00