Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

descriptor_type empty for Scipion workflow type. #1955

Open
pconesa opened this issue Jul 10, 2024 · 5 comments
Open

descriptor_type empty for Scipion workflow type. #1955

pconesa opened this issue Jul 10, 2024 · 5 comments

Comments

@pconesa
Copy link

pconesa commented Jul 10, 2024

Hi, I'm trying to use the API to get the files described by entry 599 or other similar ones.

When requesting https://workflowhub.eu/ga4gh/trs/v2/tools/599/versions

I'm not getting the type:

[
    {
        "id": "1",
        "url": "https://workflowhub.eu/workflows/599?version=1",
        "name": "Version 1",
        "author": [],
        "descriptor_type": []
    },
    {
        "id": "2",
        "url": "https://workflowhub.eu/workflows/599?version=2",
        "name": "Version 2",
        "author": [],
        "descriptor_type": []
    }
]

Which is needed by the API to get the files later as described in the documentation:

/tools/{id}/versions/{version_id}/{type}/files

Is this the way to get the files when workflow type is Scipion or other than : GALAXY CWL ... (seems to be a short list of valid ones?)

@fbacall
Copy link
Contributor

fbacall commented Jul 10, 2024

Yeah, TRS currently has a hard-coded enum of acceptable workflow types: https://github.com/ga4gh/tool-registry-service-schemas/blob/develop/openapi/openapi.yaml#L730-L740

Although there is an open issue about how to extend this: ga4gh/tool-registry-service-schemas#215

You might be able to do what you want with the regular Git API:
https://workflowhub.eu/workflows/599/git/2/download/workflow_ceitec_layer1.json.template

where 599 is your workflow ID, 2 is the version number, and workflow_ceitec_layer1.json.template is the file path to download.

@pconesa
Copy link
Author

pconesa commented Jul 11, 2024

Thanks, how can I get the list of files for 599 entry without knowing them?

@fbacall
Copy link
Contributor

fbacall commented Jul 11, 2024

There's a "tree" endpoint also:

curl -H "Accept: application/json" https://workflowhub.eu/workflows/599/git/2/tree

(documentation for these endpoints coming soon™️)

@pconesa
Copy link
Author

pconesa commented Jul 11, 2024

Thanks, got it! I think I can reach the files this way. Justfor you yo know.... our plan is for Scipion "python workflow engine" list workflows from workflowhub of type Scipion.

Currently, I think it is not possible to filter by Type "Scipion"?

I managed to filter by organization. So far if fine, we will use :

https://workflowhub.eu/ga4gh/trs/v2/tools?organization=Scipion CNB

Then we'll use the git endpoint to get the file we want

@fbacall
Copy link
Contributor

fbacall commented Jul 11, 2024

You can get a JSON response from the regular index page (with any filters etc. applied):

curl -H "Accept: application/json" https://workflowhub.eu/workflows?filter%5Bworkflow_type%5D=scipion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants