41 Commits
Author SHA1 Message Date
mvdbeek 376e5801a9 Merge branch 'release_26.1' into dev 2026-09-01 11:05:53 +02:00
Keith Suderman 156a3f3a1b Fix visualization plugin static URLs when Galaxy is served under a URL prefix 2026-08-24 09:00:27 -04:00
paperbenni bec3d3ad9c Drop support for Python 3.8
Drop Python 3.8 support in 5 Pulsar-compatible packages
(job_metrics, tool_util, tool_util_models, util, objectstore)
and run pyupgrade --py310-plus on their source code.

- Bump requires-python from >=3.8 to >=3.10 in all 5 packages
- Remove Python 3.8 and 3.9 classifiers
- Remove ruff per-file-ignores for UP rules on these paths
- Remove backports.zoneinfo conditional dependency
- Remove pydyf<0.11 pin from conditional-requirements.txt
- Update Makefile pyupgrade target (remove PY38_PYUPGRADE_PATHS)
- Update CI workflow to test with Python 3.10 instead of 3.8

Clean up unused deprecated typing imports after pyupgrade

Remove now-unused typing imports (Dict, List, Optional, Set, Tuple,
Type, Union) that became dead after pyupgrade --py310-plus converted
annotations to use built-in types and | syntax.

Also run ruff check --fix --select=UP007,UP045 across the entire
codebase to convert remaining Optional[X] -> X | None and
Union[X, Y] -> X | Y patterns.

Enable ruff UP007/UP045 for Python 3.10 union syntax

Remove UP007 (Union[X,Y] -> X | Y) and UP045 (Optional[X] -> X | None)
from the ruff ignore list and convert all type aliases across the
codebase. These rules were deferred while Python 3.9 was supported;
requires-python is now >=3.10.

A custom script was used because neither ruff --fix nor
pyupgrade --py310-plus converts Optional[X]/Union[X,Y] in type alias
positions (e.g. X = Union[A, B]) — they only handle annotation
positions (e.g. def f(x: Optional[int])). All 167 violations were
module-level type aliases. A few edge cases were fixed manually:
single-element Union[X,], typing.Union qualified refs, runtime
Optional[type] calls, and Annotated[Optional[...]] pydantic fields.

Fix UP007 autofix regression with string forward reference type aliases

Commit fa6bd955a0 enabled ruff UP007/UP045 and auto-fixed
module-level type aliases using Union with string forward
references, producing invalid 'str | str' expressions.

This was a known ruff bug (charliermarsh/ruff#826) that has since
been fixed in later ruff versions, but this codebase was
converted before the fix was in place.

Revert to Union syntax and restore TYPE_CHECKING imports that
ruff's TCH rule cleaned up as a side effect when it thought the
forward references were unused.
2026-06-25 15:12:05 +01:00
Nicola Soranzo 17003e8d00 Apply 2026 black style 2026-01-20 10:25:45 +00:00
guerler fdf6013d69 Restore root and plugin path 2025-10-31 18:55:37 +03:00
guerler e571dcd295 Apply additional StructuredApp mocking 2025-10-31 18:28:26 +03:00
guerler 8764d75c3c Remove template_cache_dir from test 2025-10-31 18:25:39 +03:00
guerler f534435050 Add conditional StructuredApp import after last import 2025-10-31 18:20:17 +03:00
Aysam GuerlerandNicola Soranzo a4d79cdee6 Update test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2025-10-31 18:20:17 +03:00
Aysam GuerlerandNicola Soranzo 3d61eadde5 Update test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2025-10-31 18:20:17 +03:00
Aysam GuerlerandNicola Soranzo 34ae6bc289 Update test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2025-10-31 18:20:17 +03:00
guerler 3427bdd7dd Remove unused imports 2025-10-31 18:19:30 +03:00
guerler 3f739275b7 Adjust test cases 2025-10-31 18:19:30 +03:00
guerler 96f539f404 Remove unused escape import 2025-10-31 18:19:30 +03:00
guerler 94389564d5 Remove unused regex import 2025-10-31 18:19:30 +03:00
guerler 54d8f5b476 Remove unused import 2025-10-31 18:19:30 +03:00
guerler 661ad9d689 Adjust unit test 2025-10-31 18:19:30 +03:00
guerler d6fc3b68b9 Use galaxy directory helper to determine template path 2025-06-14 06:06:37 -04:00
guerler 3e62ada965 Add path from config 2025-06-12 14:36:53 -04:00
guerler f8175b68bd Adjust unit test 2025-05-29 09:56:39 -04:00
guerler 3ea12c90c3 Adjust selenium test, switch to new visualizations 2025-05-26 09:30:01 -04:00
guerler 9aa3f41c08 Update registry tests with focus on new framework 2025-05-26 09:30:01 -04:00
guerler 1057c1d6b9 Properly adjust for escaping parsed content 2025-04-22 21:25:29 -04:00
guerler 67e7337e10 Add test case? 2025-04-16 11:28:35 -04:00
guerler 5441399860 Add new minimal example plugin 2024-09-04 15:59:50 +03:00
guerler db22b485c6 Add additional test conditions for script based plugins 2024-09-04 15:05:41 +03:00
guerler 1a1e8a9e92 Adjust script viz unit tests, fix typo 2024-09-04 09:58:11 +03:00
guerler 0fbb153ed5 Fix default visualization name test 2024-09-04 09:56:11 +03:00
Nicola Soranzo a2018a5e60 Enable flake8-comprehensions ruff rules
but allow `dict()` calls that make use of keyword arguments (e.g.,
`dict(a=1, b=2)`).
2024-03-09 19:11:20 +00:00
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
Nicola Soranzo 64af46c4ae Fix new B018 errors raised by ruff 0.0.260 2023-04-13 16:53:01 +01: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
Nicola Soranzo f3b04b8f26 Remove `unittest.main()` calls 2022-09-21 23:50:05 +01: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
Nicola Soranzo 14b1730eb2 Combine "as" imports with other "from" imports 2022-06-20 20:06:30 +01:00
mvdbeek 3818f50af5 Drop interactive environments 2022-03-23 15:43:24 +01:00
Nicola Soranzo f8bd5d4bea Merge branch 'release_22.01' into dev 2022-02-21 17:00:55 +00:00
John Chilton 06ecddf6f8 Try to unit test more of DictParser in Viz component.
Changed a little during 22.01 release cycle - making sure did not regress.
2022-02-15 12:47:21 -05: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 fe0c4ab4e2 Migrate more unit tests into galaxy-app's test suite. 2021-10-07 11:05:03 -04:00