[MAINTENANCE] Remove dead expectation helpers and types/attributes#11765
[MAINTENANCE] Remove dead expectation helpers and types/attributes#11765joshua-stauffer wants to merge 1 commit intodevelopfrom
Conversation
Removes dead expectation helper modules (regex_based_column_map_expectation, set_based_column_map_expectation, validation_handlers) and the unused types/attributes module.
✅ Deploy Preview for niobium-lead-7998 canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR removes several expectation helper/base modules and a types helper (Attributes) that were flagged as unreachable by an AST-based dead code analyzer, and updates Sphinx public-API configuration to reflect the removals.
Changes:
- Deleted dead expectation helper modules:
regex_based_column_map_expectation.py,set_based_column_map_expectation.py, andvalidation_handlers.py. - Deleted the
great_expectations.types.Attributesimplementation (types/attributes.py). - Removed corresponding entries from Sphinx public API tracking/excludes lists.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| great_expectations/types/attributes.py | Deletes the Attributes type helper. |
| great_expectations/expectations/validation_handlers.py | Removes an unused MetaPandasDataset stub. |
| great_expectations/expectations/set_based_column_map_expectation.py | Removes set-based column map expectation base + metric provider. |
| great_expectations/expectations/regex_based_column_map_expectation.py | Removes regex-based column map expectation base + metric provider. |
| docs/sphinx_api_docs_source/public_api_missing_threshold.py | Drops missing-threshold entries referencing removed functions. |
| docs/sphinx_api_docs_source/public_api_excludes.py | Drops excludes entry referencing removed types/attributes.py. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| file=pathlib.Path("great_expectations/expectations/metrics/metric_provider.py"), | ||
| name="metric_value", | ||
| ), | ||
| PrintableDefinition( | ||
| file=pathlib.Path( | ||
| "great_expectations/expectations/regex_based_column_map_expectation.py" | ||
| ), | ||
| name="validate_configuration", | ||
| ), | ||
| PrintableDefinition( | ||
| file=pathlib.Path( | ||
| "great_expectations/expectations/set_based_column_map_expectation.py" | ||
| ), | ||
| name="validate_configuration", | ||
| ), | ||
| PrintableDefinition( | ||
| file=pathlib.Path( | ||
| "great_expectations/experimental/metric_repository/metric_retriever.py" |
There was a problem hiding this comment.
The modules being deleted here (regex_based_column_map_expectation.py / set_based_column_map_expectation.py) are still imported elsewhere in-repo (e.g. multiple contrib expectations under contrib/**/expect_*.py and versioned docusaurus docs templates). Removing the files will cause ImportError for those paths and can break scripts that import contrib expectations (e.g. assets/scripts/build_gallery.py). Either update those downstream imports to the replacement API (or refactor those expectations/templates), or keep thin compatibility shims at the original import locations that re-export the new implementation (with a deprecation path).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11765 +/- ##
===========================================
+ Coverage 84.59% 85.15% +0.56%
===========================================
Files 473 469 -4
Lines 39260 38999 -261
===========================================
Hits 33211 33211
+ Misses 6049 5788 -261 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Removes dead code identified by the dead code analyzer (AST-based reachability analysis from
@public_apiroots).Removed
great_expectations/expectations/regex_based_column_map_expectation.pygreat_expectations/expectations/set_based_column_map_expectation.pygreat_expectations/expectations/validation_handlers.pygreat_expectations/types/attributes.pyVerification performed
@public_apidecorators on removed codecloudorgx-runner__init__.pyre-export references remainingdead_code_exceptions.jsonGenerated with Claude Code using the dead-code-removal skill.