Skip to content

Commit

Permalink
Merge pull request #77 from t0mdavid-m/minor_bugfixes
Browse files Browse the repository at this point in the history
Minor bugfixes
  • Loading branch information
t0mdavid-m authored Dec 18, 2024
2 parents 47bbe7d + 5cd17b5 commit 5f64cba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -159,9 +159,10 @@ COPY default-parameters.json /app/default-parameters.json
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

Expand Down
2 changes: 2 additions & 0 deletions content/FLASHDeconv/FLASHDeconvViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}']


Expand Down
4 changes: 3 additions & 1 deletion content/FLASHTnT/FLASHTnTViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']


Expand Down Expand Up @@ -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)

0 comments on commit 5f64cba

Please sign in to comment.