Commit Graph
249 Commits
Author SHA1 Message Date
Nicola Soranzo 3f0f789b82 Merge pull request #17556 from kostrykin/files_diff_images
Add `image_diff` comparison method for test output verification using images
2024-03-04 17:04:44 +00:00
Nicola Soranzo 94c43dd75c Disallow also pydantic 2.6.3 2024-03-04 13:14:48 +00:00
Nicola Soranzo b02101ba69 Unpin Cheetah as the poetry bug was fixed 2024-03-04 13:14:48 +00:00
Leonid Kostrykin a147d72ada Add pillow dependency 2024-02-27 12:52:45 +01:00
Nicola Soranzo 8369bf5f24 Disallow also pydantic 2.6.2 2024-02-25 20:13:57 +00:00
Nicola Soranzo c3a6bf4ef4 Update poetry configuration for 1.8.0 2024-02-25 20:13:57 +00:00
Nicola Soranzo d37c2844b5 Install future from PyPI again
now that 1.0.0 has been released with Python 3.12 support from my
fork.
2024-02-22 14:04:01 +00:00
Nicola Soranzo 167282f623 Update ruff settings for 0.2.0 deprecations 2024-02-14 00:57:48 +00:00
Nicola Soranzo f9384bb0df Disallow pydantic 2.6.0 and 2.6.1
xref: https://github.com/pydantic/pydantic/issues/8760

Fix the following error when testing with mypy:

```
$ tox -e mypy
Deferral trace:
    cwltool.utils:62
    cwltool.utils:-1
    ...
    galaxy.model:666
    galaxy.model:666
    galaxy.model:666
    galaxy.model:666
lib/galaxy/model/__init__.py: error: INTERNAL ERROR: maximum semantic analysis
iteration count reached
Found 1 error in 1 file (errors prevented further checking)
```
2024-02-14 00:57:47 +00:00
mvdbeek b278d8a2aa Merge branch 'release_23.2' into dev 2024-02-08 11:35:49 +01:00
Nicola Soranzo 5e14d03779 Merge branch 'release_23.1' into release_23.2 2024-02-07 22:50:08 +00:00
Nicola Soranzo 52933ed5fd Merge branch 'release_23.0' into release_23.1 2024-02-07 22:48:53 +00:00
Nicola Soranzo de8d4562b6 Add missing Werkzeug test requirement
Used in `test/unit/util/test_get_url.py` since commit
69ebbb761a .

Pin Werkzeug in `lib/galaxy/dependencies/dev-requirements.txt`
to latest version compatible with pytest-httpserver 1.0.6 .

Fix unit test collection error on Python 3.11:
```
  File "/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.11/site-packages/pytest_httpserver/httpserver.py", line 26, in <module>
    from werkzeug.http import parse_authorization_header
ImportError: cannot import name 'parse_authorization_header' from 'werkzeug.http' (/home/runner/work/galaxy/galaxy/galaxy root/.tox/unit-coverage/lib/python3.11/site-packages/werkzeug/http.py)
```
2024-02-07 05:44:42 +00:00
Nicola Soranzo 37116c39a0 Fix type annotation of code using XML etree
by adding lxml-stubs to our typecheck requirements.
2024-01-26 18:41:09 +00:00
John Davis 568480f923 Merge branch 'release_23.2' into dev_merge_23.2 2024-01-24 16:28:01 +00:00
mvdbeek 7e9c02b75c Use python-isal for fast zip deflate compression in rocrate export 2024-01-23 11:16:26 +01:00
Ubuntu 6860c9a0fb Add support for Python 3.12 2024-01-21 11:57:59 +00:00
Nicola Soranzo 4eb94cde5f Install future from my fork with Python 3.12 patches 2024-01-21 11:57:58 +00:00
Nicola Soranzo 69d197e75e Update missed pydantic version pin
Forgotten in https://github.com/galaxyproject/galaxy/pull/17262 .

