diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/csv.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/csv.kt index b5f22fc1c4..6f7abf87ac 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/csv.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/csv.kt @@ -19,7 +19,6 @@ import org.jetbrains.kotlinx.dataframe.codeGen.DefaultReadCsvMethod import org.jetbrains.kotlinx.dataframe.codeGen.DefaultReadDfMethod import org.jetbrains.kotlinx.dataframe.impl.api.parse import org.jetbrains.kotlinx.dataframe.impl.io.readDelimImpl -import org.jetbrains.kotlinx.dataframe.io.ColType.String import org.jetbrains.kotlinx.dataframe.util.AS_URL import org.jetbrains.kotlinx.dataframe.util.AS_URL_IMPORT import org.jetbrains.kotlinx.dataframe.util.AS_URL_REPLACE diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/Integration.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/Integration.kt index f93ef52aa2..12f1e15c2a 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/Integration.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/Integration.kt @@ -69,6 +69,10 @@ internal class Integration(private val notebook: Notebook, private val options: val version = options["v"] + // TODO temporary settings while these experimental modules are being developed + private val enableExperimentalCsv = options["enableExperimentalCsv"] + private val enableExperimentalGeo = options["enableExperimentalGeo"] + private fun KotlinKernelHost.updateImportDataSchemaVariable( importDataSchema: ImportDataSchema, property: KProperty<*>, @@ -152,6 +156,15 @@ internal class Integration(private val notebook: Notebook, private val options: override fun Builder.onLoaded() { if (version != null) { + if (enableExperimentalCsv?.toBoolean() == true) { + println("Enabling experimental CSV module: dataframe-csv") + dependencies("org.jetbrains.kotlinx:dataframe-csv:$version") + } + if (enableExperimentalGeo?.toBoolean() == true) { + println("Enabling experimental Geo module: dataframe-geo") + repositories("https://repo.osgeo.org/repository/release") + dependencies("org.jetbrains.kotlinx:dataframe-geo:$version") + } dependencies( "org.jetbrains.kotlinx:dataframe-excel:$version", "org.jetbrains.kotlinx:dataframe-jdbc:$version", diff --git a/dataframe-csv/README.md b/dataframe-csv/README.md new file mode 100644 index 0000000000..249bf559c3 --- /dev/null +++ b/dataframe-csv/README.md @@ -0,0 +1,7 @@ +## :dataframe-csv + +This module, published as `dataframe-csv`, contains all logic and tests for DataFrame to be able to work with `csv` +files. + +At the moment, this module is in the experimental stage, so it's not included when +you add the `dataframe` dependency to your project. diff --git a/dataframe-csv/build.gradle.kts b/dataframe-csv/build.gradle.kts index 0e27e1148b..115943e90c 100644 --- a/dataframe-csv/build.gradle.kts +++ b/dataframe-csv/build.gradle.kts @@ -28,7 +28,7 @@ repositories { } dependencies { - implementation(project(":core")) + api(project(":core")) // for csv reading api(libs.deephavenCsv) diff --git a/dataframe-csv/generated-sources/tmp b/dataframe-csv/generated-sources/tmp deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/ListSink.kt b/dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/ListSink.kt index 5f784013fe..5c7cc5013f 100644 --- a/dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/ListSink.kt +++ b/dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/ListSink.kt @@ -54,7 +54,7 @@ internal class ListSink(val columnIndex: Int, val dataType: DataType) : SinkSour ) } - private val _data: MutableList = mutableListOf() + private val _data: MutableList = ArrayList(1000) val data: List get() = _data