Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some import bugs #623

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Fix some import bugs #623

merged 4 commits into from
Dec 10, 2024

Conversation

struan
Copy link
Member

@struan struan commented Nov 26, 2024

Deal with some bugs in import scripts due to either changes in Pandas or moving of data sources.

Fixes #622 and #621

@struan struan requested a review from zarino November 26, 2024 15:46
@zarino
Copy link
Member

zarino commented Dec 5, 2024

This looks good. Guess the best way to test it, is to drop my Docker volumes, and run a docker compose up from scratch. 😬 Will give it a go when I have a quiet afternoon.

@zarino zarino force-pushed the 622-dataframe-truthiness branch from 9eacd39 to 4162ec9 Compare December 10, 2024 17:20
Copy link
Member

@zarino zarino left a comment

Choose a reason for hiding this comment

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

Tested this out locally (dropping my database, removing the relevant lines from skip_imports, then running script/import-all-data) and all the imports that were previously failing now run fine! 🎉

I’ve amended your commits, @struan, to remove the relevant importers from the skip_imports list as you fix the bug in each commit. And I’ve added a minor improvement to the README, to remind myself—if nobody else—in future that when you run this script from scratch, it doesn’t automatically make all the datasets public, so you need to manually edit the visibility via the Django admin.

struan and others added 4 commits December 10, 2024 17:25
use df.empty to check for data but also check for None where appropriate

Fixes #622
Rather than sharing this across two file. Also updates it to use
people.json as a source rather than the now removed constituencies.json
update the christian aid and onward polling importers to use the
constituency name lookup from the base importer

Fixes #621
@zarino zarino force-pushed the 622-dataframe-truthiness branch from 4162ec9 to 0de5bf2 Compare December 10, 2024 17:25
@zarino zarino merged commit 0de5bf2 into main Dec 10, 2024
5 checks passed
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.

Fix ValueError from import scripts testing the truthiness of a Pandas dataframe
2 participants