From 7306aef8d4479015c0d35b3625afc5edfeef7d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20Sch=C3=A4fer?= Date: Thu, 6 Apr 2023 15:21:36 +0200 Subject: [PATCH] changed deprecated experimental functions and some minor changes in requirements.txt --- .gitignore | 5 +++++ code/dia_overview.py | 3 --- code/download.py | 2 +- code/helpers.py | 2 +- code/requirements.txt | 1 - 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f7275bb..e4b0fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ venv/ +*.pyc +__pycache__/ +node_modules/ +upload/ +package*.json diff --git a/code/dia_overview.py b/code/dia_overview.py index bb44036..144f5d7 100644 --- a/code/dia_overview.py +++ b/code/dia_overview.py @@ -1,9 +1,6 @@ #!/usr/bin/python3 import streamlit as st -#import multiprocessing_on_dill as multiprocessing -# better than dill - dill sometimes did hang while multiprocess is using dill but -# never hung in my tests. Dill is necessary for serialization import multiprocess as multiprocessing import sar_data_crafter as sdc import dataframe_funcs as dff diff --git a/code/download.py b/code/download.py index cd0a877..e6f8fa0 100644 --- a/code/download.py +++ b/code/download.py @@ -8,7 +8,7 @@ """ https://gist.github.com/chad-m/6be98ed6cf1c4f17d09b7f6e5ca2978f """ -@st.experimental_memo +@st.cache_data def download_button(object_to_download, download_filename, button_text): """ Generates a link to download the given object_to_download. diff --git a/code/helpers.py b/code/helpers.py index c5b121e..f3991d7 100644 --- a/code/helpers.py +++ b/code/helpers.py @@ -170,7 +170,7 @@ def get_selected_header(select_box_title, headers, col=None, key=None): break return (selected, ph) -@st.experimental_singleton +@st.cache_resource def get_metric_desc_from_manpage(): metric_reg = re.compile('^\.IP\s+(.*$)') content = re.compile('^[^\.].*$') diff --git a/code/requirements.txt b/code/requirements.txt index 983d371..cd7d2ea 100644 --- a/code/requirements.txt +++ b/code/requirements.txt @@ -1,7 +1,6 @@ aiofiles altair altair_saver -multiprocessing_on_dill multiprocess pandas PyPDF4