Skip to content
Closed
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
08a8985
Fixed Online vs. Local Mode section in User Guide
Imama-Kainat Mar 17, 2025
a2fa72b
fix the online vs local mode in user guide
Imama-Kainat Mar 17, 2025
8a9b110
Updated Windows Executable Logo to Match Documentation
Imama-Kainat Mar 18, 2025
dd68862
add verification of virtual environment
Imama-Kainat Mar 18, 2025
2295fc2
Fix the documentation
Imama-Kainat Mar 19, 2025
781d369
i have made a auto python script for my own ease for running stramlit…
Imama-Kainat Mar 19, 2025
7e61eaa
removed unnecessary imports from app.py
Imama-Kainat Mar 28, 2025
cd1bbf2
fix the user_guid.md online mode
Imama-Kainat Mar 28, 2025
c5a0605
fix the extra python environment checking in win_exe_with_pyinstaller
Imama-Kainat Mar 28, 2025
d72b090
Merge branch 'main' into fix-docs-aligned
Imama-Kainat Mar 28, 2025
2d4f431
fix the common/common.py in build_app.md
Imama-Kainat Mar 28, 2025
965bef6
removed the old logo and add the newlogo.ico and fix it
Imama-Kainat Mar 28, 2025
d4d3393
Merge branch 'fix-docs-aligned' of https://github.com/Imama-Kainat/st…
Imama-Kainat Mar 28, 2025
4452552
fix the documenation of toppworkflow of quickstart
Imama-Kainat Mar 28, 2025
95974c4
fix the file upload with current folder and code structure in toppfra…
Imama-Kainat Mar 29, 2025
ff1b149
Fix: update parameter input docs to match current file structure
Imama-Kainat Mar 29, 2025
2c0d864
fixing all
Imama-Kainat Mar 29, 2025
4d37db6
Revert "fixing all"
Imama-Kainat Mar 29, 2025
33ce177
Revert "Fix: update parameter input docs to match current file struct…
Imama-Kainat Mar 29, 2025
86846e7
fix comon/common.py file
Imama-Kainat Mar 29, 2025
64ea787
fix the paramters in toppframework.py
Imama-Kainat Mar 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import streamlit as st
from pathlib import Path

import json
# For some reason the windows version only works if this is imported here
import pyopenms


if "settings" not in st.session_state:
with open("settings.json", "r") as f:
st.session_state.settings = json.load(f)
Expand Down
Binary file removed assets/OpenMS.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the logos have been updated separately.

Binary file not shown.
Binary file modified assets/openms.ico
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

Binary file not shown.
4 changes: 2 additions & 2 deletions docs/build_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ save_params()
- The main file `app.py` defines page layout.
- **Pages** must be placed in the `content` directory.
- It is recommended to use a separate file for defining functions per page in the `src` directory.
- The `src/common.py` file contains a set of useful functions for common use (e.g. rendering a table with download button).
- The `src/common/common.py` file contains a set of useful functions for common use (e.g. rendering a table with download button).

## Modify the template to build your own app

1. In `src/common.py`, update the name of your app and the repository name
1. In `src/common/common.py`, update the name of your app and the repository name
```python
APP_NAME = "OpenMS Streamlit App"
REPOSITORY_NAME = "streamlit-template"
Expand Down
39 changes: 24 additions & 15 deletions docs/toppframework.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,33 @@ def content():

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 the `Logger`, `FileManager`, `ParameterManager`, and `CommandExecutor` classes to setup a complete workflow logic.
The `WorkflowManager` class provides the core workflow logic. It uses the `Logger`, `FileManager`, `ParameterManager`, and `CommandExecutor` classes to set up 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.
To build your own workflow, edit or extend one of the files in the `src/workflow` directory such as `simpleworkflow.py` or `mzmlfileworkflow.py`. These files contain example workflows and follow a common pattern based on the `Workflow` base class.

> 💡 Simply set a name for the workflow and overwrite the **`upload`**, **`configure`**, **`execution`** and **`results`** methods in your **`Workflow`** class.
You can use Streamlit components such as tabs, columns, or even expanders to organize the helper functions for displaying file upload and parameter widgets.

The file `content/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified.
> 💡 Simply set a name for the workflow and override the **`upload`**, **`configure`**, **`execution`**, and **`results`** methods in your **`Workflow`** class.

