Commit Graph
8160 Commits
Author SHA1 Message Date
Marius van den Beek bc248efe2a Merge pull request #17982 from galaxybot/dev_auto_update_dependencies
Update Python dependencies
2024-04-17 10:34:30 +02:00
Nicola Soranzo 1fef07cb24 Replace pytest-celery with `celery.contrib.pytest` plugin loading
The new 1.0.0 version of pytest-celery will move towards a Docker-based
approach for smoke and production-like testing, bringing in a number of
dependencies that we don't currently need.
Since the pre-1.0.0 version of pytest-celery was just a shim for
``celery.contrib.pytest``, we can simply load the latter for API,
integration and Selenium tests.
2024-04-16 17:16:52 +01:00
davelopez 34461f2c1a Update notification creation and sharing logic
This commit updates the notification creation and sharing logic to include the `galaxy_url` field in the `NotificationCreateRequest` and `SharedItemNotificationFactory` classes. This field is used to generate links in the notification content and is passed as an argument when sending notifications to recipients.
2024-04-16 17:31:55 +02:00
davelopez 123904aced Adapt notification integration tests to work w/o tasks 2024-04-16 17:31:53 +02:00
davelopez 349c373a99 Run notification integration tests without celery 2024-04-16 17:06:20 +02:00
davelopez bb6f68852f Schedule periodic notifications tasks only when enabled 2024-04-16 17:06:20 +02:00
Nicola Soranzo 053ca5198e Enable `warn_unused_ignores` mypy option 2024-04-16 01:12:58 +01:00
Nicola Soranzo dcb6f061f6 Don't install Galaxy packages in editable mode when testing them
When enabling the `warn_unused_ignores = True` option of mypy, this
was making the `test_galaxy_packages` tests fail with:

```
mypy .
Traceback (most recent call last):
  File "/tmp/gxpkgtestenvu3fgDr/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
  File "/tmp/gxpkgtestenvu3fgDr/lib/python3.10/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
  File "mypy/main.py", line 100, in main
  File "mypy/main.py", line 182, in run_build
  File "mypy/build.py", line 192, in build
  File "mypy/build.py", line 266, in _build
  File "mypy/build.py", line 2942, in dispatch
  File "mypy/build.py", line 3333, in process_graph
  File "mypy/build.py", line 3414, in process_fresh_modules
  File "mypy/build.py", line 2110, in fix_cross_refs
  File "mypy/fixup.py", line 52, in fixup_module
  File "mypy/fixup.py", line 127, in visit_symbol_table
  File "mypy/lookup.py", line 49, in lookup_fully_qualified
AssertionError: Cannot find component 'util' for 'galaxy.util'
make: *** [Makefile:96: mypy] Error 1
```

