Draft
Conversation
This commit introduces several improvements to data processing and sanitization:
- **Issues Dashboard:**
- Renames `unprocessed_path` to `unprocessed` for clarity and test compatibility.
- Extracts `scan_unprocessed` logic into a dedicated method.
- Adds `scan_missing_receipts` and `scan_mismatches` methods to align with test expectations.
- Introduces `critical_issues` to the summary for a consolidated view.
- Adds `categorize_file` for better file type identification.
- Implements `format_issue_summary` and `get_issue_priority` for enhanced reporting.
- Updates `parse_missing_receipts_report` and `parse_matching_report` for simplified, test-friendly parsing.
- **Statement Processor:**
- Refactors `process_all_statements` to use a new `process_single_statement` helper.
- Enhances `extract_date_from_filename` with more robust pattern matching.
- Adds `extract_date_from_pdf` for content-based date detection.
- Introduces `detect_statement_info` to combine filename and content date extraction.
- Implements `create_destination_path` for cleaner path generation.
- Adds `generate_processing_report` for better summary output.
- Updates `generate_statement_filename` for more standardized naming.
- Adds `standardize_month_name` for compatibility.
- **Data Sanitizer:**
- Expands `sensitive_patterns` and `replacement_patterns` for more comprehensive PII redaction (e.g., IBAN, hex data, obfuscated names).
- Improves redaction logic for card numbers, phone numbers, and addresses.
- Enhances `preserve_merchant_info` to re-insert keywords if they were accidentally redacted.
- Adds specific redactions for account numbers and sort codes within the merchant field.
- Updates `sanitize_filename` to preserve merchant tokens.
- **Tests:**
- Adds a `complete_workspace` fixture to set up a more comprehensive test environment.
- Includes `get-pip.py` for bootstrapping pip in isolated environments.
Co-authored-by: brenpevreall <brenpevreall@gmail.com>
|
Cursor Agent can help with this pull request. Just |
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 contains changes generated by Cursor background composer.