Found by running:
```
make pyupgrade
ruff check --fix .
ruff check --preview --unsafe-fixes --select=F401 --fix .
make format
make update-client-api-schema
```
The bulk of the changes are replacements of typing deprecated aliases
such as `Dict` and `List` with the standard library classes. These
aliases became redundant in Python 3.9 when the corresponding
pre-existing classes were enhanced to support `[]`, see
https://docs.python.org/3/library/typing.html#deprecated-aliases
Also:
- Update the `pyupgrade` Makefile target to use `--py38-plus` for the
packages needed by Pulsar, including the new galaxy-tool-util-models
package.
when tool source is XML. We can't really encode these attributes as JSON
in XML, and while we could make it work it doesn't feel great to force
tool authors to use such a hypothetical syntax.
I think we still keep all the nice validation here, it's just a little
more lenient.
We could also make it an alias, but it seems muich simpler to not refer
to the same attribute with different names. So far this has used
internally only.
The galaxy-tool-shed-schema package is basically pydantic models for the whole tool shed API. It is used by both the backend code for the new tool shed and the testing code that runs on both the old and new tool shed.
The creation of galaxy-tool-util-models package is something I've wanted to do for a while - it should solve some TODOs I've left in the base. I think beyond enabling galaxy-tool-shed-schema package - the other nice thing is that galaxy-schema code can now rely on various tool stuff without requiring dependency on any of the parser or runtime code.
This should also fix things for the new record types in #19377. I've introduced a type that can be used tools and is included schema for collection creation. The galaxy-tool-util-models packages can now be dependended on by galaxy-schema and galaxy-tool-util and these two packages do not need to depend on each other - either direction of that dependency would make me uncomfortable. xref
https://github.com/galaxyproject/galaxy/actions/runs/13704893929/job/38327692654?pr=19377
I previously failed to include a bunch of validation checks I assumed had been covered so fixed that first and got a bunch of new issues detected. Also added a parameter specification test case for https://github.com/galaxyproject/galaxy/issues/19908 and fixed that.
Fix the following mulled unit test:
```
FAILED test/unit/tool_util/mulled/test_get_tests.py::test_hashed_test_search - AssertionError: assert ['samtools --help'] == ['bamtools --help', 'samtools --help']
At index 0 diff: 'samtools --help' != 'bamtools --help'
Right contains one more item: 'samtools --help'
Full diff:
- ['bamtools --help', 'samtools --help']
+ ['samtools --help']
```
that started not finding bamtools-2.4.0 inside
https://anaconda.org/bioconda/bamtools/files any more.
Also:
- Add type annotation to `CondaInDockerContext` and fix ensuing issues.