From 3ef236a4a56837b37b282ef1c0284d1424b88684 Mon Sep 17 00:00:00 2001 From: breandan Date: Mon, 29 Apr 2024 00:10:19 -0400 Subject: [PATCH] update gradle CI config --- .github/workflows/main.yml | 2 +- .../hypergraph/kaliningraph/automata/WFSATest.kt | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6584cfee..e7c29ee6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,4 +18,4 @@ jobs: with: java-version: 17 - name: Build with Gradle - run: ./gradlew -PleaseExcludeBenchmarks allTests --stacktrace \ No newline at end of file + run: ./gradlew -Dorg.gradle.jvmargs=-XX:+UseContainerSupport -PleaseExcludeBenchmarks allTests --stacktrace --no-daemon \ No newline at end of file diff --git a/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt b/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt index d67be00a..0e95ee34 100644 --- a/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt +++ b/src/jvmTest/kotlin/ai/hypergraph/kaliningraph/automata/WFSATest.kt @@ -1,14 +1,12 @@ package ai.hypergraph.kaliningraph.automata +import Grammars import ai.hypergraph.kaliningraph.parsing.* -import ai.hypergraph.kaliningraph.tokenizeByWhitespace -import io.kotest.matchers.types.shouldHaveSameHashCodeAs import net.jhoogland.jautomata.* import net.jhoogland.jautomata.Automaton import net.jhoogland.jautomata.operations.* import net.jhoogland.jautomata.semirings.RealSemiring -import kotlin.system.measureTimeMillis -import kotlin.test.Test +import kotlin.test.* import kotlin.time.measureTimedValue @@ -54,7 +52,11 @@ class WFSATest { } ).also { println("Total: ${Automata.transitions(it).size} arcs, ${Automata.states(it).size}") } .let { Automata.bestStrings(it, 1000).map { it.label.joinToString(" ") } } - }.also { it.value.forEach { println(levenshteinAlign(toRepair, it).paintANSIColors()) } } - .also { println("Decoding ${it.value.size} repairs took ${it.duration}") } + }.also { + it.value.forEach { + println(levenshteinAlign(toRepair, it).paintANSIColors()) + assertTrue(it in Grammars.seq2parsePythonCFG.language) + } + }.also { println("Decoding ${it.value.size} repairs took ${it.duration}") } } } \ No newline at end of file