Hea 573/preliminary fixes#172
Merged
Merged
Conversation
Francophone BSS have `à` in row 4 in the WB worksheet in the summary columns (`synthèse | de | à`). And `a` is an alias for the B/O Wealth Group Category (from Aisé). So the previous code was matching that and thinking the data was for B/O instead of part of the WB summary.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds ensure_ascii=False parameter to all json.dumps() calls throughout the codebase to properly handle non-ASCII characters in JSON serialization. It also includes a minor refactoring to replace a try-except block with a conditional check in the baseline.py file.
- Adds
ensure_ascii=Falseto all JSON serialization calls to preserve Unicode characters - Refactors exception handling in wealth group data processing to use conditional logic
- Updates JSON formatting in temporary file writing for Django fixture imports
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pipelines/resources.py | Adds ensure_ascii=False to JSON output resource serialization |
| pipelines/assets/wild_foods.py | Updates JSON metadata preview to preserve Unicode characters |
| pipelines/assets/wealth_characteristic.py | Updates JSON previews in two functions to handle Unicode properly |
| pipelines/assets/other_cash_income.py | Adds Unicode support to JSON metadata preview |
| pipelines/assets/livelihood_activity.py | Updates JSON previews in two functions for Unicode handling |
| pipelines/assets/fixtures.py | Adds Unicode support to multiple JSON operations including fixture generation |
| pipelines/assets/baseline.py | Updates JSON previews and refactors try-except to conditional check |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.