As by a suggestion from Magnus, we should introduce a class to keep track of all session_state keys used throughout the app and replace all instances of accessing the keys with a reference to this class.
Turn this:
if 'dataset' in st.session_state
into this:
class SessionStateKeys:
DATASET = 'dataset
if SessionStateKeys.DATASET in st.session_state
This way we can easily look up all references to that state and we have an overview of all keys used throughout the app.
I implemented this for the data import page.
Please check if this looks as intended Magnus, and if you think this might be breaking at other points in the app Mikhail.
As by a suggestion from Magnus, we should introduce a class to keep track of all session_state keys used throughout the app and replace all instances of accessing the keys with a reference to this class.
Turn this:
if 'dataset' in st.session_state
into this:
This way we can easily look up all references to that state and we have an overview of all keys used throughout the app.
I implemented this for the data import page.
Please check if this looks as intended Magnus, and if you think this might be breaking at other points in the app Mikhail.