-
Notifications
You must be signed in to change notification settings - Fork 53
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
Division title importer/exporter #1765
Conversation
Populate the php setting from an env var.
2cdd02e
to
00020cb
Compare
I've added a venv creation process to Added some packages to the packages file for future docker use but these are all present on the server anyway so should be fine. |
00020cb
to
f80d569
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny things is all!
Issues above resolved, I've also just quickly updated the packages now we're not stuck on an old pandas version because of 3.7 - 4905383 |
- Update existing data to be 'Manual' when it has a yes_text.
- Export parquet dumps of divisions and votes - Ingest manual and automated updates of titles from remote sources Requirements.txt until server python is updated
- IN - division titles from Parliament where they exist - OUT - a dump of the divisions table (for twfy-votes).
4905383
to
2407762
Compare
This PR adds
division_io.py
- a click CLI to handle importing and exporting division data.This handles bulk importing updates to division titles (e.g. from Parliament's commons votes api), and exporting parquet tables of divisions as a basic api to feed twfy-votes.
There is an adjustment to the division table schema - adding a
title_priority
field. This is to keep track of the origin of the current title, and stop manual updates to titles being overridden by automated ones. Existing titles with ayes_text
are retrospectively updated in priority.For the moment, this uses a requirements.txt file for the needed python packages. When the server is updated, I'll do a new PR to tidy up the python-tooling in general. Unsure for the moment if this needs the morningupdate commands to run in a venv, or if system packages can just be updated in the short term.