Elex

Latest version: v2.4.4

Safety actively analyzes 665704 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

2.0.9

------------------------
* A variety of transparent speedups. (277)

2.0.8

----------------------
* Adds a :code:`raceids` feature. :code:`elex races 2016-03-15 --raceids 10675,14897` still downloads the full JSON file but only parses the races passed in the :code:`raceids` argument. Particularly effective when used with the :code:`local-only` flag to grab a subset of non-national races, e.g., every NY state race.

2.0.5

----------------------------
* Fixes a small bug in the ME reporting for the upcoming 6-14 primary.

2.0.1

------------------------------

* Fixes for AP API v2.1.
* Fix for missing Rhode Island mail-in ballot (263).
* Fix for township to county rollups in New England (264).
* Delegate report cache has been removed; the feature could have negative consequences and will be better addressed by a full caching system.

2.0.0

----------------------

Remove redundant data fields, introduce breaking data model fixes, organizational report ID caching, and command line cleanup.

The 2.x release is named for `Ethel Payne <https://en.wikipedia.org/wiki/Ethel_L._Payne>`_, the "First Lady of the Black Press", whose `natural curiosity <http://beta.wpcf.org/oralhistory/payn.html>`_ led her to become a groundbreaking journalist.

* Precincts reporting percent now expressed in normal form (204). Prior to the 2.0 release, precincts reporting percent was expressed as a number between 0 and 100 while vote percent while percent of votes received was expressed as a number between 0 and 1. Now **all percents in the data are expressed as a number between 0 and 1** and should be multiplied by 100 to display the human-readable percentage.
* Remove ``unique_id`` field (256). The unique_id has been superseded by the ID field in all cases and was redundant. The 2.0 release removes this field, and all Elex users should adjust their data models and schemas accordingly.
* Race data now includes an ``is_ballot_measure`` column for consistency (238).
* Cache delegate report IDs (234). Getting delegate reports previously required three API calls which each counted against the API quota limit. Now, on first request, the report IDs are cached until the ``elex clear-delegate-cache`` command is run. With the introduction of "free" report access in AP API v2.1, getting delegate reports do not count at all against the request quota except the first ``elex delegates`` is run or after running ``elex clear-delegate-cache``.
* Refactor error handling when interacting with the API (239, 240, 249). All error handling logic has been moved to command line library and out of the Python API. All errors encountered when using Elex as a Python library are raised and must be handled by the developer. The command line library catches common/well-known errors and provides useful feedback.
* Add ``--with-timestamp`` and ``--batch-name`` flags to add a timestamp based or arbitrary grouping column to any results (212).
* ``elex next-election`` now returns an error when there is no valid next election (160).
* Election date is automatically determined when using the ``--data-file`` flag. This means no date argument is required when specifying a data file. (161)
* Removed dependency on Clint output library (63).
* Improve documentation (251).
* Abandon previous caching and daemon efforts (122, 137). Caching will be a feature of Elex 2.1.

**Important note about exit codes**:

Elex will be implementing a caching layer in version 2.1 that uses conditional GET requests to decide whether or not to get fresh data. The command line tool will return exit code 64 when getting data from the cache, the normal 0 exit code on a successful full request, and exit code 1 for all errors. If you have code that depends on reading the Elex exit code, ensure that you are checking for exit code 1 and 1 only when trapping for errors.

1.2.0

----------------------
Many bugfixes and some new fields / id schemes that might break implementations that rely on stable field names / orders.

* Fixes an issue with requests defaulting to national-only (229, 230).
* Solves an issue with 3/5 and 3/6 Maine results not including townships (228).
* Supports a :code:`set-zero-counts` argument to the CLI to return zeroed-out data (227).
* Includes a :code:`delegatecount` field on :code:`CandidateReportingUnit` to store data from district-level results (225).
* Supports a :code:`results-level` argument to the CLI to return district-level data. (223)
* Solves an issue with :code:`reportingunitid` not being unique acrosss different result levels (226).
* Adds an :code:`electiondate` field on :code:`BallotMeasure` to guarantee uniqueness (210).
* Makes a composite id for :code:`BallotMeasure` that includes :code:`electiondate` (210).

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.