From 682772f7d5a58eade21f5774f11371018f56499e Mon Sep 17 00:00:00 2001
From: Tom David Mueller <tom.mueller@beachouse.de>
Date: Fri, 13 Dec 2024 16:41:32 +0100
Subject: [PATCH 1/5] allow downgrades for ci

---
 .github/workflows/build-windows-executable-app.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build-windows-executable-app.yaml b/.github/workflows/build-windows-executable-app.yaml
index 07bae273..d456c4e0 100644
--- a/.github/workflows/build-windows-executable-app.yaml
+++ b/.github/workflows/build-windows-executable-app.yaml
@@ -46,7 +46,7 @@ jobs:
       shell: bash
       run: |
         choco install ccache ninja -y --no-progress
-        choco install cmake --version=3.31.1 -y --no-progress
+        choco install cmake --version=3.31.1 -y --no-progress --force
         ## GH CLI "SHOULD BE" installed. Sometimes I had to manually install nonetheless. Super weird.
         # https://github.com/actions/runner-images/blob/main/images/win/scripts/Installers/Install-GitHub-CLI.ps1
         echo "C:/Program Files (x86)/GitHub CLI" >> $GITHUB_PATH

From 2b938d70d5f7d61e60ad7e061ea03c544733c7ba Mon Sep 17 00:00:00 2001
From: Tom David Mueller <tom.mueller@beachouse.de>
Date: Fri, 13 Dec 2024 16:15:25 +0100
Subject: [PATCH 2/5] add annotation for list inputs

---
 src/workflow/StreamlitUI.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py
index 687ca618..8a84a79a 100644
--- a/src/workflow/StreamlitUI.py
+++ b/src/workflow/StreamlitUI.py
@@ -755,10 +755,17 @@ def display_TOPP_params(params: dict, num_cols):
                             v.decode() if isinstance(v, bytes) else v
                             for v in p["value"]
                         ]
+                        valid_entries_info = ''
+                        if len(p['valid_strings']) > 0:
+                            valid_entries_info = (
+                                " Valid entries are: "
+                                + ', '.join(sorted(p['valid_strings']))
+                            )
+
                         cols[i].text_area(
                             name,
                             value="\n".join([str(val) for val in p["value"]]),
-                            help=p["description"],
+                            help=p["description"] + " Separate entries using the \"Enter\" key." + valid_entries_info,
                             key=key,
                         )
 

From 592bb407bd2912cd8aa9167b1250986118e82bdd Mon Sep 17 00:00:00 2001
From: Tom David Mueller <tom.mueller@beachouse.de>
Date: Wed, 18 Dec 2024 14:50:43 +0100
Subject: [PATCH 3/5] fix workflow

---
 Dockerfile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index a8d02e26..7ad5bd5b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -138,9 +138,10 @@ COPY clean-up-workspaces.py /app/clean-up-workspaces.py
 RUN echo "0 3 * * * /root/miniforge3/envs/streamlit-env/bin/python /app/clean-up-workspaces.py >> /app/clean-up-workspaces.log 2>&1" | crontab -
 
 # create entrypoint script to start cron service and launch streamlit app
-RUN echo "#!/bin/bash" > /app/entrypoint.sh
-RUN echo "service cron start" >> /app/entrypoint.sh
-RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" >> /app/entrypoint.sh
+RUN echo "#!/bin/bash" > /app/entrypoint.sh && \
+    echo "source /root/miniforge3/bin/activate streamlit-env" >> /app/entrypoint.sh && \
+    echo "service cron start" >> /app/entrypoint.sh && \
+    echo "streamlit run app.py" >> /app/entrypoint.sh
 # make the script executable
 RUN chmod +x /app/entrypoint.sh
 

From 2e5815ff25f59d34f08c8e0f13a7b8a483b3d51c Mon Sep 17 00:00:00 2001
From: Tom David Mueller <tom.mueller@beachouse.de>
Date: Wed, 18 Dec 2024 14:55:02 +0100
Subject: [PATCH 4/5] pin numpy version for build dependencies

