Hea 572/relax data completeness constraint#179
Merged
Conversation
…_completeness_constraint_2
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR relaxes data completeness constraints in the HEA database development pipeline by introducing a configurable strictness mode and updating the Python target version to 3.12.
- Adds configurable strict mode to handle validation errors as warnings instead of exceptions when strictness is disabled
- Updates Python target version from 3.10 to 3.12 across configuration files
- Refactors asset functions to use consistent return patterns and improved error handling
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updates Python version requirements and tool configurations to target Python 3.12 |
| pipelines_tests/test_assets/test_livelihood_activity_regexes.json | Adds new test cases for wild food and fish gathering activities |
| pipelines/assets/wild_foods.py | Refactors asset functions to use config parameter and simplified return patterns |
| pipelines/assets/wealth_characteristic.py | Updates validation function call to include config parameter |
| pipelines/assets/other_cash_income.py | Refactors asset functions similar to wild_foods.py with config support |
| pipelines/assets/livelihood_activity_regexes.json | Adds new regex patterns for wild food and fish gathering with numeric support |
| pipelines/assets/livelihood_activity.py | Major refactoring to support configurable strictness and improved error handling |
| pipelines/assets/fixtures.py | Complete rewrite of validation logic to support per-instance validation and configurable strictness |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| record_reference += f"{instance['bss_column']}:{instance['bss_column']}: " | ||
| elif "bss_row" in instance: | ||
| record_reference += f"{instance['bss_row']}:{instance['bss_row']}: " | ||
| record_reference += f"{str({k: v for k,v in instance.items()})}" |
There was a problem hiding this comment.
[nitpick] The dictionary comprehension and str() conversion creates verbose error messages. Consider limiting the keys shown or formatting the output more readably.
girum-air
approved these changes
Oct 15, 2025
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.
No description provided.