civics-cdf-validator 1.49.dev16__tar.gz → 1.49.dev18__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.
Files changed (22) hide show
  1. {civics_cdf_validator-1.49.dev16/civics_cdf_validator.egg-info → civics_cdf_validator-1.49.dev18}/PKG-INFO +1 -1
  2. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18/civics_cdf_validator.egg-info}/PKG-INFO +1 -1
  3. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/rules.py +12 -4
  4. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/version.py +1 -1
  5. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/CONTRIBUTING.md +0 -0
  6. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/LICENSE-2.0.txt +0 -0
  7. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/MANIFEST.in +0 -0
  8. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/README.md +0 -0
  9. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/__init__.py +0 -0
  10. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/base.py +0 -0
  11. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/civics_cdf_validator.egg-info/SOURCES.txt +0 -0
  12. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/civics_cdf_validator.egg-info/dependency_links.txt +0 -0
  13. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/civics_cdf_validator.egg-info/entry_points.txt +0 -0
  14. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/civics_cdf_validator.egg-info/requires.txt +0 -0
  15. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/civics_cdf_validator.egg-info/top_level.txt +0 -0
  16. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/gpunit_rules.py +0 -0
  17. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/loggers.py +0 -0
  18. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/office_utils.py +0 -0
  19. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/setup.cfg +0 -0
  20. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/setup.py +0 -0
  21. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/stats.py +0 -0
  22. {civics_cdf_validator-1.49.dev16 → civics_cdf_validator-1.49.dev18}/validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: civics_cdf_validator
3
- Version: 1.49.dev16
3
+ Version: 1.49.dev18
4
4
  Summary: Checks if an election feed follows best practices
5
5
  Home-page: https://github.com/google/civics_cdf_validator
6
6
  Author: Google Civics
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: civics_cdf_validator
3
- Version: 1.49.dev16
3
+ Version: 1.49.dev18
4
4
  Summary: Checks if an election feed follows best practices
5
5
  Home-page: https://github.com/google/civics_cdf_validator
6
6
  Author: Google Civics
@@ -2268,6 +2268,7 @@ class ValidURIAnnotation(base.BaseRule):
2268
2268
  "line",
2269
2269
  "linkedin",
2270
2270
  "tiktok",
2271
+ "whatsapp",
2271
2272
  ])
2272
2273
  USAGE_TYPES = frozenset(["personal", "official", "campaign"])
2273
2274
  PLATFORM_ONLY_ANNOTATIONS = frozenset(
@@ -3489,9 +3490,6 @@ class MissingFieldsInfo(base.MissingFieldRule):
3489
3490
 
3490
3491
  def element_field_mapping(self):
3491
3492
  return {
3492
- "Office": [
3493
- "ElectoralDistrictId",
3494
- ],
3495
3493
  }
3496
3494
 
3497
3495
 
@@ -4511,10 +4509,20 @@ class UnreferencedEntitiesOfficeholders(UnreferencedEntitiesBase):
4511
4509
  """
4512
4510
 
4513
4511
  def __init__(self, election_tree, schema_tree, **kwargs):
4512
+ office_holder_tenure_collection = self.get_elements_by_class(
4513
+ election_tree, "OfficeHolderTenure"
4514
+ )
4515
+ is_post_office_split = False
4516
+ if office_holder_tenure_collection:
4517
+ is_post_office_split = True
4514
4518
  super(UnreferencedEntitiesOfficeholders, self).__init__(
4515
4519
  election_tree,
4516
4520
  schema_tree,
4517
- frozenset(["Office", "Leadership"]),
4521
+ (
4522
+ frozenset(["OfficeHolderTenure", "Leadership"])
4523
+ if is_post_office_split
4524
+ else frozenset(["Office", "Leadership"])
4525
+ ),
4518
4526
  frozenset(["Party"]),
4519
4527
  **kwargs,
4520
4528
  )
@@ -5,4 +5,4 @@ No dependencies should be added to this module.
5
5
  See https://packaging.python.org/guides/single-sourcing-package-version/
6
6
  """
7
7
 
8
- __version__ = '1.49.dev16'
8
+ __version__ = '1.49.dev18'