Skip to content

Conversation

@rhunwicks
Copy link
Contributor

No description provided.

Duplicate columns names in wealth_group_df were
causing the pd.concat to add the Baseline Wealth Groups.
The BSSs often use labels that match to `price` for
`PaymentInKind` or `OtherCashIncome` activities, rather
than explicit labels that match `payment_per_time`.
Therefore, we correct misidentified labels for these
Strategy Types.
Refactor the pipeline so that we can generate and import
a fixture for each worksheet (WB, Data, Data2, Data3)
within a BSS, instead of needing to consolidate to a
single fixture first.

We retain the consolidated_fixture and imported_baseline
assets and eventually we should disable the standalone
imports.
@rhunwicks rhunwicks self-assigned this Nov 18, 2024
@rhunwicks
Copy link
Contributor Author

This changes the pipeline so that instead of consolidated the all instances (across WB, Data, Data2 and Data3 worksheets) before validating and creating a fixture, it actually validates and creates and imports a fixture for each worksheet separately. The existing consolidated_fixture asset now consolidates the already validated assets for each worksheet.

So we can load individual worksheets from each BSS for now, and still load the full BSS all in one go later.

Copy link
Contributor

@girumb girumb left a comment

Choose a reason for hiding this comment

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

Minor comments on the doc strings

other_cash_income_fixture,
) -> Output[None]:
"""
Imported Django fixtures for a BSS, added to the Django database.
Copy link
Contributor

Choose a reason for hiding this comment

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

Imported 'OtherCashIncome' Django fixtures for a BSS, added to the Django database

wealth_characteristic_instances,
) -> Output[dict]:
"""
Valid LivelhoodStrategy and LivelihoodActivity instances from a BSS, ready to be loaded via a Django fixture.
Copy link
Contributor

Choose a reason for hiding this comment

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

Valid LivelihoodStrategy and LivelihoodActivity instances for 'OtherCashIncome' from a BSS, ready to be loaded via a Django fixture.

wealth_characteristic_instances,
) -> Output[dict]:
"""
Valid LivelhoodStrategy and LivelihoodActivity instances from a BSS, ready to be loaded via a Django fixture.
Copy link
Contributor

Choose a reason for hiding this comment

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

Valid LivelihoodStrategy and LivelihoodActivity instances for 'WildFoodGathering' from a BSS, ready to be loaded via a Django fixture.

@rhunwicks rhunwicks merged commit 86d11ce into main Nov 19, 2024
17 checks passed
@chrispreee
Copy link
Contributor

@rhunwicks would it be a worthwhile LOE to also enable loading partial sheets, ie, load everything possible without breaking referential integrity? (Possibly with an environment variable to enable these partial loads per environment?)

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.

4 participants