google/election_results_xml_validator


License: Apache-2.0

Language: Python


election_results_xml_validator is a script that checks if a NIST 1500-100 data feed follows best practices. It will output errors, warnings, and info messages for common issues.

This is not an official Google product.

INSTALLATION

The package is available from PyPi and can be installed using the command below.

pip install election_results_xml_validator

election_results_xml_validator relies on lxml which will be installed if it isn't already installed. You may need to install libxslt development libraries in order to build lxml.

USAGE

List rules

You can list the validation rules that the script contains and the description of each rule by running the following command

election_results_xml_validator list

Validate a file

The validate command has 2 required arguments:

  • the election file to be validated
  • the XSD file to validate against

The command to validate the election file against all the rules in the file is

election_results_xml_validator validate election_file.xml --xsd election_data_spec.xsd

The validator is capable of validating either election or officeholder data feeds, depending on the value of the --rule_set flag (election is the default). To validate an officeholder feed:

election_results_xml_validator validate election_file.xml --xsd election_data_spec.xsd --rule_set officeholder

One can choose to only validate one or more comma separated rules by using the -i flag

election_results_xml_validator validate election_file.xml --xsd election_data_spec.xsd -i Schema

Or choose to exclude one or more comma separated rules using the -e flag

election_results_xml_validator validate election_file.xml --xsd election_data_spec.xsd -e Schema

By default, the script only shows a summary of issues found. You can get a verbose report by adding the -v flag

election_results_xml_validator validate election_file.xml --xsd election_data_spec.xsd -v

Project Statistics

Sourcerank 6
Repository Size 706 KB
Stars 17
Forks 22
Watchers 18
Open issues 23
Dependencies 5
Contributors 16
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Miano Njoka Rituraj Jagtap jdmgoogle rahul-nath Justin McManus civics-copybara Charles Kaminer ccongchen Tristan TeNyenhuis alyssavessey Justin Loutsenhizer Ankur Jyoti Phukan Darío Hereñú markcwal-google Richard Simões Klaas Hoekema

Packages Referencing this Repo

election-results-xml-validator
Checks if an election feed follows best practices
Latest release 0.10.1.0 - Updated - 17 stars
dummy-validator
Checks that an elections file follows best practices
Latest release 0.0.3 - Updated - 17 stars
election_results_xml_validator
Checks that an elections file follows best practices
Latest release 0.2.9.2 - Updated - 17 stars

Interesting Forks See all

dalavanmanphonsy/election_results_xml_validator
This repository is no longer available - 1 stars - 1 forks
CNXTEoE/election_results_xml_validator
Python - Published - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2020-01-07 19:16:08 UTC

Login to resync this repository