As mentioned in this PR #15, in each page we initialize the session state variables relevant to the page, e.g. on module Anomalies Plot.py we do
if "eac4_anomalies_start_date" not in st.session_state:
st.session_state["eac4_anomalies_start_date"] = datetime(2022, 1, 1)
if "eac4_anomalies_end_date" not in st.session_state:
st.session_state["eac4_anomalies_end_date"] = datetime(2022, 12, 31)
if "eac4_anomalies_times" not in st.session_state:
st.session_state["eac4_anomalies_times"] = ["00:00"]
Is there a better way? Maybe initialize all used vars in session state at the beginning of the program? Or using a config file?
As mentioned in this PR #15, in each page we initialize the session state variables relevant to the page, e.g. on module
Anomalies Plot.py
we doIs there a better way? Maybe initialize all used vars in session state at the beginning of the program? Or using a config file?