Skip to content

Commit b1f92dc

Browse files
authored
Merge pull request #989 from Kotlin/miscellaneous-0.15-fixes
Miscellaneous 0.15 fixes
2 parents fb0853b + 04f1041 commit b1f92dc

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/csv.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import org.jetbrains.kotlinx.dataframe.codeGen.DefaultReadCsvMethod
1919
import org.jetbrains.kotlinx.dataframe.codeGen.DefaultReadDfMethod
2020
import org.jetbrains.kotlinx.dataframe.impl.api.parse
2121
import org.jetbrains.kotlinx.dataframe.impl.io.readDelimImpl
22-
import org.jetbrains.kotlinx.dataframe.io.ColType.String
2322
import org.jetbrains.kotlinx.dataframe.util.AS_URL
2423
import org.jetbrains.kotlinx.dataframe.util.AS_URL_IMPORT
2524
import org.jetbrains.kotlinx.dataframe.util.AS_URL_REPLACE

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/Integration.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ internal class Integration(private val notebook: Notebook, private val options:
6969

7070
val version = options["v"]
7171

72+
// TODO temporary settings while these experimental modules are being developed
73+
private val enableExperimentalCsv = options["enableExperimentalCsv"]
74+
private val enableExperimentalGeo = options["enableExperimentalGeo"]
75+
7276
private fun KotlinKernelHost.updateImportDataSchemaVariable(
7377
importDataSchema: ImportDataSchema,
7478
property: KProperty<*>,
@@ -152,6 +156,15 @@ internal class Integration(private val notebook: Notebook, private val options:
152156

153157
override fun Builder.onLoaded() {
154158
if (version != null) {
159+
if (enableExperimentalCsv?.toBoolean() == true) {
160+
println("Enabling experimental CSV module: dataframe-csv")
161+
dependencies("org.jetbrains.kotlinx:dataframe-csv:$version")
162+
}
163+
if (enableExperimentalGeo?.toBoolean() == true) {
164+
println("Enabling experimental Geo module: dataframe-geo")
165+
repositories("https://repo.osgeo.org/repository/release")
166+
dependencies("org.jetbrains.kotlinx:dataframe-geo:$version")
167+
}
155168
dependencies(
156169
"org.jetbrains.kotlinx:dataframe-excel:$version",
157170
"org.jetbrains.kotlinx:dataframe-jdbc:$version",

dataframe-csv/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## :dataframe-csv
2+
3+
This module, published as `dataframe-csv`, contains all logic and tests for DataFrame to be able to work with `csv`
4+
files.
5+
6+
At the moment, this module is in the experimental stage, so it's not included when
7+
you add the `dataframe` dependency to your project.

dataframe-csv/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repositories {
2828
}
2929

3030
dependencies {
31-
implementation(project(":core"))
31+
api(project(":core"))
3232

3333
// for csv reading
3434
api(libs.deephavenCsv)

dataframe-csv/generated-sources/tmp

Whitespace-only changes.

dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/ListSink.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ internal class ListSink(val columnIndex: Int, val dataType: DataType) : SinkSour
5454
)
5555
}
5656

57-
private val _data: MutableList<Any?> = mutableListOf()
57+
private val _data: MutableList<Any?> = ArrayList(1000)
5858

5959
val data: List<Any?>
6060
get() = _data

0 commit comments

Comments
 (0)