-
Couldn't load subscription status.
- Fork 37
Description
We have completely rewritten Sapporo, a WES implementation, and released it as version 2.0.0. This new Sapporo is based on WES 1.1.0 and is implemented using Python's FastAPI. We first defined types based on WES 1.1.0, as seen in sapporo/schemas.py, and built the functionalities from there. Our goal was to avoid extending the original WES whenever possible. However, there were some necessary extensions that we implemented, which are summarized in this issue. We would be delighted if these extensions could be integrated into the original WES.
1. Fix ServiceInfo - default_workflow_engine_parameters Type
- Original WES 1.1.0:
List[DefaultWorkflowEngineParameter] - Proposal:
Dict[str, List[DefaultWorkflowEngineParameter]
Since WES 1.1.0 now supports multiple workflow engines within a single WES instance, this extension was necessary. The expected structure is as follows (example):
{
"default_workflow_engine_parameters": {
"cwltool": [
{ "name": "--cpu", "value": "2" },
{ "name": "--mem", "value": "4G" }
],
"cromwell": [
{ "name": "--cpu", "value": "4" }
]
}
}2. Add sort_order and state Query Parameters to GET /runs
To enhance the GET /runs endpoint, we propose introducing query parameters for sorting and filtering runs:
- Sort Order: Add a
sort_orderquery parameter to sort runs based onstart_timein either ascending or descending order. The value should be "asc" or "desc", with the default being "desc". - State Filter: Add a
statequery parameter to filter runs based on their state, such as "COMPLETE", "RUNNING", etc.
3. Enhancing POST /runs to Support Download Workflow Attachments
Currently, workflow_attachment only supports attaching files via form-data. To improve its flexibility and functionality, we suggest the following enhancements:
- Introduce a
workflow_attachment_objthat includes a download URL. This would allow WES to download the attachment file at runtime and stage the file. An example object structure would be:
[
{ "file_name": "path/to/file", "file_url": "https://example.com/path/to/file" }
]4. Enable Downloading of Run Outputs
We propose adding endpoints to download run outputs in various formats:
- Retrieve Outputs List:
GET /runs/{run_id}/outputsshould return the outputs (outputsfield of the response fromGET /runs/{run_id}) in JSON format. - Download Outputs as ZIP:
GET /runs/{run_id}/outputs?download=trueshould return the outputs as a ZIP file. - Download Each Output File:
GET /runs/{run_id}/outputs/{path_to_file}should allow downloading a specific output file.