Skip to content

Commit

Permalink
Merge pull request #514 from Proteobench/re-revert-stpages-removal
Browse files Browse the repository at this point in the history
Remove dependency on st_pages
  • Loading branch information
RobbinBouwmeester authored Dec 19, 2024
2 parents 764c42a + 4040fce commit 8136cc5
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 294 deletions.
2 changes: 0 additions & 2 deletions webinterface/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import pages.texts.proteobench_builder as pbb
import streamlit as st
from st_pages import show_pages_from_config

import proteobench

Expand All @@ -20,7 +19,6 @@ def __init__(self) -> None:

self._preface()
self._main_page()
show_pages_from_config()

def _preface(self):
st.markdown(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

class StreamlitUI:
def __init__(self):
print("page loaded")
self.variables_dda_quant: VariablesDDAQuant = VariablesDDAQuant()
self.texts: Type[WebpageTexts] = WebpageTexts
self.texts.ShortMessages.title = "DDA Ion quantification"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import logging
from typing import Any, Dict, Type

import pages.texts.proteobench_builder as pbb
import pages_dir.texts.proteobench_builder as pbb
import streamlit as st
from pages.base_pages.quant import QuantUIObjects
from pages.pages_variables.Quant.lfq.peptidoform.DDA.peptidoform_variables import (
from pages_dir.base_pages.quant import QuantUIObjects
from pages_dir.pages_variables.Quant.lfq.peptidoform.DDA.peptidoform_variables import (
VariablesDDAQuant,
)
from pages.texts.generic_texts import WebpageTexts
from pages_dir.texts.generic_texts import WebpageTexts

from proteobench.io.parsing.parse_settings import ParseSettingsBuilder
from proteobench.modules.quant.lfq.peptidoform.DDA.quant_lfq_peptidoform_DDA import (
Expand Down
281 changes: 0 additions & 281 deletions webinterface/pages/TEMPLATE.py

This file was deleted.

12 changes: 6 additions & 6 deletions webinterface/pages/base_pages/quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def initialize_main_slider(self) -> None:
if self.variables_quant.slider_id_uuid not in st.session_state.keys():
st.session_state[self.variables_quant.slider_id_uuid] = uuid.uuid4()
if st.session_state[self.variables_quant.slider_id_uuid] not in st.session_state.keys():
st.session_state[
st.session_state[self.variables_quant.slider_id_uuid]
] = self.variables_quant.default_val_slider
st.session_state[st.session_state[self.variables_quant.slider_id_uuid]] = (
self.variables_quant.default_val_slider
)

def generate_main_selectbox(self) -> None:
"""Creates the selectbox for the Streamlit UI."""
Expand Down Expand Up @@ -116,9 +116,9 @@ def initialize_submitted_slider(self) -> None:
if self.variables_quant.slider_id_submitted_uuid not in st.session_state.keys():
st.session_state[self.variables_quant.slider_id_submitted_uuid] = uuid.uuid4()
if st.session_state[self.variables_quant.slider_id_submitted_uuid] not in st.session_state.keys():
st.session_state[
st.session_state[self.variables_quant.slider_id_submitted_uuid]
] = self.variables_quant.default_val_slider
st.session_state[st.session_state[self.variables_quant.slider_id_submitted_uuid]] = (
self.variables_quant.default_val_slider
)

def display_submitted_results(self) -> None:
"""Displays the results section of the page for submitted data."""
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class VariablesDIAQuantdiaPASEF:
download_selector_id_uuid: str = "download_selector_id_dia_quant_diaPASEF"
table_id_uuid: str = "table_id_dia_quant_diaPASEF"

additional_params_json: str = "../webinterface/configuration/dia_quant.json" # TODO: make a new file for this, and adapt the configuration file for each module.
additional_params_json: str = (
"../webinterface/configuration/dia_quant.json" # TODO: make a new file for this, and adapt the configuration file for each module.
)

description_module_md: str = "pages/markdown_files/Quant/lfq/ion/DIA/diaPASEF/introduction.md"
description_files_md: str = "pages/markdown_files/Quant/lfq/ion/DIA/diaPASEF/file_description.md"
Expand Down

0 comments on commit 8136cc5

Please sign in to comment.