Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.0 #541

Merged
merged 70 commits into from
Dec 13, 2020
Merged

v1.2.0 #541

merged 70 commits into from
Dec 13, 2020

Conversation

HEdingfield
Copy link
Contributor

No description provided.

tarheel and others added 30 commits September 10, 2019 16:26
fix two bugs related to undeclared write-ins
… Checkstyle plugin, org.openjfx.javafxplugin, org.beryx.jlink, org.apache.commons:commons-csv, org.apache.poi:poi-ooxml, com.fasterxml.jackson.core:jackson-*. (#413)
* read Dominion manifest data and CVR json:  #406 #407

* edits for PR #411

* fixes for PR #411
* Updates copyrights to 2020 (fixes #414).

* Variable clean-up (changing to final and primitive); makes GuiTiebreakerPromptResponse inner class static.

* Reformat code.

* Address Checkstyle warning.

* Clean up error logging messages.
* export generic csv functionality #404

* edits for PR #417

* Tightens visibility of variables and classes; cleans up logging messages.

Co-authored-by: HEdingfield <HEdingfield@users.noreply.github.com>
…408) (#419)

* Adds "convert-dominion-to-generic-csv" CLI option and updates README.
* test for Dominion csv conversion routine #415

* 2 more tests for cvr conversion

* updates for Dominion conversion tests: PR #425

* fix for PR #425

Co-authored-by: jonmoldover <jonmoldover@gmail.com>
* Changes main button bar into a menu bar.
* Adds `convert-to-cdf` functionality to GUI menu (fixes #421).
* Adds `convert-dominion-to-generic-csv` functionality to GUI menu (fixes #408).
* Updates README.md to reflect recent changes.
* Adds setUpAndStartService helper method.
* Dominion conversion output files now output to same directory as input files and include timestamp in filename (#408).

* Updates Dominion tests to account for new filename schema; Dominion test files are now cleaned up automatically; fixes bug with fileCompare not closing readers.

* All delete operations in `TabulatorTests` now handle exceptions with useful error messages if they fail.
* read and write precinct portion + precinct

* edits for precinct portion PR#433

* Update src/main/java/network/brightspots/rcv/DominionCvrReader.java

Co-Authored-By: HEdingfield <HEdingfield@users.noreply.github.com>

* Update src/main/java/network/brightspots/rcv/DominionCvrReader.java

Co-Authored-By: HEdingfield <HEdingfield@users.noreply.github.com>

Co-authored-by: HEdingfield <HEdingfield@users.noreply.github.com>
* add UWI test files

* add an additional test to validate my fix of #397

* use a better name for the first test
…andidatesRemain (#441)

* make batch elimination work properly with singleSeatContinueUntilTwoCandidatesRemain

* cleaned up wording
* add contest id to config

* add xml parsing module

* First cut at Hart CVR reader + test assets.

* cleanup paths and add expected results

* add full cvr data

* refactor contestId from Integer to String

* add school board test

* fix xml parsing

* logging

* re-add accidentally removed import

* cleanup for PR#548

* updates for PR #458

* updates for PR #458

* test other file reading options

* more cleanup for PR #458

* more cleanup for PR #458

* Fixes tests not working in Windows due to mangled UTF-8 BOM marker.

* Handles potential NPE if chosen directory contains no files.

Co-authored-by: HEdingfield <hylton@groupagree.com>
* Updates to latest version:
    * Gradle 6.5.1
    * JDK 14.0.1
    * JavaFX 14.0.1
    * Checkstyle google_checks.xml 8.34
    * Checkstyle plugin 8.34
    * org.openjfx.javafxplugin 0.0.9
    * org.beryx.jlink 2.20.0
    * com.fasterxml.jackson.core:jackson-* 2.11.1
    * org.junit.jupiter.junit-jupiter-* 5.6.2
* Gets tests working with Gradle 6.5.1 (fixes #283)
* Updates `APP_VERSION` to temporary value 1.2.0_alpha
* Addresses Checkstyle warnings
* Fixes versions in Hart tests
* make contestId a real config field

* update .txt
* Changes "Provider" field for CVR source to be required, bases it on an enum of valid values, and changes it to a ChoiceBox at the start of the "CVR Files" tab in the GUI  (progress on #460 and #461).
* Adds log message to help identify which CVR source validation errors pertain to.
* Gets rid of `SimpleObjectProperty` warnings during compile (fixes #280).
moldover and others added 26 commits September 20, 2020 07:34
* plumbing for xml cdf reading

* add contestId to json and xml CDF parse logic
update unisyn cvr test to use the full (but still incorrect) cvr data.  This test is expected to fail.
add candidate parsing code to xml CDF parser

* dont parse Candidate data from CDF at runtime - this enforces the same constraints on validation as all other file types.  The un-used candidate parsing code is left in for implementing future helper functions which will automatically populate config files.

* Handle ContestSelections in XML correctly

* add NIST example 2 (seems to be correctly formed)

* fill out CDF XML class definitions needed for tabulation

* add some helpers

* cleanup pre-processing code

* add more class fields around contest selections
fix ranking parsing
add example Unisyn contests

* handle write-ins

* get first 2 Unisyn regression tests working :)

* fix first NIST CDF XML test

* cleanup test names

* parse GpUnit from CVRs

* remove un-used assets

* updates for PR #504

* updated data from Unisyn with GpUnit (precinct) parsing validated

* add more Unisyn regression tests
tests share a single cvr input file

* tabulate all elections - in practice we should not see more than one

* updates for PR #504

* updates for PR #504
* Converts `overvoteRule` from a `ChoiceBox` to an array of `RadioButton`s; changes `overvoteRule` string display in config files and adds migration logic.
* Disables `decimalPlacesForVoteArithmetic` and `nonIntegerWinningThreshold` except when `winnerElectionMode` is "Multi-winner allow only one winner per round" or "Multi-winner allow multiple winners per round" (fixes #500).
* Adds suggested values for `overvoteLabel`, `undervoteLabel`, and ES&S column and row indices as requested by @chughes297 (overriding what was in the original GUI mock-ups).
* Clarifies language to address confusing UX in `passesBasicCvrSourceValidation()` for CVR-specific errors.
* add help menu item.

* Fixes .txt file opening in Windows; removes dependency on org.apache.commons:commons-lang3:3.9 by recreating logic in Utils class.

* Fixes some block comment formatting.

* Fixes some more block comment formatting.

Co-authored-by: HEdingfield <hylton@groupagree.com>
* plumbing for xml cdf reading

* add contestId to json and xml CDF parse logic
update unisyn cvr test to use the full (but still incorrect) cvr data.  This test is expected to fail.
add candidate parsing code to xml CDF parser

* dont parse Candidate data from CDF at runtime - this enforces the same constraints on validation as all other file types.  The un-used candidate parsing code is left in for implementing future helper functions which will automatically populate config files.

* Handle ContestSelections in XML correctly

* add NIST example 2 (seems to be correctly formed)

* fill out CDF XML class definitions needed for tabulation

* add some helpers

* cleanup pre-processing code

* add more class fields around contest selections
fix ranking parsing
add example Unisyn contests

* handle write-ins

* get first 2 Unisyn regression tests working :)

* fix first NIST CDF XML test

* cleanup test names

* parse GpUnit from CVRs

* remove un-used assets

* updates for PR #504

* updated data from Unisyn with GpUnit (precinct) parsing validated

* add more Unisyn regression tests
tests share a single cvr input file

* tabulate all elections - in practice we should not see more than one

* updates for PR #504

* better logging

* first cut at fixing JSON CDF reader:
- all static election objects are parsed at beginning of cvr processing
- during processing contest selections are linked to candidate objects
- candidates are stored in config - not pulled from CDF file
- fixed NIST test set 0 config and CDF json to match the NIST 1500-103 UML
- verified tabulation results are correct for Nist test set 0 test

* update ResultsWriter CVR generation code to create Candidate objects and link to them from ContestSelection objects.
verified updated NIST test 0 cvr output

* updates for PR #504

* fix typo

* update test asset with contest name

* better handling for cdf reader parse errors

* update all CDF json assets

* Updates to CDF parsing logic:
Candidate validation and CandidateId validation are done while parsing CVRs (not during static parsing)
xml parser throws unrecognizedCandidatesException (instead of just CVRParserException)
Add json getCvrContest helper
json parser logic upgrades:
 handle writeIns in both places
 check for rank in both places
 check for HasIndication
 check for IsAllocable
 synthesize cvrId

* cleanup for PR #506

* updates for PR #505

* Throw if undeclared write-in is found but label has not been defined.
* Changes the `TextArea` on the right to display hints specific to the currently-selected tab (addressing #499).
* Creates `throwIfNoUwiLabel` helper function in `CommonDataFormatReader`, with minor refactoring. Suppresses warnings that aren't useful. Auto-rearranging of some methods.
… the GUI (#512)

* Replaces `checkBoxNonIntegerWinningThreshold` and `checkBoxHareQuota` with a radio button array in the FXML file (fixing #501).
* Implements radio button array in GUI to determine `nonIntegerWinningThreshold` and `hareQuota` values, and adds new validation rules for those settings.
* GUI now disables `numberOfWinners` field and sets it to 1 only when `winnerElectionMode` is "Single-winner majority determines winner".
* GUI now disables `numberOfWinners` field and sets it to 0 when `winnerElectionMode` is "Bottoms-up using percentage threshold".
* Fixes bugs in validation error messages when `numberOfWinners` is 0.
* Suppresses `rawtypes` warnings in `GuiConfigController`.
… and `maxRankingsAllowed` (#515)

* Adds check boxes next to `textFieldMaxSkippedRanksAllowed` and `textFieldMaxRankingsAllowed` to substitute "unlimited" and "max" values in, respectively (fixes #498).
* Refactors `choiceWinnerElectionMode.setOnAction` logic.
* create new class

* helpful errors in CLI; don't allow newer version in config than in app

* make fields per-source

* comments

* Jon's changes

* fix almost all tests

* fix Dominion tests
…vel (#518)

* update validation and documentation for 4 fields that moved to CVR level

* Fixes broken tests and a couple of typos.

Co-authored-by: HEdingfield <hylton@groupagree.com>
make candidate rows not editable
* use camelCase for enum values in configs and update migration logic accordingly
* disable editing of CVR source rows in GUI table
…F output when needed (#523)

* register explicit overvote as valid candidate/contest selection in CDF output when needed

* tweak doc text
log FINE only for config file contents
* Updates checkstyle from 8.34 to 8.36.2, and google_checks.xml.
* Creates and implements separate `checkstyle-suppressions.xml` file to suppress Checkstyle warnings that don't make sense for our project (fixes #489).
* Addresses relevant Checkstyle warnings (fixes #490).
* Addresses IntelliJ warnings.
* Pixel-pushing for Linux (get thicc, boi)
* Changes all logging to use new `fine()`, `info()`, `warning()`, and `severe()` methods.
* Gets rid of now-unused `onEditCommit` functions for the CVR Files and Candidates tables.
* Makes util classes `final`, with private constructors to prevent instantiation.
* Renames `TieBreakMode`, `tieBreakMode`, `TieBreak`, and `tieBreak` to `TiebreakMode`, `tiebreakMode`, `Tiebreak`, and `tiebreak`, respectively. This word has now lost all meaning.
* Removes unnecessary usages of `.toString()`.
* Standardizes exceptions as `exception` instead of `e` to comply with VVSG requirement on variable names (5.2.5 paragraph c) that only index loops are allowed to have single-character variable names.
* Fixes broken test.
* Minor fixes to hints.
* Get rid of the Devilish Double Spaces after periods.
* fix README

* CDF JSON: throw if a CandidateObject can't be found during parsing.

* Cleanup CDF class (type) names as output from ResultsWriter.

* fix label
* UI tweaks

* 100 -> 120
* Help menu shows a message directing user to config_file_documentation.txt #528
* Handle missing precinct data for older Dominion data sets #533
* Add test data with missing precinct data for older Dominion data sets #533
* Fix for #536 - allow multiple CDF files
Add regression test with multiple CDF files
* Increment version number to 1.2.0
* Fixes broken link in README.md
* Cleans up unused constants and methods.
# Conflicts:
#	.idea/misc.xml
#	README.md
#	build.gradle
#	config/checkstyle/google_checks.xml
#	config_file_documentation.txt
#	src/main/java/network/brightspots/rcv/CastVoteRecord.java
#	src/main/java/network/brightspots/rcv/CommonDataFormatReader.java
#	src/main/java/network/brightspots/rcv/ContestConfig.java
#	src/main/java/network/brightspots/rcv/DominionCvrReader.java
#	src/main/java/network/brightspots/rcv/FileUtils.java
#	src/main/java/network/brightspots/rcv/GuiConfigController.java
#	src/main/java/network/brightspots/rcv/Logger.java
#	src/main/java/network/brightspots/rcv/Main.java
#	src/main/java/network/brightspots/rcv/ResultsWriter.java
#	src/main/java/network/brightspots/rcv/StreamingCvrReader.java
#	src/main/java/network/brightspots/rcv/Tabulator.java
#	src/main/java/network/brightspots/rcv/TabulatorSession.java
#	src/main/java/network/brightspots/rcv/Tiebreak.java
#	src/main/resources/network/brightspots/rcv/GuiConfigLayout.fxml
#	src/test/java/network/brightspots/rcv/TabulatorTests.java
#	src/test/resources/network/brightspots/rcv/test_data/2013_minneapolis_mayor_scale/2013_minneapolis_mayor_scale_config.json
#	src/test/resources/network/brightspots/rcv/test_data/continue_until_two_with_batch_elimination_test/continue_until_two_with_batch_elimination_test_config.json
#	src/test/resources/network/brightspots/rcv/test_data/multi_seat_bottoms_up_with_threshold/multi_seat_bottoms_up_with_threshold_config.json
#	src/test/resources/network/brightspots/rcv/test_data/multi_seat_uwi_test/multi_seat_uwi_test_config.json
#	src/test/resources/network/brightspots/rcv/test_data/multi_seat_uwi_test/multi_seat_uwi_test_expected_summary.json
#	src/test/resources/network/brightspots/rcv/test_data/precinct_example/precinct_example_config.json
#	src/test/resources/network/brightspots/rcv/test_data/skip_to_next_test/skip_to_next_test_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_1_exhaust_at_overvote/test_set_1_exhaust_at_overvote_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_2_overvote_skip_to_next/test_set_2_overvote_skip_to_next_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_3_skipped_choice_exhaust/test_set_3_skipped_choice_exhaust_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_4_skipped_choice_next/test_set_4_skipped_choice_next_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_6_duplicate_exhaust/test_set_6_duplicate_exhaust_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_multi_winner_fractional_threshold/test_set_multi_winner_fractional_threshold_config.json
#	src/test/resources/network/brightspots/rcv/test_data/test_set_multi_winner_whole_threshold/test_set_multi_winner_whole_threshold_config.json
#	src/test/resources/network/brightspots/rcv/test_data/uwi_cannot_win_test/uwi_cannot_win_test_config.json
#	src/test/resources/network/brightspots/rcv/test_data/uwi_cannot_win_test/uwi_cannot_win_test_expected_summary.json
Copy link
Contributor

@tarheel tarheel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't paid close attention to the develop -> master drama, so it's probably best for @moldover to comment here... but I'll approve to unblock you.

@HEdingfield HEdingfield merged commit d4ac2db into master Dec 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants