Add synthetic financial ledger fixture with accounting negatives (#496) - #503
Open
muhammad-muneeb3 wants to merge 1 commit into
Open
muhammad-muneeb3 wants to merge 1 commit into
muhammad-muneeb3 wants to merge 1 commit into
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
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.
What changed?
tests/fixtures/financial_ledger.csvand its accompanying expectations filetests/fixtures/financial_ledger.expectations.json[cite: 1, 3].parse_currency_partsinsrc/freshdata/semantic/experts.pyto identify and parse parenthesized accounting negative values (e.g.,(1,250.00)) as valid negative numeric values[cite: 1, 2]._MONEY_NAMEinsrc/freshdata/engine/context.pyandsrc/freshdata/semantic/context.pyso amount and balance columns are not misclassified asidortextroles due to high cardinality[cite: 2].financial_ledgerintests/expectations.py, generated the golden snapshot, and added targeted test coverage intests/test_currency_locale.py[cite: 1, 2, 3].Why?
Ensures FreshData robustly handles localized financial conventions—specifically parenthesized accounting negatives and currency formats—without regressing semantic detection or data cleaning pipelines[cite: 1].
Fixes #496[cite: 1]
How was it tested?
tests/pytest -m "not online and not large"ruff check .andmypy src/freshdata.Targeted test command run locally: