Skip to content
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

Open
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

mschwoer
Copy link
Contributor

Move session state keys to dedicated module

@@ -0,0 +1,28 @@
"""Keys and helper functions for the session state."""
Copy link
Collaborator

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.

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

circular imports again :-)

Comment on lines +7 to +8
from alphastats.gui.utils.state_keys import StateKeys
from alphastats.gui.utils.ui_helper import DefaultStates
Copy link
Collaborator

@JuliaS92 JuliaS92 Mar 11, 2025

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

Copy link
Contributor Author

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

Copy link
Collaborator

@JuliaS92 JuliaS92 left a 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants