Commit Graph
9 Commits
Author SHA1 Message Date
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
mvdbeek acb321bfd8 Merge branch 'release_22.01' into release_22.05 2022-07-02 18:07:38 +02:00
Nate Coraor a4e2af92b3 Fixes for the tus resumable upload command line script 2022-06-29 08:42:24 -04:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
mvdbeek 9f463b6f82 Adapt scripts/resumable_upload.py to fetch API
Finding out that the `files` parameter is required took way more time
than I want to admit ... .
2021-10-13 18:05:42 +02:00
mvdbeek 600f59b0ee Use client-logic to run upload tool
It is pretty cool to use hooks and an alternative tool submission
endpoint, but this is less invasive. We'd have to do this anyway for
cases where the upload is already on the server and the pre-finish hook
doesn't fire.
2021-10-12 13:43:45 +02:00
mvdbeek 0e1ff5a30c Adjust endpoint so it can receive tusd hooks
Without any proxying and tusd running as a separate service:
``
tusd -upload-dir=./database/tmp -hooks-http=http://localhost:8000/api/upload/_resumable_upload -hooks-http-forward-headers=X-Api-Key --hooks-enabled-events=post-finish
```

Adjust ./database/tmp to new_file_path, and this should work. Now we
just need to proxy `api/upload/resumable_upload` to `<tusd_port>/files`
and we're good for a production setup.
2021-10-12 13:34:55 +02:00
mvdbeek d08a08ac4c Backend Prototype for resumable uploads via TUS
The middleware can be replaced by running a [tusd
server](https://github.com/tus/tusd) or
[nginx tus location](https://github.com/mmatuska/lua-tus-server) in
front of Galaxy.
Includes a sample script that can upload datasets into a Galaxy history.
2021-10-12 13:34:53 +02:00