civics-cdf-validator 1.55.dev1__tar.gz → 1.55.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {civics_cdf_validator-1.55.dev1/civics_cdf_validator.egg-info → civics_cdf_validator-1.55.dev3}/PKG-INFO +1 -1
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3/civics_cdf_validator.egg-info}/PKG-INFO +1 -1
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/rules.py +8 -46
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/version.py +1 -1
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/CONTRIBUTING.md +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/LICENSE-2.0.txt +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/MANIFEST.in +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/README.md +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/__init__.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/base.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/civics_cdf_validator.egg-info/SOURCES.txt +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/civics_cdf_validator.egg-info/dependency_links.txt +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/civics_cdf_validator.egg-info/entry_points.txt +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/civics_cdf_validator.egg-info/requires.txt +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/civics_cdf_validator.egg-info/top_level.txt +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/gpunit_rules.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/loggers.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/office_utils.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/setup.cfg +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/setup.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/stats.py +0 -0
- {civics_cdf_validator-1.55.dev1 → civics_cdf_validator-1.55.dev3}/validator.py +0 -0
|
@@ -1356,6 +1356,14 @@ class ValidateDuplicateColors(base.TreeRule):
|
|
|
1356
1356
|
element=party_contest, element_name="PartyIds"
|
|
1357
1357
|
):
|
|
1358
1358
|
for party_id in party_ids_element.text.split():
|
|
1359
|
+
if party_id not in party_color_mapping:
|
|
1360
|
+
warning_log.append(
|
|
1361
|
+
loggers.LogEntry(
|
|
1362
|
+
"Party (%s) in PartyContest should have an assigned color."
|
|
1363
|
+
% party_id
|
|
1364
|
+
)
|
|
1365
|
+
)
|
|
1366
|
+
continue
|
|
1359
1367
|
party_color = party_color_mapping[party_id][0]
|
|
1360
1368
|
if party_color in contest_colors:
|
|
1361
1369
|
contest_colors[party_color].append(party_color_mapping[party_id][1])
|
|
@@ -4579,52 +4587,6 @@ class GovernmentBodyExternalId(base.BaseRule):
|
|
|
4579
4587
|
)
|
|
4580
4588
|
|
|
4581
4589
|
|
|
4582
|
-
class UnsupportedOfficeSchema(base.BaseRule):
|
|
4583
|
-
"""Fails if new unsupported office schema is used in the feed.
|
|
4584
|
-
|
|
4585
|
-
This rule will eventually be removed once the new schema is supported.
|
|
4586
|
-
"""
|
|
4587
|
-
|
|
4588
|
-
def elements(self):
|
|
4589
|
-
return ["Office"]
|
|
4590
|
-
|
|
4591
|
-
def check(self, element):
|
|
4592
|
-
if element.find("JurisdictionId") is not None:
|
|
4593
|
-
raise loggers.ElectionError.from_message(
|
|
4594
|
-
"Specifying JurisdictionId on Office is not yet supported."
|
|
4595
|
-
)
|
|
4596
|
-
if element.find("Level") is not None:
|
|
4597
|
-
raise loggers.ElectionError.from_message(
|
|
4598
|
-
"Specifying Level on Office is not yet supported."
|
|
4599
|
-
)
|
|
4600
|
-
if element.find("Role") is not None:
|
|
4601
|
-
raise loggers.ElectionError.from_message(
|
|
4602
|
-
"Specifying Role on Office is not yet supported."
|
|
4603
|
-
)
|
|
4604
|
-
if len(element.findall("SelectionMethod")) > 1:
|
|
4605
|
-
raise loggers.ElectionError.from_message(
|
|
4606
|
-
"Specifying multiple SelectionMethod elements on Office is not yet "
|
|
4607
|
-
"supported."
|
|
4608
|
-
)
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
class UnsupportedOfficeHolderTenureSchema(base.BaseRule):
|
|
4612
|
-
"""Fails if new unsupported officeholder tenure schema is used in the feed.
|
|
4613
|
-
|
|
4614
|
-
This rule will eventually be removed once the new schema is supported.
|
|
4615
|
-
"""
|
|
4616
|
-
|
|
4617
|
-
def elements(self):
|
|
4618
|
-
return ["ElectionReport"]
|
|
4619
|
-
|
|
4620
|
-
def check(self, element):
|
|
4621
|
-
if element.find("OfficeHolderTenureCollection") is not None:
|
|
4622
|
-
raise loggers.ElectionError.from_message(
|
|
4623
|
-
"Specifying OfficeHolderTenureCollection on ElectionReport is not "
|
|
4624
|
-
"yet supported."
|
|
4625
|
-
)
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
4590
|
class ElectoralCommissionCollectionExists(base.BaseRule):
|
|
4629
4591
|
"""ElectoralCommissionCollection should exist."""
|
|
4630
4592
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|