galaxyproject / galaxyproject/galaxy
Formalize/Increase Static Checking of Workflows.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 169
Description
The workflow editor does some minimal checks for datatype format and collection type as it proceeds. More detailed checks should be done as the workflow is connected and before it is executed.
After the workflow step is connected - we could check that the datatypes of all the connections are still valid. Once we have actually specified inputs for a workflow - we can do even more detailed checks since we will have complete metadata for the inputs.
We'd like to see an abstraction that takes a workflow state and possibly a set of inputs and does all the validation it can. The sooner we can catch problems the better obviously.
Related to https://github.com/galaxyproject/galaxy/issues/3151 (metadata checking) and https://github.com/galaxyproject/galaxy/issues/1325 (allowing user to select format of inputs). This came up in the context of NLP hacking with the LAPPS Grid project.
Implementation Option/Details:
- We noted Galaxy already does tool state checking and cycle checking on the backend. This happens in ``galaxy.managers.workflows:WorkflowContentsManager`` in methods such as ``__connect_workflow_steps`` and ``_workflow_from_dict``. Our thought would be to do extra checking in this context (it doesn't even do type checking currently - but does check for tool state errors and cycles).
- It would be nice to have a variant of this that didn't actually update database - just go through the motion and do the validation. After that is complete - we could asynchronously fire off these validations steps occasionally in the workflow editor as the user update the workflow.
Contributor guide
Research direction
Start with galaxy.managers.workflows.WorkflowContentsManager, especially __connect_workflow_steps and _workflow_from_dict, to understand the existing tool-state and cycle checks. Define the validation abstraction around a workflow state and optional inputs, ensuring it can validate connection datatypes and metadata without updating the database; the issue does not identify tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100