295713: Refactor individual and household data processing in sync.py#323
Open
295713: Refactor individual and household data processing in sync.py#323
Conversation
Collaborator
|
@arsen-vs test fails |
- Updated the `create_individuals` and `create_household` functions to use copies of raw data fields for processing, ensuring original data remains unchanged. - Changed the implementation of `default_fields_applier` to a standard function definition for clarity. - These adjustments enhance data integrity during the transformation and mapping processes.
9bdf690 to
6a04900
Compare
- Modified the `test_create_individuals` function to use `individual_data` for raw data, enhancing clarity and accuracy in the test. - Updated the `test_create_household` function to mock `extract_household_data` with a return value, ensuring that the test accurately reflects the expected data structure during household creation. - These changes improve the reliability of the tests by ensuring they align with the latest data processing logic.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #323 +/- ##
========================================
Coverage 96.46% 96.46%
========================================
Files 217 217
Lines 8221 8222 +1
Branches 833 833
========================================
+ Hits 7930 7931 +1
Misses 160 160
Partials 131 131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| raw_individual_fields = dict(raw_individual) | ||
| individual_fields = preprocess( | ||
| raw_individual, | ||
| raw_individual_fields.copy(), |
Contributor
There was a problem hiding this comment.
Won't there be duplication of copying here?
raw_individual_fields = dict(raw_individual)
and then
raw_individual_fields.copy()
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.
create_individualsandcreate_householdfunctions to use copies of raw data fields for processing, ensuring original data remains unchanged.default_fields_applierto a standard function definition for clarity.AB#295713