Skip to content

Commit

Permalink
Revert "every page save params of current session/ during exec at the…
Browse files Browse the repository at this point in the history
… end"

This reverts commit 3dfef2f.
  • Loading branch information
Arslan-Siraj committed Nov 13, 2024
1 parent e8dce16 commit f6f4eee
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 32 deletions.
9 changes: 3 additions & 6 deletions content/documentation.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import streamlit as st
from src.common.common import page_setup, save_params
from src.common.common import page_setup
from pathlib import Path
from docs.toppframework import content as topp_framework_content

params = page_setup()
page_setup()


st.title("Documentation")
Expand Down Expand Up @@ -106,7 +106,4 @@
if page == pages[5]:
with open(Path("docs", "deployment.md"), "r", encoding="utf-8") as f:
content = f.read()
st.markdown(content)


save_params(params)
st.markdown(content)
8 changes: 3 additions & 5 deletions content/download_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from pathlib import Path
import shutil

from src.common.common import page_setup, save_params
from src.common.common import page_setup
from zipfile import ZipFile, ZIP_DEFLATED

params = page_setup()
page_setup()

# Define output folder here; all subfolders will be handled as downloadable
# directories
Expand Down Expand Up @@ -71,6 +71,4 @@
with columns[2]:
if st.button(f"🗑️ {directory.name}", use_container_width=True):
shutil.rmtree(directory)
st.rerun()

save_params(params)
st.rerun()
6 changes: 2 additions & 4 deletions content/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from pathlib import Path
import streamlit as st

from src.common.common import page_setup, v_space, save_params
from src.common.common import page_setup, v_space

params = page_setup(page="main")
page_setup(page="main")

st.markdown("# 👋 Quick Start")
st.markdown("## Template for OpenMS web apps using the **streamlit** framework")
Expand Down Expand Up @@ -163,5 +163,3 @@
label="How to run any command line tool as subprocess from within the OpenMS web app.",
icon="➡️",
)

save_params(params)
5 changes: 1 addition & 4 deletions content/raw_data_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import streamlit as st

from src.common.common import page_setup, save_params
from src.common.common import page_setup
from src import view


Expand Down Expand Up @@ -42,6 +42,3 @@
view.view_spectrum()
with tabs[2]:
view.view_bpc_tic()


save_params(params)
5 changes: 1 addition & 4 deletions content/run_example_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@



mzmlfileworkflow.result_section(result_dir)


save_params(params)
mzmlfileworkflow.result_section(result_dir)
3 changes: 1 addition & 2 deletions content/topp_workflow_execution.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import streamlit as st
from src.common.common import page_setup, save_params
from src.common.common import page_setup
from src.Workflow import Workflow


Expand All @@ -11,5 +11,4 @@

wf.show_execution_section()

save_params(params)

3 changes: 1 addition & 2 deletions content/topp_workflow_file_upload.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import streamlit as st
from src.common.common import page_setup, save_params
from src.common.common import page_setup
from src.Workflow import Workflow


Expand All @@ -11,5 +11,4 @@

wf.show_file_upload_section()

save_params(params)

4 changes: 1 addition & 3 deletions content/topp_workflow_parameter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import streamlit as st
from src.common.common import page_setup, save_params
from src.common.common import page_setup
from src.Workflow import Workflow


Expand All @@ -10,5 +10,3 @@
st.title(wf.name)

wf.show_parameter_section()

save_params(params)
3 changes: 1 addition & 2 deletions content/topp_workflow_results.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import streamlit as st
from src.common.common import page_setup, save_params
from src.common.common import page_setup
from src.Workflow import Workflow


Expand All @@ -11,4 +11,3 @@

wf.show_results_section()

save_params(params)

0 comments on commit f6f4eee

Please sign in to comment.