Commit Graph
93 Commits
Author SHA1 Message Date
Nicola Soranzo 1174bbe8f4 Fix packages' dependencies and MANIFEST.in files
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.
2024-06-02 19:56:20 +01:00
Nicola Soranzo 8cdca0f343 Revert some requests import changes
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`
2024-05-23 15:55:56 +01:00
mvdbeek e8a3b8c0cd Create wrapper for requests with default user agent 2024-04-16 17:54:29 +02:00
Nicola Soranzo 4588a27c0f Code cleanups from pyupgrade
Found by running:

```
make pyupgrade
```
2024-03-10 03:32:47 +00:00
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
mvdbeek 04441e503c Fix encoded id unit test 2024-01-08 11:33:44 +01:00
mvdbeek a13932c71c Fix id field unit tests 2024-01-08 11:33:34 +01:00
mvdbeek ed1c30a8b9 Fix fetch_data schema unit tests 2024-01-08 11:33:29 +01:00
mvdbeek 1593570e33 Replace DecodedDatabaseIdField.encode with Security.security.encode_id 2024-01-08 11:33:25 +01:00
mvdbeek 242f75ceec Type fixes for starlette 0.34.0
Starlette removed some Any annotations in 0.34.0.
Issue tracked in https://github.com/abersheeran/a2wsgi/issues/44
2024-01-01 11:13:40 +02:00
John Davis 7d6a0eed19 Fix import in unit test 2023-12-18 15:03:10 -05:00
John Davis c6dad0bce6 Fix linting, add attribution 2023-12-18 14:51:58 -05:00
John Davis a8a2903a31 Copy fastapi-utils.cbv.py + unit tests, change import 2023-12-18 14:16:48 -05:00
Nicola Soranzo ddbcb39fb3 Merge pull request #17058 from davelopez/remove_web_dependency_from_tools
Remove web framework dependency from tools
2023-12-01 12:29:26 +00:00
mvdbeek e3d18005db Merge branch 'release_23.1' into release_23.2 2023-12-01 11:52:34 +01:00
mvdbeek e502863657 Add missing optional description field, fixes ephemeris data library example 2023-12-01 11:00:52 +01:00
davelopez 6f2b4ff559 Move short_term_storage related classes to its own path
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.
2023-11-30 17:01:29 +01:00
davelopez d33bd688cd Move short_term_storage related classes to managers
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.
2023-11-30 16:42:04 +01: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
John Davis e90d9c204c Fix mock: model arg required to cast Bunch as MinimalApp 2023-06-08 21:30:11 -04:00
Nicola Soranzo d31a347547 Fix comparison-overlap mypy error 2023-04-05 13:54:05 +01:00
davelopez 0a043971af Add unit test for model_store_storage_target 2023-04-04 17:31:32 +02:00
mvdbeek 29d7d14ae1 Update FastAPI 2023-02-10 18:40:00 +01:00
Nicola Soranzo 7fee81607c Add linting with ruff
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.
2023-01-16 14:34:56 +00:00
John Chilton 74491c2362 Migrate baseauth endpoint to FastAPI. 2022-12-17 10:16:27 -05:00
mvdbeek 792617d242 Drop unused contents_near api endpoint
It was added for the beta version of the new history, but it's unused
now.
2022-12-12 10:02:11 +01:00
John DavisandNicola Soranzo 67c7e7d1ac Use a simple cast instead of relying on dependency injection
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-11-30 13:33:42 -05:00
John Davis cbabba8f49 Fix typing error in unit test 2022-11-29 14:59:17 -05:00
Nicola Soranzo de5e9c0e71 Add some type annotations to `WebApplication and GalaxyWebTransaction` 2022-11-28 04:50:03 +00:00
Nicola Soranzo 2b362fbd1d Merge branch 'release_22.05' into dev 2022-11-17 22:50:45 +00:00
mvdbeek 7254dc9fef Also support byte-range in legacy send_file method 2022-11-16 18:33:46 +01:00
mvdbeek 7f0754eef7 Upgrade FastAPI to 0.87.0, drop old workarounds 2022-11-16 14:31:49 +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
davelopez a7303e219e Fix API unit tests with ID encodings 2022-08-24 12:05:47 +02:00
davelopez 8355d5e12d Add more unit tests for ID fields 2022-08-24 12:00:26 +02:00
davelopez 1d59487365 Add unit tests for query_parameter_as_list 2022-08-19 08:59:02 +02:00
Marius van den BeekandNicola Soranzo 973d0779b6 Include timezone testing
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-08-17 18:43:57 +02:00
mvdbeek b0d9cff6c4 Add unit test
That was meant to go into the first commit ...
2022-08-16 13:12:28 +02:00
davelopez af949c2fd3 Revert adding __hash__ to BaseDatabaseIdField 2022-08-04 11:23:31 +02:00
davelopez e5b11bb25b Add unit tests for DabaseIdFields hashing 2022-08-02 11:10:35 +02:00
mvdbeek 22f761aa10 Fix validation of nested element fetch data payloads
Fixes https://github.com/galaxyproject/galaxy/issues/14242
2022-07-01 13:52:06 +02:00
mvdbeek 84ea10767a Unit test for No response returned error 2022-06-27 18:11:49 +02:00
John Chilton c5bf63bc91 Add DEFERRED datasets to Galaxy
- 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.
2022-05-23 19:48:47 -04:00
Nicola Soranzo 15ba0f8747 Fix warning in pytest collection
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.
2022-05-12 16:38:15 +01:00
mvdbeek 55e22ca8a9 Use separate model for fetch data form payload 2022-04-25 18:28:01 +02:00
mvdbeek 02ac5b3c9e Add FastAPI route for tools/fetch 2022-04-23 12:01:32 +02:00
mvdbeek 1d5a52ec05 Schema for fetch_data 2022-04-22 17:08:41 +02:00
mvdbeek 3bc7d7c867 Drop legacy mapping unit tests for FastAPI routes 2022-03-21 13:14:43 +01:00