Also:
- Add missing `graphene` and `graphql-core` dependencies to
`pyproject.toml` (already installed as other dependencies' deps,
but explicitly imported by ToolShed code).
- Move `test_tool_validation.py` unit tests to the galaxy-tool-shed
package.
introduced in https://github.com/galaxyproject/galaxy/pull/18003 .
In particular, when using requests in the tests to connect to Galaxy
or the ToolShed it's not needed to use the modified headers.
Also:
- Move some imports after conditional imports.
- Fix type annotations in `lib/tool_shed/test/base/populators.py`
- Fix typo bug in `test/unit/util/test_get_url.py`
The ShortTermStorageManager and related classes should live in their own package eventually and not within galaxy.web nor galaxy.managers as the short term storage microservices it's fairly independent and has way less dependencies than those other packages.
The ShortTermStorageManager is a manager and makes sense to have it live under galaxy.managers instead of galaxy.web.
It will also help reduce the dependency of the manager modules on web related stuff.
ruff (https://github.com/charliermarsh/ruff) is a new and extremely fast
Python linter, written in Rust.
Ruff can be used to replace Flake8 (plus a variety of plugins), isort,
pydocstyle, yesqa, eradicate, pyupgrade, and autoflake.
Here ruff is added to our current linters (flake8, flake8-bugbear and isort)
while we assess its reliability.
I've not enabled the isort rules because many of the options we use are not
implemented yet. I have instead enabled the pyupgrade rules (a tool which I
run manually every few months).
Also:
- Fix new linting errors reported by ruff.
- Improves options and display around discarded datasets.
- Adds new APIs for importing model stores.
- Adds support to model store layer for importing/exporting workflow invocations and APIs and tests to support this.
- Add new DEFERRED dataset state - with APIs for materializing them or the option to defer them on the worker node if using tool_evaluation_strategy=remote on the job destination.
- UI and API options for uploading deferred datasets individually or into collections.
Fix:
```
test/unit/web_framework/framework/test_framework_base.py:4
/home/runner/work/galaxy/galaxy/galaxy root/test/unit/web_framework/framework/test_framework_base.py:4: PytestCollectionWarning: cannot collect test class 'TestWebapp' because it has a __init__ constructor
class TestWebapp(WebApplication):
```
Also:
- Use f-string.
- Simplify code using assert.