Skip to content

Commit 7de850a

Browse files
committed
move to streamlit_analytics2
1 parent 95fc3c2 commit 7de850a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ speasy>=1.2.0
88
solarmach>=0.3.2
99
stqdm
1010
streamlit
11-
streamlit-analytics
11+
streamlit-analytics2
1212
sunpy # set to >=4.1.5 once the streamlit.app has been re-deployed with a newer python version (cf. https://discuss.streamlit.io/t/specifying-python-version/32891)

streamlit_app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88
from stqdm import stqdm
99
import streamlit as st
10-
# import streamlit_analytics # TODO: un-comment when streamlit-analytics has been updated with https://github.com/jrieke/streamlit-analytics/pull/44
10+
import streamlit_analytics2 # TODO: un-comment when streamlit-analytics has been updated with https://github.com/jrieke/streamlit-analytics/pull/44
1111
from astropy.coordinates import SkyCoord
1212
from sunpy.coordinates import frames
1313
from solarmach import SolarMACH, print_body_list, get_sw_speed
@@ -456,11 +456,11 @@ def get_short_url(url):
456456
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
457457

458458
# TODO: un-comment the following when streamlit-analytics has been updated with https://github.com/jrieke/streamlit-analytics/pull/44
459-
# if os.path.exists('.streamlit/secrets.toml'):
460-
# streamlit_analytics.stop_tracking(unsafe_password=st.secrets["streamlit_analytics_password"])
461-
# else:
462-
# # Use default password if it is not defined in a streamlit secret. Change this if you want to use it!
463-
# streamlit_analytics.stop_tracking(unsafe_password='opdskf03i45+0ikfg')
459+
if os.path.exists('.streamlit/secrets.toml'):
460+
streamlit_analytics.stop_tracking(unsafe_password=st.secrets["streamlit_analytics_password"])
461+
else:
462+
# Use default password if it is not defined in a streamlit secret. Change this if you want to use it!
463+
streamlit_analytics.stop_tracking(unsafe_password='opdskf03i45+0ikfg')
464464

465465
# if not in analytics mode, clear params from URL because Streamlit 1.0 still
466466
# get some hickups when one changes the params; it then gets confused with the

0 commit comments

Comments
 (0)