Skip to content

Commit

Permalink
Merge pull request #989 from Kotlin/miscellaneous-0.15-fixes
Browse files Browse the repository at this point in the history
Miscellaneous 0.15 fixes
  • Loading branch information
Jolanrensen authored Dec 6, 2024
2 parents fb0853b + 04f1041 commit b1f92dc
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<*>,
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions dataframe-csv/README.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion dataframe-csv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repositories {
}

dependencies {
implementation(project(":core"))
api(project(":core"))

// for csv reading
api(libs.deephavenCsv)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal class ListSink(val columnIndex: Int, val dataType: DataType) : SinkSour
)
}

private val _data: MutableList<Any?> = mutableListOf()
private val _data: MutableList<Any?> = ArrayList(1000)

val data: List<Any?>
get() = _data
Expand Down

0 comments on commit b1f92dc

Please sign in to comment.