Skip to content

295713: Refactor individual and household data processing in sync.py#323

Open
arsen-vs wants to merge 2 commits intodevelopfrom
feature/295713
Open

295713: Refactor individual and household data processing in sync.py#323
arsen-vs wants to merge 2 commits intodevelopfrom
feature/295713

Conversation

@arsen-vs
Copy link
Contributor

@arsen-vs arsen-vs commented Feb 2, 2026

  • 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.

AB#295713

@arsen-vs arsen-vs changed the title Refactor individual and household data processing in sync.py 295713: Refactor individual and household data processing in sync.py Feb 3, 2026
@domdinicola
Copy link
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.
- 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
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.46%. Comparing base (d99dc00) to head (5bfa943).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

raw_individual_fields = dict(raw_individual)
individual_fields = preprocess(
raw_individual,
raw_individual_fields.copy(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't there be duplication of copying here?
raw_individual_fields = dict(raw_individual)
and then
raw_individual_fields.copy()

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.

3 participants