Open chris48s opened 7 years ago
Just as a note of what I've done for the 2022 elections.
I've created a new organisation for the aldermanic elections city-of-london-alder' with an official identifier that is 'LDN-alder'. I then created a new divisionset and copied all the divisions over, setting the
seats_total` to 1.
from copy import deepcopy
# Make a new org
city_of_london = Organisation.objects.get(id=54)
city_of_london_alder = deepcopy(city_of_london)
city_of_london_alder.id = None
city_of_london_alder.official_identifier = 'LND-alder'
city_of_london_alder.slug = "city-of-london-alder"
city_of_london_alder.election_name = "City of London aldermanic election"
city_of_london_alder.save()
# Make a new divset
city_of_london_divisionset = OrganisationDivisionSet.objects.get(id=105)
city_of_london_alder_divisionset = deepcopy(city_of_london_divisionset)
city_of_london_alder_divisionset.id = None
city_of_london_alder_divisionset.organisation = city_of_london_alder
city_of_london_alder_divisionset.save()
# copy the divisions
for div in city_of_london_divisionset.divisions.all():
div.id = None
div.divisionset = city_of_london_alder_divisionset
div.seats_total = 1
div.save()
# copy the geographies
geographies = [
(div.official_identifier, div.geography)
for div in city_of_london_divisionset.divisions.all()
]
for gss, geog in geographies:
div = OrganisationDivision.objects.get(
official_identifier=gss, divisionset=city_of_london_alder_divisionset
)
geog.id = None
geog.division_id = div.id
geog.save()
# attach it to the target division
div.geography = geog
div.save()
Aldermanic (not by-elections. Alderman seats can't have by-elections) local.city-of-london.tower.by.2017-09-12/ local.city-of-london.langbourn.by.2017-09-12/ local.city-of-london.portsoken.by.2017-12-14/ local.city-of-london.candlewick.by.2018-07-05/ local.city-of-london.cheap.by.2018-07-05/ local.city-of-london.aldgate.by.2018-07-12/ local.city-of-london.bridge.by.2018-07-12/ local.city-of-london.bread-street.by.2018-08-30/ local.city-of-london.broad-street.by.2018-12-13 local.city-of-london.billingsgate.by.2019-01-31/ local.city-of-london.bassishaw.by.2019-04-30/ local.city-of-london.coleman-street.by.2019-12-19/ local.city-of-london.dowgate.by.2019-12-19/ local.city-of-london.farringdon-within.by.2019-12-19/ local.city-of-london.vintry.by.2019-08-07/ local.city-of-london.lime-street.by.2019-08-07/
Common Councillor by-elections local.city-of-london.bishopsgate.by.2017-11-14/ local.city-of-london.bishopsgate.by.2018-03-20/ local.city-of-london.billingsgate.by.2018-03-22/ local.city-of-london.castle-baynard.by.2018-10-09/ local.city-of-london.cordwainer.by.2019-04-30/ local.city-of-london.farringdon-within.by.2019-07-24/ local.city-of-london.coleman-street.by.2019-07-30/ local.city-of-london.aldersgate.by.2019-11-13/
~I don't know what happened here but I think these were supposed to be Aldermen~ ~local.city-of-london.lime-street.by.2019-08-07/~ ~local.city-of-london.vintry.by.2019-08-07/~
Also, this has happened on the old elections. At least it's friendly.
local.city-of-london.lime-street.by.2019-08-07 and local.city-of-london.vintry.by.2019-08-07
were both Alderman elections but they got cancelled because they were unconstested
~As in, no-one turned up at all? I see Vintry, which I must have missed, but Lime Street doesn't appear to be in the list of Aldermanic elections.~
Oh wait, yes it is it's just misdated 2017 I think!
Slightly edited comments from conversation on slack:
@sjorford wrote:
@chris48s wrote:
@sjorford wrote:
I think we technically we should introduce sub-types to account for City of London oddities.
The other thing this raises is versioning the spec. For the moment it probably doesn't matter as it is only really us dogfooding the schema but once we have wider users, I think it becomes useful to be able to say that
local.city-of-london.tower.by.2017-09-12
was created under version 1.0 but would belocal.city-of-london.alder.tower.by.2017-09-12
under version 1.1 or something. Probably worth thinking about.. Even once we're accounting for all of the edge cases present in the current structure/legislation correctly there is still the possibility of electoral reform, changes to local government structure + so on..