From f1b16e93e5e22cb59d3dcf7cda90825999a269be Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Thu, 16 May 2024 20:32:27 +0200 Subject: [PATCH 1/2] added test for importDataSchema which requires jupyter 0.12.0.225 --- .../src/test/kotlin/OpenApiTests.kt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dataframe-openapi/src/test/kotlin/OpenApiTests.kt b/dataframe-openapi/src/test/kotlin/OpenApiTests.kt index cb6a05ff19..a3b6c98654 100644 --- a/dataframe-openapi/src/test/kotlin/OpenApiTests.kt +++ b/dataframe-openapi/src/test/kotlin/OpenApiTests.kt @@ -1068,7 +1068,7 @@ class OpenApiTests : JupyterReplTestCase() { if (separatorChar == '\\') it.replace("\\", "\\\\") else it } - @Language("kts") + @Language("kt") val _1 = execRaw( """ val ApiGuru = importDataSchema(File("$filePath")) @@ -1077,7 +1077,7 @@ class OpenApiTests : JupyterReplTestCase() { val apiGuruDataTripleQuote = "\"\"\"${apiGuruData.replace("$", "\${'$'}")}\"\"\"" - @Language("kts") + @Language("kt") val _2 = execRaw( """ val df = ApiGuru.APIs.readJsonStr($apiGuruDataTripleQuote) @@ -1087,7 +1087,7 @@ class OpenApiTests : JupyterReplTestCase() { println(_2) - @Language("kts") + @Language("kt") val _3 = execRaw( """ df.filter { @@ -1097,6 +1097,17 @@ class OpenApiTests : JupyterReplTestCase() { } """.trimIndent() ) as AnyFrame + + @Language("kt") + val _4 = execRaw( + """ + ApiGuru.APIs.readJsonStr($apiGuruDataTripleQuote).filter { + value.versions.value.any { + (updated ?: added).year >= 2021 + } + } + """.trimIndent() + ) as AnyFrame } private fun String.trimLines(): String = trim().removeSurrounding("\n").lines().joinToString("\n") { it.trim() } From ba393a4d364c9d888865e0d47d34eafa6be5f3fc Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Thu, 16 May 2024 20:50:44 +0200 Subject: [PATCH 2/2] updating kotlin-jupyter version to 0.12.0.225 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 38e1e045ef..b5ef7b97f2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] ksp = "1.9.23-1.0.20" -kotlinJupyter = "0.12.0-139" +kotlinJupyter = "0.12.0-225" # TODO Updating requires major changes all across the project # https://github.com/Kotlin/dataframe/issues/364