Conversation
…_type - Replace row_classification_facade import in PageValidationService with direct row_classifiers import - Replace row_classification_facade import in ContentDensityService with direct row_classifiers import - Replace row_classification_facade import in RowMergerService with direct row_classifiers import - Use cached _classifier instance per object via hasattr guard
…to service singletons - Delete content_analysis_facade.py, validation_facade.py, row_classification_facade.py - Rewire pdf_table_extractor.py to import directly from services using module-level singletons - Remove _looks_like_date and calculate_row_completeness_score from __all__ - Fix pdf_extractor.py to import from services (validation, header_detection) directly - Rule 3 auto-fix: pdf_extractor.py used validation_facade which would have broken on deletion
- Add test_facade_modules_deleted to test_architecture.py asserting ModuleNotFoundError - Add test_shim_singletons.py verifying module-level singleton identity - Update test_no_production_shim_imports docstring/error message to reflect new import targets
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.
Summary
Closes #20
_classify_row_typemethods inPageValidationService,ContentDensityService, andRowMergerServiceto import directly fromextraction.row_classifierswith per-object cached instancescontent_analysis_facade.py,validation_facade.py,row_classification_facade.pypdf_table_extractor.pyshim to use module-level singletons instead of facade pass-throughspdf_extractor.pyto import directly from services (four lazy facade imports replaced)test_facade_modules_deletedarchitecture guard andtest_shim_singletons.pysingleton identity testsTest plan
test_facade_modules_deleted— confirms all three facade modules raiseModuleNotFoundErrortest_no_production_shim_imports— confirms zero production source imports from shimtest_shim_singletons.py— confirms module-level singleton identityPart of Architecture RFC series