Skip to content

Commit

Permalink
Merge pull request #620 from BrightSpots/develop
Browse files Browse the repository at this point in the history
Version 1.3.0
  • Loading branch information
HEdingfield committed Aug 18, 2022
2 parents d4ac2db + 4a3348d commit 359e0b0
Show file tree
Hide file tree
Showing 116 changed files with 3,202 additions and 1,969 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,19 @@
name: Run Build, Lint, and Test

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Test with Gradle
run: ./gradlew check
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -34,7 +34,6 @@ tmp

# Generated files
.idea/**/contentModel.xml
.idea/**/Project_Default.xml

# Sensitive or high-churn files
.idea/**/dataSources/
Expand Down Expand Up @@ -91,3 +90,6 @@ fabric.properties

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# Other random IntelliJ config?
.idea/misc.xml
Empty file added .gitmodules
Empty file.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/copyright/BrightSpotsCopyrightProfile.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions .idea/misc.xml

This file was deleted.

617 changes: 0 additions & 617 deletions LICENSE

This file was deleted.

301 changes: 301 additions & 0 deletions LICENSE.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
@@ -1,8 +1,8 @@
# Universal RCV Tabulator
# RCTab

## Overview

The Universal RCV Tabulator is a free, open-source application designed to quickly and accurately tabulate a wide variety of ranked choice voting (RCV) elections. It allows users to:
RCTab is a free, open-source application designed to quickly and accurately tabulate a wide variety of ranked choice voting (RCV) elections, including both single-winner contests and various multi-winner formats (e.g. single transferable vote, a.k.a. STV). It allows users to:
- Create contest configuration files using a graphical user interface (GUI)
- Validate contest configuration files to ensure they are well-formed, and all values are within expected ranges
- Tabulate a contest
Expand Down Expand Up @@ -30,7 +30,7 @@ The Tabulator produces the following as output:

#### Method 2 (Less Easy): Compile and Run Using Gradle

1. Install [JDK 14 or higher](https://jdk.java.net/), and make sure your Java path is picking it up properly by verifying that the following command returns the expected version:
1. Install [JDK 17 or higher](https://jdk.java.net/), and make sure your Java path is picking it up properly by verifying that the following command returns the expected version:

`$ java -version`

Expand Down
65 changes: 39 additions & 26 deletions build.gradle
@@ -1,30 +1,32 @@
plugins {
id "application"
id "checkstyle"
// Latest version at: https://github.com/spotbugs/spotbugs-gradle-plugin/tags
id "com.github.spotbugs" version "5.0.9"
id "idea"
id "java"
id "org.openjfx.javafxplugin" version "0.0.9"
id "org.beryx.jlink" version "2.20.0"
id "java-library"
id "org.beryx.jlink" version "2.25.0"
id "org.openjfx.javafxplugin" version "0.0.11"
}

repositories {
mavenCentral()
}

dependencies {
implementation "org.apache.commons:commons-csv:1.8"
implementation "org.apache.poi:poi-ooxml:4.1.2"
implementation "com.fasterxml.jackson.core:jackson-core:2.11.1"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.11.1"
implementation "com.fasterxml.jackson.core:jackson-databind:2.11.1"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.1"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.6.2"
implementation 'org.apache.commons:commons-csv:1.9.0'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.3'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}

// ### Application plugin settings
application {
mainClassName = "${moduleName}.Main"
mainClass = "${moduleName}.Main"
}

// Uncomment below to simulate running from the CLI
Expand All @@ -35,17 +37,29 @@ application {

// ### Checkstyle plugin settings
checkstyle {
toolVersion = "8.36.2"
// Latest version at https://github.com/checkstyle/checkstyle/tags
toolVersion = '10.3.2'
// Keep the below file updated along with subsequent versions of Checkstyle (make sure to choose
// the tag matching the toolVersion above):
//
// https://github.com/checkstyle/checkstyle/blob/checkstyle-8.36.2/src/main/resources/google_checks.xml
//
// VERY IMPORTANT: after copying a new version of the above, make sure the "SuppressionFilter"
// module has this line in order to actually pick up our project's Checkstyle suppression rules:
// value="${config_loc}/checkstyle-suppressions.xml"
// More info on this at: https://github.com/BrightSpots/rcv/issues/489
// https://github.com/checkstyle/checkstyle/blob/checkstyle-10.3.2/src/main/resources/google_checks.xml
// NOTE: After updating the local version of config/checkstyle/google_checks.xml again in the
// future, it may be necessary to subsequently replace the following line in the local copy to
// prevent suppressions from being ignored:
// "${org.checkstyle.google.suppressionfilter.config}"
// with:
// "${config_loc}/checkstyle-suppressions.xml"
// Additional context: https://github.com/gradle/gradle/issues/21409
configFile = file("$projectDir/config/checkstyle/google_checks.xml")
maxWarnings = 0
ignoreFailures = false
}
System.setProperty("org.checkstyle.google.suppressionfilter.config",
"$projectDir/config/checkstyle/checkstyle-suppressions.xml")

spotbugs {
// Latest version at: https://github.com/spotbugs/spotbugs/tags
toolVersion = '4.7.1'
excludeFilter = file("config/spotbugs/exclude.xml")
}

// ### Idea plugin settings
Expand All @@ -56,11 +70,10 @@ idea {
}

// ### Java plugin settings
sourceCompatibility = JavaVersion.VERSION_14

compileJava.dependsOn(clean)
compileJava {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

test {
Expand All @@ -77,7 +90,7 @@ test {

// ### JavaFX plugin settings
javafx {
version = "14.0.1"
version = "18"
modules = ["javafx.base", "javafx.controls", "javafx.fxml", "javafx.graphics"]
}

Expand Down
4 changes: 2 additions & 2 deletions config/checkstyle/checkstyle-suppressions.xml
Expand Up @@ -5,7 +5,7 @@
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<suppressions>
<!-- If we don't name our fields in ways the violate the below checks, the code doesn't function -->
<!-- If we don't name our fields in ways that violate the below checks, the code doesn't function -->
<suppress checks="MemberName" files="CommonDataFormatReader.java|HartCvrReader.java"/>
<suppress checks="AbbreviationAsWordInNameCheck" files="CommonDataFormatReader.java"
message="CVR"/>
Expand All @@ -15,4 +15,4 @@
<suppress checks="AbbreviationAsWordInNameCheck" files="ContestConfig.java"
message="isMultiSeatBottomsUpUntilNWinnersEnabled"/>

</suppressions>
</suppressions>

0 comments on commit 359e0b0

Please sign in to comment.