Roestlab / massdash

MassDash: A web-based dashboard for streamlined DIA-MS visualization, analysis, prototyping, and optimization
https://massdash.streamlit.app/
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Update Tests for better pandas df snapshots #112

Closed jcharkow closed 6 months ago

jcharkow commented 7 months ago

Issue:

Currently, snapshots using a pandas dataframe seem to be broken to me as it is not actually checking the entire dataframe just sections of this.

image

One option I've considered is converting to dictionaries however sometimes tests still fail because dictionaries have no order in their columns.

Currently, the best solution I can find is using a custom extension of syrupy which allows for snapshots with pandas dataframes. I am currently working on that in the https://github.com/Roestlab/massdash/tree/test/add_tests branch.

This would require additional dependencies of pytest and syrupy however I think it is worth it. @singjc @irahorecka please let me know your thoughts

singjc commented 7 months ago

@jcharkow @irahorecka I think we should add unittests for the main stream app as well.

https://docs.streamlit.io/library/api-reference/app-testing

jcharkow commented 7 months ago

I am working on this in https://github.com/Roestlab/massdash/tree/test/gui_tests

jcharkow commented 6 months ago

Closing this because Pandas Df snapshots have been added. Note: We still have to do streamlit tests