Commit Graph
180 Commits
Author SHA1 Message Date
mvdbeek 073acf5801 Add typing around get_tool / has_tool 2025-05-05 15:16:31 +02:00
John Chilton 75c4bd1abf Build dataset collection input definition on the client. 2025-04-21 10:37:01 -04:00
guerler d3eb5a6b76 Fix linting 2025-03-21 12:29:58 -04:00
guerler 750915f3e5 Adjust unit tests 2025-03-21 12:27:07 -04:00
guerler 8c40e3f933 Add another test case for invocation id replacement 2025-03-21 10:13:39 -04:00
guerler 3dec0e3df0 Add test cases and enable cell based markdown editor in workflow reports 2025-03-21 10:13:39 -04:00
guerler dd6fda14da Amend description of resolve_invocation_markdown 2025-03-07 08:08:42 -05:00
guerler fec24a7e3a Fix test comment 2025-03-07 08:06:23 -05:00
guerler 8caaa6bc27 Remove duplicate test case 2025-03-07 08:04:40 -05:00
guerler 8d0fd266f2 Expand unit tests to conversion from populated state to resolved state for pdf export 2025-03-06 22:09:36 -05:00
guerler 09d69e4fb6 Adjust test case 2025-03-06 22:09:36 -05:00
guerler 80ecc6a717 Adjust markdown manager test 2025-03-06 22:09:15 -05:00
guerler 1548b8f10c Fix failing unit test 2025-03-06 22:09:15 -05:00
guerler 018aec937c Fix import in unit test 2025-03-06 22:09:15 -05:00
guerler 4b140606d7 Modify backend such that invocation ids and labels are preserved as equivalent alternative to resource ids 2025-03-06 22:09:14 -05:00
mvdbeek dbc264c3ce Merge branch 'release_24.2' into dev 2025-02-05 10:19:16 +01:00
mvdbeek 1d31d5b3cd Merge branch 'release_24.1' into release_24.2 2025-02-05 10:15:07 +01:00
mvdbeek 65824fc70e Fix extracting workflows from purged and deleted histories 2025-02-04 11:40:15 +01:00
mvdbeek 8a282ae3e4 Add/fix type annotation relevant to subworkflow_progress method 2025-02-03 17:02:00 +01:00
John Davis f39702b8f5 Remove transaction helper from test.unit.workflows 2025-01-23 11:39:24 -05:00
mvdbeek f4ee34f507 Record NO_REPLACEMENT as step output for unspecified value 2024-12-19 12:51:09 +01:00
mvdbeek 48ed0682dc Move TRS import into WorkflowContentManager
which fixes missing source metadata when importing a workflow through a
landing page.
2024-10-30 17:32:23 +01:00
mvdbeek f4a779e45f Fix unit tests 2024-10-20 18:34:57 -04:00
mvdbeek 67fff6ac73 Allow using TRS ids as workflow id in workflow landing requst 2024-10-15 15:25:38 +02:00
John Davis b261dea43a Randomize test user email to respect unique constraint 2024-09-20 17:24:20 -04:00
mvdbeek 9da413cf7b Merge branch 'release_24.1' into dev 2024-09-19 11:39:11 +02:00
mvdbeek 64e74b8b48 Tighten TRS url check
Fixes
https://sentry.galaxyproject.org/share/issue/5b8d495edd6545278d4d93d0ed69ac3a/:
```
Message
Uncaught exception in exposed API method:
Stack Trace

Newest

gaierror: [Errno -2] Name or service not known
  File "urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "socket.py", line 962, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8e35406450>: Failed to establish a new connection: [Errno -2] Name or service not known
  File "urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
  File "urllib3/connectionpool.py", line 416, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "http/client.py", line 1286, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "http/client.py", line 1332, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "http/client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "http/client.py", line 1041, in _send_output
    self.send(msg)
  File "http/client.py", line 979, in send
    self.connect()
  File "urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
MaxRetryError: HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //training.galaxyproject.org/training-material//api/ga4gh/trs/v2/tools/variant-analysis-microbial-variants/versions/microbial_variant_calling/GALAXY/descriptor (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8e35406450>: Failed to establish a new connection: [Errno -2] Name or service not known'))
  File "requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
  File "urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
ConnectionError: HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //training.galaxyproject.org/training-material//api/ga4gh/trs/v2/tools/variant-analysis-microbial-variants/versions/microbial_variant_calling/GALAXY/descriptor (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8e35406450>: Failed to establish a new connection: [Errno -2] Name or service not known'))
  File "galaxy/web/framework/decorators.py", line 346, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "galaxy/webapps/galaxy/api/workflows.py", line 261, in create
    archive_data = server.get_version_descriptor(trs_tool_id, trs_version_id)
  File "galaxy/workflow/trs_proxy.py", line 115, in get_version_descriptor
    return self._get(trs_api_url)["content"]
  File "galaxy/workflow/trs_proxy.py", line 126, in _get
    response = requests.get(url, params=params, timeout=DEFAULT_SOCKET_TIMEOUT)
  File "galaxy/util/requests.py", line 29, in wrapper
    rval = f(*args, **kwargs)
  File "requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
```
which happened for https://usegalaxy.org/workflows/trs_import?run_form=true&trs_url=http%3A%2F%2Flocalhost%3A4000%2F%2Ftraining-material%2F%2Fapi%2Fga4gh%2Ftrs%2Fv2%2Ftools%2Fvariant-analysis-microbial-variants%2Fversions%2Fmicrobial_variant_calling"
2024-09-18 10:31:23 +02:00
Anthony Bretaudeau 41741041e0 Fix worklfow typo here and there 2024-07-10 15:18:31 +02:00
mvdbeek a2fdcb3c72 Merge branch 'release_24.0' into release_24.1 2024-06-08 15:54:19 +02:00
mvdbeek c6930fff72 Merge branch 'release_23.2' into release_24.0 2024-06-08 15:53:41 +02:00
mvdbeek dff6307e91 Allow DCE as outer input to to_cwl 2024-06-07 17:29:07 +02:00
John Davis ee47b93cc0 Fix type error in workflow unit test 2024-04-08 09:55:35 -04:00
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