civics-cdf-validator 1.64.dev0__tar.gz → 1.64.dev2__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.64.dev0/civics_cdf_validator.egg-info → civics_cdf_validator-1.64.dev2}/PKG-INFO +1 -1
  2. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2/civics_cdf_validator.egg-info}/PKG-INFO +1 -1
  3. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/rules.py +0 -48
  4. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/version.py +1 -1
  5. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/CONTRIBUTING.md +0 -0
  6. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/LICENSE-2.0.txt +0 -0
  7. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/MANIFEST.in +0 -0
  8. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/README.md +0 -0
  9. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/__init__.py +0 -0
  10. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/base.py +0 -0
  11. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/civics_cdf_validator.egg-info/SOURCES.txt +0 -0
  12. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/civics_cdf_validator.egg-info/dependency_links.txt +0 -0
  13. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/civics_cdf_validator.egg-info/entry_points.txt +0 -0
  14. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/civics_cdf_validator.egg-info/requires.txt +0 -0
  15. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/civics_cdf_validator.egg-info/top_level.txt +0 -0
  16. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/gpunit_rules.py +0 -0
  17. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/loggers.py +0 -0
  18. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/office_utils.py +0 -0
  19. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/setup.cfg +0 -0
  20. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/setup.py +0 -0
  21. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/stats.py +0 -0
  22. {civics_cdf_validator-1.64.dev0 → civics_cdf_validator-1.64.dev2}/validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: civics_cdf_validator
3
- Version: 1.64.dev0
3
+ Version: 1.64.dev2
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.64.dev0
3
+ Version: 1.64.dev2
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
@@ -368,53 +368,6 @@ class Encoding(base.TreeRule):
368
368
  raise loggers.ElectionError.from_message("Encoding on file is not UTF-8")
369
369
 
370
370
 
371
- class HungarianStyleNotation(base.BaseRule):
372
- """Check that element identifiers use Hungarian style notation.
373
-
374
- Hungarian style notation is used to maintain uniqueness and provide context
375
- for the identifiers.
376
- """
377
-
378
- # Add a prefix when there is a specific entity in the xml.
379
- elements_prefix = {
380
- "BallotMeasureContest": "bmc",
381
- "BallotMeasureSelection": "bms",
382
- "BallotStyle": "bs",
383
- "Candidate": "can",
384
- "CandidateContest": "cc",
385
- "CandidateSelection": "cs",
386
- "Coalition": "coa",
387
- "ContactInformation": "ci",
388
- "Hours": "hours",
389
- "Office": "off",
390
- "OfficeGroup": "og",
391
- "Party": "par",
392
- "PartyContest": "pc",
393
- "PartySelection": "ps",
394
- "Person": "per",
395
- "ReportingDevice": "rd",
396
- "ReportingUnit": "ru",
397
- "RetentionContest": "rc",
398
- "Schedule": "sched",
399
- }
400
-
401
- def elements(self):
402
- return self.elements_prefix.keys()
403
-
404
- def check(self, element):
405
- object_id = element.get("objectId")
406
- tag = self.get_element_class(element)
407
- if object_id:
408
- if not object_id.startswith(self.elements_prefix[tag]):
409
- raise loggers.ElectionInfo.from_message(
410
- (
411
- "%s ID %s is not in Hungarian Style Notation. Should start"
412
- " with %s" % (tag, object_id, self.elements_prefix[tag])
413
- ),
414
- [element],
415
- )
416
-
417
-
418
371
  class LanguageCode(base.BaseRule):
419
372
  """Check that Text and Uri elements have a valid language code."""
420
373
 
@@ -5552,7 +5505,6 @@ COMMON_RULES = (
5552
5505
  GpUnitOcdId,
5553
5506
  GpUnitsCyclesRefsValidation,
5554
5507
  GpUnitsHaveInternationalizedName,
5555
- HungarianStyleNotation,
5556
5508
  IndependentPartyName,
5557
5509
  LanguageCode,
5558
5510
  MissingFieldsError,
@@ -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.64.dev0'
8
+ __version__ = '1.64.dev2'