Moreover, installing packages in editable mode was hiding some issues
with how files from other packages were accessed.
2024-04-16 01:12:57 +01:00
Nicola Soranzo 2317db70c6 Move `test_vault.py` unit tests to correct package directory 2024-04-15 23:43:49 +01:00
Dannon 450e48af88 Merge pull request #17968 from jmchilton/error_reporting_unit_tests
Error reporting unit tests
2024-04-15 12:39:34 -04:00
John Davis bf62b25eee Merge pull request #17922 from jdavcs/dev_model_edits1
Model edits and bug fixes
2024-04-11 20:30:25 -04:00
John Chilton 822f8121f8 Unit test for email error reporting. 2024-04-11 16:14:13 -04:00
John Chilton 5edf79ce0c tool error integration test 2024-04-11 10:09:05 -04:00
mvdbeek bfb31656dd Merge branch 'release_24.0' into dev 2024-04-09 17:08:48 +02:00
Marius van den Beek f4c40199e4 Merge pull request #17858 from mvdbeek/fix_tool_version_switch_in_editor
[24.0] Fix tool version switch in editor
2024-04-09 16:38:49 +02:00
mvdbeek e3b56f13f4 Adjust integration test for additional conditional 2024-04-09 11:50:52 +02:00
Martin Cech fdb18ad0a0 Merge branch 'release_24.0' into 240todev 2024-04-08 16:54:06 -07:00
mvdbeek b3217607ea Fix version switching error in workflow editor 2024-04-08 17:16:56 +02:00
mvdbeek b971e33263 Fix Qiime2 display_peek method
Fixes:
```
ExceptionGroup: unhandled errors in a TaskGroup
  File "starlette/_utils.py", line 87, in collapse_excgroups
    yield
  File "starlette/middleware/base.py", line 190, in __call__
    async with anyio.create_task_group() as task_group:
  File "anyio/_backends/_asyncio.py", line 678, in __aexit__
    raise BaseExceptionGroup(
AttributeError: 'NoneType' object has no attribute 'replace'
  File "starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
  File "galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
  File "starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "starlette/routing.py", line 74, in app
    response = await func(request)
  File "fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
  File "anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "galaxy/webapps/galaxy/api/history_contents.py", line 465, in index
    items = self.service.index(
  File "galaxy/webapps/galaxy/services/history_contents.py", line 312, in index
    return self.__index_v2(trans, history_id, params, serialization_params, filter_query_params, accept)
  File "galaxy/webapps/galaxy/services/history_contents.py", line 992, in __index_v2
    items = [
  File "galaxy/webapps/galaxy/services/history_contents.py", line 993, in <listcomp>
    self._serialize_content_item(
  File "galaxy/webapps/galaxy/services/history_contents.py", line 1064, in _serialize_content_item
    rval = serializer.serialize_to_view(
  File "galaxy/managers/base.py", line 785, in serialize_to_view
    return self.serialize(item, all_keys, **context)
  File "galaxy/managers/hdas.py", line 614, in serialize
    return super().serialize(hda, keys, user=user, **context)
  File "galaxy/managers/datasets.py", line 770, in serialize
    serialized = super().serialize(dataset_assoc, keys, **context)
  File "galaxy/managers/base.py", line 698, in serialize
    returned[key] = self.serializers[key](item, key, **context)
  File "galaxy/managers/datasets.py", line 633, in <lambda>
    "peek": lambda item, key, **context: item.display_peek() if item.peek and item.peek != "no peek" else None,
  File "galaxy/model/__init__.py", line 4669, in display_peek
    return self.datatype.display_peek(self)
  File "galaxy/datatypes/qiime2.py", line 57, in display_peek
    table += [make_row(pair) for pair in self._peek(dataset, simple=True)]
  File "galaxy/datatypes/qiime2.py", line 57, in <listcomp>
    table += [make_row(pair) for pair in self._peek(dataset, simple=True)]
  File "galaxy/datatypes/qiime2.py", line 54, in make_row
    return f"<tr><th>{pair[0]}</th><td>{html.escape(pair[1])}</td></tr>"
  File "__init__.py", line 19, in escape
    s = s.replace("&", "&amp;") # Must be done first!
```
2024-04-08 16:25:34 +02:00
John Davis ee47b93cc0 Fix type error in workflow unit test 2024-04-08 09:55:35 -04:00
John Davis 09fee6aaad Remove future, autocommit args from session and engine creation 2024-04-05 13:54:39 -04:00
mvdbeek 6f2a04321d Merge branch 'release_24.0' into dev 2024-04-04 18:55:04 +02:00
John Chilton 661d93ab2a Merge pull request #17869 from mvdbeek/drop_dummy_replacement
[24.0] Fix workflow run form failing on certain histories
2024-04-04 11:06:54 -04:00
Nicola Soranzo 4a4ead2b5e Merge branch 'release_24.0' into dev 2024-04-04 12:57:27 +01:00
Marius van den Beek 28c8b2fdd2 Merge pull request #17866 from kostrykin/verify_imagediff_iou/upstream
Add `pin_labels` attribute for `image_diff` comparison method
2024-04-03 17:19:47 +02:00
John Davis af53d03c0a Merge pull request #17778 from jdavcs/dev_sa20
SQLAlchemy 2.0
2024-04-03 10:19:00 -04:00
Nicola Soranzo 4984523c39 Change test with no outputs to not fail
``out_3`` has been removed in https://github.com/galaxyproject/galaxy/pull/17874 .
2024-04-03 13:11:36 +01:00
Nicola Soranzo 406c22e980 Merge branch 'release_24.0' into dev 2024-04-02 18:18:53 +01:00
mvdbeek 626baad567 Refactor RuntimeValue utils for re-use
Moving this to tools.parameters.workflow_utils avoids a circular
dependency when importing is_runtime_value in
tools.parameters.dynamic_options.
2024-04-02 19:10:20 +02:00
mvdbeek 55029be8eb Avoid get_initial_value when we have a tool state
It's not guaranteed this will always work, and it's unnecessary if
we have e.g. `ConnectedValue` in a workflow context.
2024-04-02 19:10:20 +02:00
mvdbeek 969e995a9b Add test tool w/ dynamic select in conditional
Include this in a workflow, and notice that the run form breaks
if the history contains a dataset that trips up the dynamic parameter.
2024-04-02 19:10:20 +02:00
John Davis f52d35bf7f Use NullPool for sqlite engines
This restores the behavior under SQLAlchemy 1.4
(Note that we set the pool for sqlite only if it's not an in-memory db
2024-04-02 10:08:53 -04:00
John Davis 28fd6ad99b Fix package mypy errors 2024-04-02 10:08:53 -04:00
John Davis 78a77d934a Mypy: typing errors, misc. fixes 2024-04-02 10:08:53 -04:00
John Davis 511816e51d Mypy: type-ignore: scoped_session vs. install_model_session
We use the disctinction for DI.
2024-04-02 10:08:53 -04:00
John Davis f1579e13de Fix typing error: use Session instead of scoped_session
No need to pass around scoped_session as arguments
2024-04-02 10:08:53 -04:00
John Davis fb018c54bc Fix SA2.0 error: use Row._mapping for keyed attribute access
Ref: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#result-rows-act-like-named-tuples
2024-04-02 10:08:53 -04:00
M Bernt e1ec2c8b28 Update test/functional/tools/output_filter.xml 2024-04-02 09:46:55 +02:00
M Bernt ae594c18bc Add back test output 2024-04-02 09:46:55 +02:00
Matthias Bernt 46abd27123 make test a bit more specific 2024-04-02 09:46:55 +02:00
Matthias Bernt 6687cdc3ca adapt output filter test
- remove the output that is always present
- add a test that has no outputs
2024-04-02 09:46:22 +02:00
Leonid Kostrykin cdfc3f0e57 Add pin_labels attribute for image_diff comparison method 2024-03-29 12:01:34 +01:00
John Chilton 383057d9b8 Linting fix. 2024-03-27 13:25:50 -04:00
John Chilton 77ef4a3896 objectstores storage management (UI+API) 2024-03-27 10:22:59 -04:00
Matthias Bernt af612e9342 add linting for valid EDAM terms 2024-03-26 09:40:15 +01:00
mvdbeek 06a07bb295 Merge branch 'release_24.0' into dev 2024-03-21 19:08:38 +01:00
John Davis 7af9c3d127 Merge pull request #17728 from jmchilton/history_update_bug
[24.0] Fix source history update_time being updated when importing a public history
2024-03-21 12:35:02 -04:00
Marius van den Beek 429c63e856 Merge pull request #17797 from kostrykin/tifffile
Add support for floating point TIFF files in verification of image-based tool outputs
2024-03-20 15:54:22 +01:00
mvdbeek cd16d19d8a Merge branch 'release_24.0' into dev 2024-03-20 15:50:39 +01:00
Leonid Kostrykin 45a819ebc8 Adds tifffile support for image assertions 2024-03-20 10:12:17 +01:00