Fix broken Update dependencies CI build:
https://github.com/galaxyproject/galaxy/actions/runs/7509887325/job/20447594708
2024-01-15 19:38:44 +00:00
mvdbeek 9dfdd7dcba Update dependencies 2024-01-08 11:33:41 +01:00
mvdbeek 64533cea53 Undo dependency changes 2024-01-08 11:33:36 +01:00
mvdbeek e63c3ba9d4 Update fastapi and pydantic dependencies 2024-01-08 11:33:34 +01:00
John Chilton 4bb1c4b4ce Merge pull request #17205 from jdavcs/dev_cbv
Vendorize fastapi-utls.cbv
2023-12-22 10:28:32 -05:00
John Davis 52d7fa704f Bump graphene-sqlalchemy to 3.0.0rc1 2023-12-19 12:37:49 -05:00
John Davis 377d7d134f Remove fastapi-utils from pyproject.toml, packages 2023-12-18 14:52:01 -05:00
Michael R. Crusoe 8611d3ccb8 pin kombu to >= 5.3 for importlib-metadata fix (poetry had already picked up 5.3.x) 2023-11-27 00:01:55 +00:00
Michael R. Crusoe 14fb5acc69 importlib_resources is only needed in Python 3.8
Add type hints + fixes
2023-11-27 00:01:54 +00:00
Nicola Soranzo d159d26764 Pin twill to >=3.2.1
twill 3.2 replaced `requests` with `httpx`, and `httpx` has a default
timeout of 5 s on a request, while `requests` didn't enforce a timeout by
default.

Fix errors like the following in ToolShed tests, where resetting
repository metadata takes longer than 5 s:

```
self = <tool_shed.test.functional.test_0000_basic_repository_features.TestBasicRepositoryFeatures object at 0x7f28f99197c0>

    def test_0090_verify_repository_metadata(self):
        """Verify that resetting the metadata does not change it."""
        repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
>       self.verify_unchanged_repository_metadata(repository)

lib/tool_shed/test/functional/test_0000_basic_repository_features.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
lib/tool_shed/test/base/twilltestcase.py:2073: in verify_unchanged_repository_metadata
    self.reset_repository_metadata(repository)
lib/tool_shed/test/base/twilltestcase.py:1774: in reset_repository_metadata
    self.visit_url("/repository/reset_all_metadata", params=params)
lib/tool_shed/test/base/twilltestcase.py:845: in visit_url
    return self._browser.visit_url(url, allowed_codes=allowed_codes)
lib/tool_shed/test/base/twillbrowser.py:35: in visit_url
    return visit_url(url, allowed_codes=allowed_codes)
lib/tool_shed/test/base/twillbrowser.py:20: in visit_url
    new_url = tc.go(url)
.venv/lib/python3.8/site-packages/twill/commands.py:120: in go
    browser.go(url)
.venv/lib/python3.8/site-packages/twill/browser.py:192: in go
    self._journey("open", try_url)
.venv/lib/python3.8/site-packages/twill/browser.py:677: in _journey
    result = self._client.get(url)
.venv/lib/python3.8/site-packages/httpx/_client.py:1041: in get
    return self.request(
.venv/lib/python3.8/site-packages/httpx/_client.py:814: in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
.venv/lib/python3.8/site-packages/httpx/_client.py:901: in send
    response = self._send_handling_auth(
.venv/lib/python3.8/site-packages/httpx/_client.py:929: in _send_handling_auth
    response = self._send_handling_redirects(
.venv/lib/python3.8/site-packages/httpx/_client.py:966: in _send_handling_redirects
    response = self._send_single_request(request)
.venv/lib/python3.8/site-packages/httpx/_client.py:1002: in _send_single_request
    response = transport.handle_request(request)
.venv/lib/python3.8/site-packages/httpx/_transports/default.py:228: in handle_request
    resp = self._pool.handle_request(req)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/contextlib.py:131: in __exit__
    self.gen.throw(type, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    @contextlib.contextmanager
    def map_httpcore_exceptions() -> typing.Iterator[None]:
        try:
            yield
        except Exception as exc:
            mapped_exc = None

            for from_exc, to_exc in HTTPCORE_EXC_MAP.items():
                if not isinstance(exc, from_exc):
                    continue
                # We want to map to the most specific exception we can find.
                # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to
                # `httpx.ReadTimeout`, not just `httpx.TimeoutException`.
                if mapped_exc is None or issubclass(to_exc, mapped_exc):
                    mapped_exc = to_exc

            if mapped_exc is None:  # pragma: no cover
                raise

            message = str(exc)
>           raise mapped_exc(message) from exc
E           httpx.ReadTimeout: timed out

.venv/lib/python3.8/site-packages/httpx/_transports/default.py:83: ReadTimeout
```
2023-11-27 00:01:50 +00:00
Michael R. Crusoe f6e441396d pyproject.toml: bump minimum cwltool version to save time 2023-11-26 18:34:11 +00:00
Michael R. Crusoe c00967cca4 Python 3.8 as new minimum version
Fixes: https://github.com/galaxyproject/galaxy/issues/16394