---
 Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 32514cce..86a7c6a0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -81,7 +81,7 @@ SHELL ["mamba", "run", "-n", "streamlit-env", "/bin/bash", "-c"]
 
 # Install up-to-date cmake via mamba and packages for pyOpenMS build.
 RUN mamba install cmake
-RUN pip install --upgrade pip && python -m pip install -U setuptools nose Cython autowrap pandas numpy pytest
+RUN pip install --upgrade pip && python -m pip install -U setuptools nose Cython autowrap pandas 'numpy==1.26.4' pytest
 
 # Clone OpenMS branch and the associcated contrib+thirdparties+pyOpenMS-doc submodules.
 RUN git clone --recursive --depth=1 -b ${OPENMS_BRANCH} --single-branch ${OPENMS_REPO} && cd /OpenMS

From 5cd17b58224f0c0df040c4cb5da9f6c5e2dc04be Mon Sep 17 00:00:00 2001
From: Tom David Mueller <tom.mueller@beachouse.de>
Date: Wed, 18 Dec 2024 15:23:39 +0100
Subject: [PATCH 5/5] fix multiple dropdown list display

---
 content/FLASHDeconv/FLASHDeconvViewer.py | 2 ++
 content/FLASHTnT/FLASHTnTViewer.py       | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/content/FLASHDeconv/FLASHDeconvViewer.py b/content/FLASHDeconv/FLASHDeconvViewer.py
index 6e858239..160b752c 100644
--- a/content/FLASHDeconv/FLASHDeconvViewer.py
+++ b/content/FLASHDeconv/FLASHDeconvViewer.py
@@ -142,6 +142,8 @@ def select_experiment():
     st.session_state.selected_experiment0 = st.session_state.selected_experiment_dropdown
     if "saved_layout_setting" in st.session_state and len(st.session_state["saved_layout_setting"]) > 1:
         for exp_index in range(1, len(st.session_state["saved_layout_setting"])):
+            if st.session_state[f'selected_experiment_dropdown_{exp_index}'] is None:
+                continue
             st.session_state[f"selected_experiment{exp_index}"] = st.session_state[f'selected_experiment_dropdown_{exp_index}']
 
 
diff --git a/content/FLASHTnT/FLASHTnTViewer.py b/content/FLASHTnT/FLASHTnTViewer.py
index 4f490bd2..4085be9a 100644
--- a/content/FLASHTnT/FLASHTnTViewer.py
+++ b/content/FLASHTnT/FLASHTnTViewer.py
@@ -252,6 +252,8 @@ def select_experiment():
     st.session_state.selected_experiment0_tagger = st.session_state.selected_experiment_dropdown_tagger
     if "saved_layout_setting_tagger" in st.session_state and len(st.session_state["saved_layout_setting_tagger"]) > 1:
         for exp_index in range(1, len(st.session_state["saved_layout_setting_tagger"])):
+            if st.session_state[f'selected_experiment_dropdown_{exp_index}_tagger'] is None:
+                continue
             st.session_state[f"selected_experiment{exp_index}_tagger"] = st.session_state[f'selected_experiment_dropdown_{exp_index}_tagger']
 
 
@@ -312,6 +314,6 @@ def select_experiment():
         if f"selected_experiment{exp_index}_tagger" in st.session_state:
             layout_info = st.session_state["saved_layout_setting_tagger"][exp_index]
             with st.spinner('Loading component...'):
-                sendDataToJS(st.session_state["selected_experiment%d" % exp_index], layout_info, 'flash_viewer_grid_%d' % exp_index)
+                sendDataToJS(st.session_state["selected_experiment%d_tagger" % exp_index], layout_info, 'flash_viewer_grid_%d' % exp_index)
 
 save_params(params)
\ No newline at end of file