Commit Graph
148 Commits
Author SHA1 Message Date
mvdbeek 03f01da108 Merge branch 'release_23.2' into dev 2024-01-15 12:09:43 +01: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
mvdbeek 649895eb8d .dict() -> .model_dump() 2024-01-08 11:33:32 +01:00
John Chilton 7e515a6504 Fix workflow report to target right workflow version.
There was a past jmchilton todo in the code base about it. Directives that might target particular versions of a workflow (so workflow_display and workflow_image) now can take a workflow_version attribute and when these things are auto-populated for workflow invocations - they are populated with the right version for the invocation.
2023-11-17 13:09:09 -05:00
John Chilton 0d55fd0a84 Progress on workflow default files. 2023-11-01 16:08:28 -04: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
John Chilton f1c2dde09f Protocol to try to break up app for cleaner tool shed install typing. 2023-09-26 13:46:53 -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 6d067f47b5 Merge branch 'release_23.0' into release_23.1 2023-08-23 17:09:50 +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
John Davis e54a2ec897 Fix SA2.0 syntax (query->select) in unit tests
Includes multiple upgrades to syntax.
Ref: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-orm-usage
2023-07-21 13:04:22 -04:00
John Davis f8d28c2bf6 Wrap session.flush in test.unit.workflows 2023-06-09 13:05:26 -04: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 788b231cd2 Merge remote-tracking branch 'origin/dev' into trs-url-import 2022-12-13 10:11:57 -05:00
Nicola Soranzo 85a92be30a Merge pull request #15177 from jmchilton/fixup_refactoring_types
Fixup types surrounding workflow refactoring testing.
2022-12-13 10:48:41 +00:00
John ChiltonandNicola Soranzo 3cc3938ebb Update test/unit/workflows/test_refactor_models.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-12-12 19:34:57 -05:00
John Chilton ca8fc29436 Small tweaks to test_refactor_models. 2022-12-12 18:22:06 -05:00
John Chilton 59044511f5 Merge branch 'fixup_refactoring_types' into trs-url-import 2022-12-12 10:20:27 -05:00
John Chilton 0180bf67a1 Fixup types surrounding workflow refactoring testing. 2022-12-12 10:18:20 -05:00
John Chilton 1efec9f8ba Address some of the new mypy notes about unchecked annotations. 2022-12-11 23:28:12 -05:00
Finn Bacall 96e69879a0 use is None instead of == None 2022-12-05 13:02:59 +00:00
Finn Bacall c5bc5aa857 Fix formatting issues
`make format`
`make client-format`
2022-12-05 13:02:59 +00:00
Finn Bacall 02d829ddb3 Match tool IDs with slashes, and unquote them. 2022-12-05 13:02:59 +00:00
Finn Bacall 4bf41470b5 Unit tests for TrsProxy changes 2022-12-05 13:02:59 +00:00
Finn Bacall 159cade2d1 Allow workflows to be imported directly from TRS URLs
...without prior knowledge of the TRS server

galaxyproject/galaxy#14636
2022-12-05 13:02:59 +00:00
mvdbeek accdea9b14 Always inject all modules, then compute runtime state 2022-10-29 22:11:03 +02: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
Nicola Soranzo c35d8f2a06 Replace `unittest.TestCase` with pytest-based partial re-implementation
Also:
- Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected
  by pytest only because they were `unittest.TestCase` derived, but normally
  pytest collects only test classes whose name starts with `Test`, see
  https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
2022-09-27 03:34:58 +01:00
Marius van den Beek 955815ca11 Merge pull request #14688 from mvdbeek/dev
Merge 22.05 into dev
2022-09-26 15:19:53 +02:00
mvdbeek cbd38554f1 Merge branch 'release_22.05' into dev 2022-09-26 15:15:19 +02:00
John Chilton 550d29493f Merge pull request #14683 from mvdbeek/type_annotation_workflow_run
Add type hints for galaxy.workflow.{run, run_request}
2022-09-23 09:14:46 -04:00
mvdbeek 81b2f3e1e1 Add ModuleInjector, avoids test type mismatch 2022-09-23 10:19:02 +02:00
mvdbeek 48c654d1b2 Add type hint for galaxy.workflow.{run, run_request}
Trying out https://github.com/dropbox/pyannotate here.
It's still a lot of work even with pyannotate, but I think this fixes
some minor oddities, like assigning non-mapped attributes to
WorkflowInvocation instances.
2022-09-23 09:33:47 +02:00
Nicola Soranzo b5c7e2c86a Replace `self.assert* method calls with plain asserts in test/`
using https://github.com/pytest-dev/unittest2pytest with the following command:

```
unittest2pytest -f self_assert -w -n test/
```

(excluding ``self.assertRaises*`` method calls).
2022-09-21 23:50:05 +01:00
mvdbeek 64cb245ddd Fix running subworkflows with disconnected optional/default inputs 2022-09-21 19:31:41 +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
John Chilton abb69b552c Implement API endpoints and tests for workflow sharing options. 2022-04-13 15:37:43 -04:00
John Chilton 427847bcc4 Fix up some import "issues". 2022-03-16 14:22:50 -04: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
John Chilton 8f9034a414 Typing fixes for various unit tests. 2021-10-05 13:22:41 -04:00
mvdbeek 6d22b6da28 Merge branch 'release_21.05' into dev 2021-06-10 15:37:59 +02:00
mvdbeek f6f4c7e6b7 Fix unit tests after removing get_tool_id 2021-06-10 08:53:49 +02:00
mvdbeek bf78f40bf6 Merge branch 'release_21.05' into dev 2021-06-03 10:23:52 +02:00
Sergey Golitsynskiy fb179aa66d Rename unit test helper classes (workflow support) 2021-06-01 15:08:17 -04:00
Sergey Golitsynskiy 0b094438e0 Enable pytest class-based tests; add flag if n/a 2021-06-01 12:30:25 -04:00