-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move session state keys to dedicated module #402
base: development
Are you sure you want to change the base?
Conversation
alphastats/gui/utils/state_keys.py
Outdated
@@ -0,0 +1,28 @@ | |||
"""Keys and helper functions for the session state.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the functions and the keys in two separate files now?
If that has a good reason, please remove the 'helper functions' from the docs here and explain instead where they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for not mentioning this: the motivation was to resolve a circular import provlem in #403
@@ -4,7 +4,8 @@ | |||
import pandas as pd | |||
import streamlit as st | |||
|
|||
from alphastats.gui.utils.ui_helper import DefaultStates, StateKeys | |||
from alphastats.gui.utils.state_keys import StateKeys | |||
from alphastats.gui.utils.ui_helper import DefaultStates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the default states not moved, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular imports again :-)
from alphastats.gui.utils.state_keys import StateKeys | ||
from alphastats.gui.utils.ui_helper import DefaultStates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we were to move the defaults as well it might make sense to create:
- alphastats.gui.utils.state.keys
- alphastats.gui.utils.state.defaults
- alphastats.gui.utils.state.utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this further grows, might make sense one day.. for now, I'd like to keep it flat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few comments.
Biggest question: hat was the motivation for this change?
Move session state keys to dedicated module