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

Remove cancelled election metadata #1685

Closed
2 of 3 tasks
Tracked by #1972
VirginiaDooley opened this issue Dec 6, 2022 · 4 comments
Closed
2 of 3 tasks
Tracked by #1972

Remove cancelled election metadata #1685

VirginiaDooley opened this issue Dec 6, 2022 · 4 comments

Comments

@VirginiaDooley
Copy link
Contributor

VirginiaDooley commented Dec 6, 2022

Ref DemocracyClub/WhoCanIVoteFor#1390

  1. With the change in logic in WCIVF, each case for uncontested & cancelled elections is accounted for.
  2. There will be outliers (it's not uncontested but it is a cancelled election) and in these cases, it's important to:
    a) not repeat the existing messages in WCIVF and
    b) only add metadata in exceptional circumstances
@chris48s
Copy link
Member

chris48s commented Dec 6, 2022

WhoCanIVoteFor is not the only consumer of this data. If you remove it, WhereDoIVote will not be able to display info about cancelled and uncontested polls.

@symroe
Copy link
Member

symroe commented Dec 7, 2022

@chris48s You're right about uncontested elections, but since #426 we expose cancelled without any metadata being needed.

Metadata was designed as a flexible way to deal with all the edge cases. It's still useful for that, but we've learnt enough about uncontested polls now to know what we want to say and how we want to deal with them.

There's still a challenge in that YNR is the first DC product to know that a poll is uncontested: since DemocracyClub/yournextrepresentative#1486 we calculate uncontested after the ballot is locked.

We need a way to feed this back into EE, and at the moment this happens manually by Peter adding an "uncontested" metadata object. This works...sort of, but what we really want is a boolean on the Election model he can set.

This also means we can use metadata in addition to uncontested elections, for example to add election specific context.

The check list above should also include "add uncontested to the election model in EE" to be complete, and then WDIV will need to pull that in too.

@chris48s
Copy link
Member

chris48s commented Dec 7, 2022

Yes. If you're not going to consume it from metadata, then you will need to consume it from $OTHER_PLACE. Gotta get it from somewhere though.

If you're going to change the way it is exposed in EE, as well as changing how WDIV consumes that it its own web app, you'll also need to consider how it is (re-)exposed via the WDIV API and the knock-on effect to the devs.DC API:

https://github.com/DemocracyClub/UK-Polling-Stations/blob/42dd95c23c128e9a2b8d3ac13281a6c35c78b2bf/polling_stations/apps/api/postcode.py#L110
https://github.com/DemocracyClub/aggregator-api/blob/5119d68a73425284bd709b2b0f26c2a1ec8fde5b/aggregator/apps/api/v1/stitcher.py#L73-L89
https://github.com/DemocracyClub/aggregator-api/blob/5119d68a73425284bd709b2b0f26c2a1ec8fde5b/aggregator/apps/api/v1/docs/notes.apibp#L59-L77

etc

@VirginiaDooley
Copy link
Contributor Author

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

No branches or pull requests

4 participants