Also upgrade code to Python 3.8 syntax with:

```
ack --type=python -f | grep -v '^lib/galaxy/schema/bco/\|^lib/galaxy/schema/drs/\|lib/tool_shed_client/schema/trs.*.py\|^tools/\|^.venv/\|^.tox/' | grep -v '^lib/galaxy/files/sources/\|^lib/galaxy/job_metrics/\|^lib/galaxy/objectstore/\|^lib/galaxy/tool_util/\|^lib/galaxy/util/' | xargs pyupgrade --py38-plus
```
2023-11-26 18:34:09 +00:00
Sveinung Gundersen 7ca529e92d Update gravity requirement to 1.0.4, waiting for required gravity + gx-it-proxy updates 2023-11-15 12:54:14 +01:00
Nicola Soranzo 78e45777e3 Fix G201 ruff errors 2023-10-25 10:48:31 +01:00
Nicola Soranzo 544769d6d2 Enable flake8-logging-format rules in ruff, fix G003 and G010 errors 2023-10-25 10:48:31 +01:00
Nicola Soranzo 7dc9be43bf Explicitly add playwright to dev dependencies 2023-10-20 11:14:28 +01:00
John Chilton 7dc0b1378b WIP: modern tool shed frontend 2023-09-27 14:30:42 -04:00
John Chilton 06667470b6 Modernized framework to replace tool shed functional tests.
Goals:

- Replace direct database access with pydantic typed API requests.
- Replace Twill with playwright.
- Eliminate access to the Galaxy UI in the tests - the tests should assume API access from the installing party.

pytest-playwright requires small bits of #13909.

