Skip to content

Commit 0f49f72

Browse files
committed
version bumping: compress, ksp, kotlin, kotlin-jupyter, dataframe
1 parent 2ac873f commit 0f49f72

File tree

22 files changed

+171
-60
lines changed

22 files changed

+171
-60
lines changed

build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ plugins {
1515
alias(kotlin.jvm)
1616
alias(publisher)
1717
alias(serialization)
18-
alias(dataframe) apply false
1918
alias(jupyter.api) apply false
2019
alias(dokka)
2120
alias(kover)
2221
alias(kotlinter)
2322
alias(docProcessor) apply false
2423
alias(simpleGit) apply false
2524
alias(dependencyVersions)
25+
26+
// dependence on our own plugin
27+
alias(dataframe) apply false
28+
alias(ksp) apply false
2629
}
2730
}
2831

@@ -69,6 +72,8 @@ val dependencyUpdateExclusions = listOf(
6972
libs.klaxon.get().name, // 5.6 requires Java 11
7073
libs.plugins.kover.get().pluginId, // Requires more work to be updated to 1.7.0+
7174
libs.plugins.kotlinter.get().pluginId, // Updating requires major changes all across the project
75+
libs.kotestAssertions.get().name, // 5.8.0 is not possible due to https://github.com/Kotlin/kotlin-jupyter/issues/452
76+
libs.android.gradle.api.get().group, // Can't be updated to 7.4.0+ due to Java 8 compatibility
7277
)
7378

