Closed axelwalter closed 2 months ago
Maybe names:
@JeeH-K and @timosachsenberg thanks a lot for the detailed review! Will work on a better way to handle files (e.g. in a FileManager class) and keep streamlit strictly to the StreamlitUI class.
With the recent changes all streamlit functionality has been put into the StreamlitUI class. Helper classes are initialized only once in WorkflowManager. The Files class has been reworked to a FileManager class, an instance of it being a member of WorkflowManager and accesible for workflow construction.
Framework for TOPP tool workflows
Features
Quickstart
This repository contains a module in
src/workflow
that provides a framework for building and running analysis workflows.The
WorkflowManager
class provides the core workflow logic. It uses theLogger
,Files
,DirectoryManager
,ParameterManager
, andCommandExecutor
classes to setup a complete workflow logic.To build your own workflow edit the file
src/TOPPWorkflow.py
. Use any streamlit components such as tabs (as shown in example), columns, or even expanders to organize the helper functions for displaying file upload and parameter widgets.Simply set a name for the workflow and overwrite the
upload
,parameter
,execution
andresults
methods in yourWorkflow
class.The file
pages/6_TOPP-Workflow.py
displays the workflow content and can, but does not have to be modified.The
Workflow
class contains four important members, which you can use to build your own workflow:Handling input and output files in the
Workflow.execution
method for processes is done with theFiles
class, handling file types and creation of output directories.Screenshots
Example code for a workflow