feat: Add 'Show raw data' checkbox to Explore widgets#178
Open
andli28 wants to merge 1 commit intoepic-open-source:mainfrom
Open
feat: Add 'Show raw data' checkbox to Explore widgets#178andli28 wants to merge 1 commit intoepic-open-source:mainfrom
andli28 wants to merge 1 commit intoepic-open-source:mainfrom
Conversation
202ec68 to
9b69db1
Compare
This commit adds a 'Show raw data' checkbox to the `Explore...` widgets in the seismometer package. When the checkbox is enabled, the underlying pandas.DataFrame used to produce the current visualization is displayed. The raw data output updates reactively when any widget controls (e.g., dropdowns, sliders, filters) change. To achieve this, the following changes were made: - The `UpdatePlotWidget` in `src/seismometer/controls/explore.py` was updated to include the 'Show raw data' checkbox. - The `ExplorationWidget` in the same file was modified to handle the display of the raw data. - The plot functions in `src/seismometer/api/plots.py` and `src/seismometer/api/explore.py` were updated to return a tuple of (HTML, pd.DataFrame). - The `@disk_cached_html_segment` decorator was removed from the modified plot functions to avoid caching issues with the new return type. - Tests in `tests/controls/test_explore.py` were updated to reflect these changes.
9b69db1 to
fa253f1
Compare
Collaborator
|
First, so sorry on the delay to review!! I'm struggling a little to understand the goal of the MR / deficiency-gap that is being closed. A couple of the questions I'm trying to resolve:
Alternate paths depending on the needs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Closes #168
Description of changes
This commit adds a 'Show raw data' checkbox to the
Explore...widgets in the seismometer package.When the checkbox is enabled, the underlying pandas.DataFrame used to produce the current visualization is displayed. The raw data output updates reactively when any widget controls (e.g., dropdowns, sliders, filters) change.
To achieve this, the following changes were made:
UpdatePlotWidgetinsrc/seismometer/controls/explore.pywas updated to include the 'Show raw data' checkbox.ExplorationWidgetin the same file was modified to handle the display of the raw data.src/seismometer/api/plots.pyandsrc/seismometer/api/explore.pywere updated to return a tuple of (HTML, pd.DataFrame).disk_cached_html_and_df_segmentwas created to handle caching both the HTML and the DataFrame.tests/controls/test_explore.pywere updated to reflect these changes.Author Checklist
changelog/ISSUE.TYPE.rstfiles; see changelog/README.md.