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

Feature/add party nations #2147

Merged
merged 2 commits into from
Jul 17, 2023
Merged

Feature/add party nations #2147

merged 2 commits into from
Jul 17, 2023

Conversation

Bekabyx
Copy link
Contributor

@Bekabyx Bekabyx commented Jul 13, 2023

Trello

Peter requested that we add a breakdown of which nations parties field candidates in - this data is part of the EC's party dataset (see here for example, "Fielding Candidates in England" etc.) and is available in their API.

Sym recommended that rather than storing these three fields separately we combine the data into a single field so that's the approach I've taken.

To test locally:

  • Run manage.py migrate
  • Run manage.py parties_import_from_ec
  • Run manage.py runserver
  • Find non-joint parties on the GB register and the NI register, one each (In the next steps I've chosen specific parties but change it up if you like)
  • Hit your local YNR API for the GB party, e.g.http://localhost:8000/api/next/parties/PP53/ and check the nations field - this should be populated e.g. ["ENG","WAL","SCO"].
  • Hit your local YNR API again for the NI party (e.g. PP51) and check the nations field - this should be null

Blocks DemocracyClub/WhoCanIVoteFor#1655

PR Checklist

Preview Give feedback

Bekabyx added 2 commits July 15, 2023 12:21
Update EC importer to reformat data into our preferred shape
Added tests
@Bekabyx Bekabyx force-pushed the feature/add-party-nations branch from 9b302a7 to bc6c4b9 Compare July 15, 2023 11:21
@Bekabyx Bekabyx marked this pull request as ready for review July 15, 2023 11:25
@Bekabyx Bekabyx requested review from symroe and VirginiaDooley July 17, 2023 08:43
@Bekabyx Bekabyx merged commit 64f2bd3 into master Jul 17, 2023
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.

3 participants