Skip to content

refactor: centralize config and remove dead code#61

Merged
maskedsyntax merged 1 commit intomainfrom
refactor/cleanup-and-centralize-config
Feb 19, 2026
Merged

refactor: centralize config and remove dead code#61
maskedsyntax merged 1 commit intomainfrom
refactor/cleanup-and-centralize-config

Conversation

@maskedsyntax
Copy link
Member

@maskedsyntax maskedsyntax commented Feb 19, 2026

Summary

  • Created hashprep/config.py with all thresholds as frozen dataclasses, single source of truth for 80+ magic numbers scattered across check files
  • Removed ~160 lines of commented-out code in summaries/variables.py
  • Removed dead _check_feature_correlation() function in correlations.py (defined but never registered/called)
  • Fixed redundant infer_types() call : was called in DatasetAnalyzer.__init__ AND again inside summarize_variables(), now passes column_types through
  • Removed unused dependencies: fastapi, starlette, brotli from pyproject.toml (dependency hygiene)
  • Cleaned up unused imports/variables in correlations.py and type_inference.py

All 82 tests pass with no regressions.

Test plan

  • All 82 existing tests pass (275s)
  • All thresholds retain their original default values
  • Config dataclasses are frozen (immutable) to prevent accidental mutation

- Create hashprep/config.py with all thresholds as typed dataclasses
- Replace 80+ magic numbers across check files with config references
- Remove ~160 lines of commented-out code in summaries/variables.py
- Remove dead _check_feature_correlation() function in correlations.py
- Remove unused imports (f_oneway, infer_types, numpy) in correlations.py and type_inference.py
- Fix redundant infer_types() call: pass column_types from analyzer to summarize_variables()
- Remove unused dependencies: fastapi, starlette, brotli from pyproject.toml
- Clean up unused variables (text_cols, corr_methods, default_methods) in correlations.py
@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hashprep Ready Ready Preview, Comment Feb 19, 2026 10:52am

@maskedsyntax maskedsyntax merged commit 2705769 into main Feb 19, 2026
2 checks passed
@maskedsyntax maskedsyntax deleted the refactor/cleanup-and-centralize-config branch February 19, 2026 10:56
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.

1 participant