Skip to content

Miscellaneous 0.15 fixes #989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Collaborator

@koperagen koperagen Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to keep this println? It can't be disabled on user end

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to have it, a good check for the user that the dataframe integration received the special command correctly and activated the dataframe-csv module.
It's also good to see it in the output of the notebook, to see something experimental is going on, like a small warning.
When the module is included by default I'll remove the message of course

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
Loading