This is a worthy project that could let us remove a bunch of deprecated stuff from the Galaxy admin controllers and a bunch of mako stuff that is unused and could be used to test PRs like #14609 (which prompted me to do this) but I'm anxious about growing emotionally attached to code I want to remove and I'm worried about losing track of which helpers are required for Planemo/Emphemeris/Galaxy and which helpers are just being used to test the tool shed.
2023-09-26 13:46:59 -04:00
John Chilton dd58bfcfe6 Implement the GA4GH TRS API in the new tool shed. 2023-09-26 13:46:59 -04:00
John Chilton 8852f0733b Progress toward exercising less of the tool shed upload API.
So we can kill it.
2023-09-26 13:46:56 -04:00
Nicola Soranzo 585e07c42b Pin sphinx-rtd-theme to <2 to revert update to pre-release version
Due to a bug in poetry ( https://github.com/python-poetry/poetry/issues/8194 ),
the 2.0.0rc2 pre-release of sphinx-rtd-theme was selected to allow
the update of docutils to 0.19, instead of sticking with the current
version for both.
This breaks the doc build with this error:

```
writing output... [  0%] admin/apache

Theme error:
An error happened in rendering the page admin/apache.
Reason: AttributeError("'str' object has no attribute 'attributes'")
```
2023-09-20 09:32:47 +01:00
Nicola Soranzo 39e5c11d54 Prevent downgrade of isa-rwval 2023-09-20 00:58:42 +01:00
mvdbeek 0f2ef4dc0c Merge branch 'release_23.1' into dev 2023-09-14 13:43:50 +02:00
mvdbeek 63442d1d72 Fix regex validation for global inline flags
Fixes https://github.com/galaxyproject/galaxy/issues/16676
2023-09-13 12:00:57 +02:00
Dannon 9d7bc54a87 Merge pull request #16636 from mvdbeek/replace_pkg_resource_parsing
Switch out conditional requirement parser
2023-09-06 11:09:56 +10:00
Nicola Soranzo d93cddd5af Use poetry to generate the pinned typecheck requirements 2023-09-02 21:59:32 +01:00
Nicola Soranzo bd2e8a4f13 Explicitly add PyPI as default package source for poetry
Fix the following warning:

Warning: In a future version of Poetry, PyPI will be disabled
automatically if at least one custom primary source is configured.
In order to avoid a breaking change and make your pyproject.toml
forward compatible, add PyPI explicitly via 'poetry source add pypi'.
By the way, this has the advantage that you can set the priority of
PyPI as with any other source.
2023-09-02 21:59:31 +01:00
mvdbeek c1fab91e3a Switch out conditional requirement parser
Fixes
```
Traceback (most recent call last):
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in __init__
    parsed = _parse_requirement(requirement_string)
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 73, in _parse_requirement
    name_token = tokenizer.expect(
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 140, in expect
    raise self.raise_syntax_error(f"Expected {expected}")
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 165, in raise_syntax_error
    raise ParserSyntaxError(
pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected package name at the start of dependency specifier
    "git+https://github.com/jakobmerljak/pyarcrest.git@dev"
    ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/storage/srv/galaxy/server/lib/galaxy/dependencies/__init__.py", line 312, in optional
    conditional = ConditionalDependencies(config_file)
  File "/storage/srv/galaxy/server/lib/galaxy/dependencies/__init__.py", line 45, in __init__
    self.get_conditional_requirements()
  File "/storage/srv/galaxy/server/lib/galaxy/dependencies/__init__.py", line 176, in get_conditional_requirements
    for req in pkg_resources.parse_requirements(open(crfile).readlines()):
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/__init__.py", line 3174, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/storage/srv/galaxy/server/.venv/lib64/python3.9/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 37, in __init__
    raise InvalidRequirement(str(e)) from e
pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected package name at the start of dependency specifier
    "git+https://github.com/jakobmerljak/pyarcrest.git@dev"
    ^

```

for advanced package specifiers that might be used during development.
2023-09-01 13:35:21 +02:00
Nicola Soranzo 741ecf6f44 Pin pysam to >=0.21.0
This reverts commit 353c08cbb9 .

pysam 0.20.0 doesn't build for Python 3.11 on macOS, so we need to
temporarily add the unnecessary Cython runtime dependency that
pysam 0.21 brings in.
2023-07-21 00:58:33 +01:00
Nicola Soranzo f030fe1476 Pin pyparsing to <3.1 for matplotlib
This was not inferred automatically because Poetry is run under
Python 3.7 and we have a different matplotlib requirement under
Python 3.8 .
2023-07-12 19:34:07 +01:00
Nate Coraor 2ca678482f Merge remote-tracking branch 'upstream/release_23.0' into release_23.1 2023-06-30 15:56:50 -04:00
Nate Coraor 492b2ee64b Pin fastapi to <0.99 2023-06-30 15:20:22 -04:00