fix: change flag in explorers to accept numerical categorical#661
Open
Felipedino wants to merge 2 commits into
Open
fix: change flag in explorers to accept numerical categorical#661Felipedino wants to merge 2 commits into
Felipedino wants to merge 2 commits into
Conversation
…ns in explorers and frontend components
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the explorer-specific numeric_categorical_only flag with a more general type_dtype_restrictions metadata mapping, and wires that restriction through backend validation and notebook frontend column selection.
Changes:
- Backend explorer metadata now emits
type_dtype_restrictionsand validation enforces per-type dtype exclusions. - Affected explorers now declare categorical dtype exclusions explicitly.
- Notebook frontend column filtering now consumes
type_dtype_restrictions.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
DashAI/back/exploration/base_explorer.py |
Adds metadata defaulting/removal behavior and validates per-type dtype restrictions. |
DashAI/back/exploration/explorers/corr_matrix.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/back/exploration/explorers/cov_matrix.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/back/exploration/explorers/ecdf_plot.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/back/exploration/explorers/multibox_plot.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/back/exploration/explorers/parallel_cordinates.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/back/exploration/explorers/scatter_matrix.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/back/exploration/explorers/scatter_plot.py |
Replaces legacy categorical numeric flag with explicit dtype restrictions. |
DashAI/front/src/components/notebooks/ColumnSelector.jsx |
Applies backend dtype restrictions when determining valid/selectable columns. |
DashAI/front/src/components/notebooks/RightBar.jsx |
Applies backend dtype restrictions when determining whether explorers are available. |
DashAI/front/src/components/notebooks/explorerCreation/ScopeStepExplorer.jsx |
Passes explorer dtype restrictions into the column selector. |
tests/back/exploration/test_base_explorer_metadata.py |
Updates backend metadata and validation tests for the new restriction model. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request refactors how per-type dtype restrictions are handled in both the backend and frontend, replacing the old
numeric_categorical_onlyflag with a more flexibletype_dtype_restrictionsmapping. This change improves clarity, extensibility, and consistency across the codebase. It also updates relevant validation logic and tests, and ensures the frontend properly respects these backend restrictions when selecting columns.Backend changes:
numeric_categorical_onlyflag in explorer metadata with a newtype_dtype_restrictionsdictionary, allowing explicit per-type dtype exclusions (e.g., forCategorical, excludestring,bool, and empty dtypes). This is reflected in all relevant explorer classes. [1] [2] [3] [4] [5] [6] [7]get_metadatainbase_explorer.pyto remove internal-only flags (numeric_categorical_only), always includetype_dtype_restrictions, and ensure the frontend receives the correct metadata.validate_columnslogic to usetype_dtype_restrictionsfor per-type dtype validation instead of the old flag. [1] [2]Frontend changes:
ColumnSelectorcomponent and its consumers to accept and enforcetypesDtypeRestrictionswhen determining valid/invalid columns for selection. [1] [2] [3] [4] [5] [6] [7]Testing improvements:
type_dtype_restrictionslogic, including positive and negative cases, and checks for correct metadata emission and legacy flag removal.These changes collectively make dtype restrictions more explicit and maintainable, and ensure consistent enforcement across the backend and frontend.