The `Workflow` class contains four important members, which you can use to build your own workflow:
There is no longer a single `content/6_TOPP-Workflow.py` file. Workflow logic has been modularized across files like:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user does not need to know what existed at a previous point in time.

- `simpleworkflow.py`
- `mzmlfileworkflow.py`
- `view.py`

> **`self.params`:** dictionary of parameters stored in a JSON file in the workflow directory. Parameter handling is done automatically. Default values are defined in input widgets and non-default values are stored in the JSON file.
Each of these defines a specific workflow and can be customized or extended to build new ones.

> **`self.ui`:** object of type `StreamlitUI` contains helper functions for building the parameter and file upload widgets.
The `Workflow` class contains five important members, which you can use to build your own workflow:

> **`self.executor`:** object of type `CommandExecutor` can be used to run any command line tool alone or in parallel and includes a convenient method for running TOPP tools.
> **`self.params`:** Dictionary of parameters stored in a JSON file in the workflow directory. Parameter handling is done automatically. Default values are defined in input widgets and non-default values are stored in the JSON file.

> **`self.logger`:** object of type `Logger` to write any output to a log file during workflow execution.
> **`self.ui`:** Object of type `StreamlitUI` contains helper functions for building the parameter and file upload widgets.

> **`self.executor`:** Object of type `CommandExecutor` can be used to run any command line tool alone or in parallel and includes a convenient method for running TOPP tools.

> **`self.logger`:** Object of type `Logger` to write any output to a log file during workflow execution.

> **`self.file_manager`:** Object of type `FileManager` to handle file types and creation of output directories.

> **`self.file_manager`:** object of type `FileManager` to handle file types and creation of output directories.
"""
)

Expand All @@ -57,15 +65,16 @@ def content():
"""
## File Upload

All input files for the workflow will be stored within the workflow directory in the subdirectory `input-files` within it's own subdirectory for the file type.
All input files for the workflow will be stored within the **active workspace directory**, in a subdirectory named after the file type key (e.g., `mzML-files`).

The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow.
The subdirectory name is determined by the **key** passed to the `self.ui.upload_widget` method. The uploaded files are available via this key for parameter input widgets and are accessible while building the workflow.

Calling this method will create a complete file upload page with the following components:

- file uploader
- list of currently uploaded files with this key (or a warning if there are none)
- button to delete all files
- file uploader
- list of currently uploaded files with this key (or a warning if there are none)
- button to delete all files


Fallback files(s) can be specified, which will be used if the user doesn't upload any files. This can be useful for example for database files where a default is provided.
"""
Expand Down
6 changes: 4 additions & 2 deletions docs/user_guide.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not remove this part of the documentation.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ In the OpenMS web application, workspaces are designed to keep your analysis org
- This sets the upload limit to 500MB for the current session.

- **Workspace Access**:
- In online mode, workspaces are stored temporarily and will be cleared after seven days of inactivity.
- In local mode, workspaces are saved on your local machine, allowing for persistent storage. Workspace directory can be specified in the `settings.json`. Defaults to `..` (parent directory).
- *Online Mode*: Workspaces would be temporarily stored and cleared after seven days of inactivity.
- *Local Mode*: Workspaces are saved on your local machine, allowing for persistent storage.
- The workspace directory can be specified in `settings.json`.
- Defaults to `..` (parent directory).

## Downloading Results

Expand Down
1 change: 1 addition & 0 deletions docs/win_exe_with_pyinstaller.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pip install -r requirements.txt

#install pyinstaller
pip install pyinstaller

```

### streamlit files
Expand Down