7479
// run `./gradlew dependencyUpdates` to check for updates
@@ -93,7 +98,7 @@ tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
9398
cols("group", "name", "version") and {
9499
"available"["milestone"] named "newVersion"
95100
}
96-
}.filter { "name"() !in dependencyUpdateExclusions }
101+
}.filter { "name"() !in dependencyUpdateExclusions && "group"() !in dependencyUpdateExclusions }
97102
logger.warn("Outdated dependencies found:")
98103
df.print(
99104
rowsLimit = Int.MAX_VALUE,

core/build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ plugins {
1818
alias(keywordGenerator)
1919
alias(kover)
2020
alias(kotlinter)
21-
alias(dataframe)
2221
alias(docProcessor)
2322
alias(simpleGit)
23+
24+
// dependence on our own plugin
25+
alias(dataframe)
26+
27+
// only mandatory if `kotlin.dataframe.add.ksp=false` in gradle.properties
28+
alias(ksp)
2429
}
2530
idea
2631
}
@@ -220,7 +225,8 @@ idea {
220225
// Modify all Jar tasks such that before running the Kotlin sources are set to
221226
// the target of processKdocMain and they are returned back to normal afterwards.
222227
tasks.withType<Jar> {
223-
dependsOn(processKDocsMain)
228+
// dependsOn(processKDocsMain)
229+
mustRunAfter(tasks.generateKeywordsSrc)
224230
outputs.upToDateWhen { false }
225231

226232
doFirst {

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/DataColumn.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import org.jetbrains.kotlinx.dataframe.api.filter
88
import org.jetbrains.kotlinx.dataframe.api.map
99
import org.jetbrains.kotlinx.dataframe.api.schema
1010
import org.jetbrains.kotlinx.dataframe.api.take
11-
import org.jetbrains.kotlinx.dataframe.api.type
1211
import org.jetbrains.kotlinx.dataframe.columns.BaseColumn
1312
import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup
1413
import org.jetbrains.kotlinx.dataframe.columns.ColumnKind

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/CodeGenerationTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CodeGenerationTests : DataFrameJupyterTest() {
88

99
private fun Code.checkCompilation() {
1010
lines().forEach {
11-
exec(it)
11+
execRendered(it)
1212
}
1313
}
1414

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/JupyterCodegenTests.kt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
1919
@Test
2020
fun `codegen adding column with generic type function`() {
2121
@Language("kts")
22-
val res1 = exec(
22+
val res1 = execRendered(
2323
"""
2424
fun <T> AnyFrame.addValue(value: T) = add("value") { listOf(value) }
2525
val df = dataFrameOf("a")(1).addValue(2)
@@ -36,7 +36,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
3636
@Test
3737
fun `Don't inherit from data class`() {
3838
@Language("kts")
39-
val res1 = exec(
39+
val res1 = execRendered(
4040
"""
4141
@DataSchema
4242
data class A(val a: Int)
@@ -57,7 +57,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
5757
@Test
5858
fun `Don't inherit from non open class`() {
5959
@Language("kts")
60-
val res1 = exec(
60+
val res1 = execRendered(
6161
"""
6262
@DataSchema
6363
class A(val a: Int)
@@ -78,7 +78,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
7878
@Test
7979
fun `Don't inherit from open class`() {
8080
@Language("kts")
81-
val res1 = exec(
81+
val res1 = execRendered(
8282
"""
8383
@DataSchema
8484
open class A(val a: Int)
@@ -99,7 +99,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
9999
@Test
100100
fun `Do inherit from open interface`() {
101101
@Language("kts")
102-
val res1 = exec(
102+
val res1 = execRendered(
103103
"""
104104
@DataSchema
105105
interface A { val a: Int }
@@ -120,7 +120,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
120120
@Test
121121
fun `codegen for enumerated frames`() {
122122
@Language("kts")
123-
val res1 = exec(
123+
val res1 = execRendered(
124124
"""
125125
val names = (0..2).map { it.toString() }
126126
val df = dataFrameOf(names)(1, 2, 3)
@@ -136,7 +136,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
136136
@Test
137137
fun `codegen for complex column names`() {
138138
@Language("kts")
139-
val res1 = exec(
139+
val res1 = execRendered(
140140
"""
141141
val df = DataFrame.readDelimStr("[a], (b), {c}\n1, 2, 3")
142142
df
@@ -145,7 +145,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
145145
res1.shouldBeInstanceOf<MimeTypedResult>()
146146

147147
@Language("kts")
148-
val res2 = exec(
148+
val res2 = execRendered(
149149
"""listOf(df.`{a}`[0], df.`(b)`[0], df.`{c}`[0])"""
150150
)
151151
res2 shouldBe listOf(1, 2, 3)
@@ -154,7 +154,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
154154
@Test
155155
fun `codegen for '$' that is interpolator in kotlin string literals`() {
156156
@Language("kts")
157-
val res1 = exec(
157+
val res1 = execRendered(
158158
"""
159159
val df = DataFrame.readDelimStr("\${'$'}id\n1")
160160
df
@@ -163,7 +163,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
163163
res1.shouldBeInstanceOf<MimeTypedResult>()
164164

165165
@Language("kts")
166-
val res2 = exec(
166+
val res2 = execRendered(
167167
"listOf(df.`\$id`[0])"
168168
)
169169
res2 shouldBe listOf(1)
@@ -172,7 +172,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
172172
@Test
173173
fun `codegen for backtick that is forbidden in kotlin identifiers`() {
174174
@Language("kts")
175-
val res1 = exec(
175+
val res1 = execRendered(
176176
"""
177177
val df = DataFrame.readDelimStr("Day`s\n1")
178178
df
@@ -182,7 +182,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
182182
println(res1.entries.joinToString())
183183

184184
@Language("kts")
185-
val res2 = exec(
185+
val res2 = execRendered(
186186
"listOf(df.`Day's`[0])"
187187
)
188188
res2 shouldBe listOf(1)
@@ -193,7 +193,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
193193
val forbiddenChar = ";"
194194

195195
@Language("kts")
196-
val res1 = exec(
196+
val res1 = execRendered(
197197
"""
198198
val df = DataFrame.readDelimStr("Test$forbiddenChar\n1")
199199
df
@@ -203,7 +203,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
203203
println(res1.entries.joinToString())
204204

205205
@Language("kts")
206-
val res2 = exec(
206+
val res2 = execRendered(
207207
"listOf(df.`Test `[0])"
208208
)
209209
res2 shouldBe listOf(1)
@@ -214,7 +214,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
214214
val forbiddenChar = "\\\\"
215215

216216
@Language("kts")
217-
val res1 = exec(
217+
val res1 = execRendered(
218218
"""
219219
val df = DataFrame.readDelimStr("Test$forbiddenChar\n1")
220220
df
@@ -224,7 +224,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
224224
println(res1.entries.joinToString())
225225

226226
@Language("kts")
227-
val res2 = exec(
227+
val res2 = execRendered(
228228
"listOf(df.`Test `[0])"
229229
)
230230
res2 shouldBe listOf(1)
@@ -233,7 +233,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
233233
@Test
234234
fun `generic interface`() {
235235
@Language("kts")
236-
val res1 = exec(
236+
val res1 = execRendered(
237237
"""
238238
@DataSchema
239239
interface Generic<T> {
@@ -244,7 +244,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
244244
res1.shouldBeInstanceOf<Unit>()
245245

246246
@Language("kts")
247-
val res2 = exec(
247+
val res2 = execRendered(
248248
"""
249249
val <T> ColumnsContainer<Generic<T>>.test1: DataColumn<T> get() = field
250250
val <T> DataRow<Generic<T>>.test2: T get() = field
@@ -256,7 +256,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
256256
@Test
257257
fun `generic interface with upper bound`() {
258258
@Language("kts")
259-
val res1 = exec(
259+
val res1 = execRendered(
260260
"""
261261
@DataSchema
262262
interface Generic <T : String> {
@@ -267,7 +267,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
267267
res1.shouldBeInstanceOf<Unit>()
268268

269269
@Language("kts")
270-
val res2 = exec(
270+
val res2 = execRendered(
271271
"""
272272
val <T : String> ColumnsContainer<Generic<T>>.test1: DataColumn<T> get() = field
273273
val <T : String> DataRow<Generic<T>>.test2: T get() = field
@@ -279,7 +279,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
279279
@Test
280280
fun `generic interface with variance and user type in type parameters`() {
281281
@Language("kts")
282-
val res1 = exec(
282+
val res1 = execRendered(
283283
"""
284284
interface UpperBound
285285
@@ -292,7 +292,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
292292
res1.shouldBeInstanceOf<Unit>()
293293

294294
@Language("kts")
295-
val res2 = exec(
295+
val res2 = execRendered(
296296
"""
297297
val <T : UpperBound> ColumnsContainer<Generic<T>>.test1: DataColumn<T> get() = field
298298
val <T : UpperBound> DataRow<Generic<T>>.test2: T get() = field
@@ -304,7 +304,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
304304
@Test
305305
fun `generate a new marker when dataframe marker is not a data schema so that columns are accessible with extensions`() {
306306
@Language("kts")
307-
val a = exec(
307+
val a = execRendered(
308308
"""
309309
enum class State {
310310
Idle, Productive, Maintenance
@@ -328,7 +328,7 @@ class JupyterCodegenTests : JupyterReplTestCase() {
328328
)
329329
shouldNotThrowAny {
330330
@Language("kts")
331-
val b = exec(
331+
val b = execRendered(
332332
"""
333333
events.toolId
334334
events.state

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/RenderingTests.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class RenderingTests : JupyterReplTestCase() {
3232
html shouldContain "Bill"
3333

3434
@Language("kts")
35-
val useRes = exec(
35+
val useRes = execRendered(
3636
"""
3737
USE {
3838
render<Int> { (it * 2).toString() }
@@ -73,7 +73,7 @@ class RenderingTests : JupyterReplTestCase() {
7373
fun execSimpleDf() = execHtml("""dataFrameOf("a", "b")(1, 2, 3, 4)""")
7474

7575
val htmlLight = execSimpleDf()
76-
val r1 = exec("notebook.changeColorScheme(ColorScheme.DARK); 1")
76+
val r1 = execRendered("notebook.changeColorScheme(ColorScheme.DARK); 1")
7777
val htmlDark = execSimpleDf()
7878

7979
r1 shouldBe 1
@@ -106,7 +106,7 @@ class RenderingTests : JupyterReplTestCase() {
106106
* @return the parsed DataFrame result as a `JsonObject`
107107
*/
108108
private fun executeScriptAndParseDataframeResult(@Language("kts") script: String): JsonObject {
109-
val result = exec<MimeTypedResult>(script)
109+
val result = execRendered<MimeTypedResult>(script)
110110
return parseDataframeJson(result)
111111
}
112112

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/SampleNotebooksTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class SampleNotebooksTests : DataFrameJupyterTest() {
9595
val codeToExecute = replacer.replace(code)
9696

9797
println("Executing code:\n$codeToExecute")
98-
val cellResult = exec(codeToExecute)
98+
val cellResult = execRendered(codeToExecute)
9999
println(cellResult)
100100
}
101101
} finally {

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/HtmlRenderingTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.jetbrains.kotlinx.dataframe.api.group
88
import org.jetbrains.kotlinx.dataframe.api.into
99
import org.jetbrains.kotlinx.dataframe.api.parse
1010
import org.jetbrains.kotlinx.dataframe.io.toStandaloneHTML
11-
import org.jetbrains.kotlinx.jupyter.findNthSubstring
11+
import org.jetbrains.kotlinx.jupyter.util.findNthSubstring
1212
import org.junit.Ignore
1313
import org.junit.Test
1414
import java.awt.Desktop

dataframe-openapi/src/test/kotlin/OpenApiTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class OpenApiTests : JupyterReplTestCase() {
2121
private val additionalImports = openApi.createDefaultReadMethod().additionalImports.joinToString("\n")
2222

2323
private fun execGeneratedCode(code: Code): Code {
24-
@Language("kts") val res1 = exec(
24+
@Language("kts") val res1 = execRendered(
2525
"""
2626
$additionalImports
2727
$code

examples/idea-examples/json/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import org.jetbrains.kotlinx.dataframe.api.JsonPath
44
plugins {
55
application
66
kotlin("jvm")
7+
78
id("org.jetbrains.kotlinx.dataframe")
9+
10+
// only mandatory if `kotlin.dataframe.add.ksp=false` in gradle.properties
11+
id("com.google.devtools.ksp")
812
}
913

1014
repositories {

0 commit comments

Comments
 (0)