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

Refactor analysis vii #372

Merged
merged 12 commits into from
Nov 15, 2024
Merged

Refactor analysis vii #372

merged 12 commits into from
Nov 15, 2024

Conversation

mschwoer
Copy link
Contributor

Feature drop:
allow to save also statistical analysis, allow to download the resulting data.

Some frontend eye candy, and a refactoring of the frontend methods to be more DRY

@@ -41,7 +41,7 @@
# TODO show more info about the preprocessing steps
display_preprocessing_info(dataset.preprocessing_info)

if c12.button("Reset all Preprocessing steps", key="_reset_preprocessing"):
if c12.button("Reset all Preprocessing steps", key="_reset_preprocessing"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

💯 👌

elif "plotly" in str(type(artifact)):
elif "plotly" in str(
type(artifact)
): # TODO can there be non-plotly types here
Copy link
Collaborator

Choose a reason for hiding this comment

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

for now i don't think so

@@ -88,9 +88,9 @@ def llm_config():
st.info("Create a Volcano plot first using the 'Analysis' page.")
st.stop()

volcano_plot, parameter_dict = st.session_state[StateKeys.LLM_INPUT]
volcano_plot, plot_parameters = st.session_state[StateKeys.LLM_INPUT]
Copy link
Collaborator

Choose a reason for hiding this comment

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

wouldn't this be analysis parameters, if we ever generalize to all analyses being interpretable by LLM?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes but for now it's tied to the volcano, that's we I chose to name it like so

def display_figure(plot: PlotlyObject) -> None:
"""Display plotly or seaborn figure."""
try:
st.plotly_chart(plot.update_layout(plot_bgcolor="white"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would not set the bgcolor. Having transparent backgrounds by default is a good thing from my point of view. If this is just to select the correct st function, no update_layout is needed.

except AttributeError:
plot.savefig(buffer, format=format)
plot.write_image(file=buffer, format=file_format)
except AttributeError: # TODO figure out what else "plot" can be
Copy link
Collaborator

Choose a reason for hiding this comment

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

seaborn apparently

Base automatically changed from refactor_analysis_VI to development November 15, 2024 13:47
@mschwoer mschwoer merged commit 21d1d49 into development Nov 15, 2024
4 of 5 checks passed
@mschwoer mschwoer deleted the refactor_analysis_VII branch November 15, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants