-
Notifications
You must be signed in to change notification settings - Fork 76
Fix jupyter logger #1361
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
Fix jupyter logger #1361
Changes from all commits
3741d83
1d21d5e
c5b98d5
f56629d
cb93ba6
eea39ee
ea7b9e7
f86b01a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
.kotlin | ||
build | ||
.ipynb_checkpoints | ||
local.properties |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
with(libs.plugins) { | ||
alias(kotlin.jvm) | ||
alias(publisher) | ||
alias(jupyter.api) | ||
alias(ktlint) | ||
alias(dataframe) | ||
alias(ksp) | ||
} | ||
} | ||
|
||
group = "org.jetbrains.kotlinx" | ||
|
||
repositories { | ||
// geo repository should come before Maven Central | ||
maven("https://repo.osgeo.org/repository/release") | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
// https://stackoverflow.com/questions/26993105/i-get-an-error-downloading-javax-media-jai-core1-1-3-from-maven-central | ||
// jai core dependency should be excluded from geotools dependencies and added separately | ||
fun ExternalModuleDependency.excludeJaiCore() = exclude("javax.media", "jai_core") | ||
|
||
dependencies { | ||
implementation(projects.dataframeGeo) | ||
implementation(projects.dataframeJupyter) | ||
|
||
implementation(libs.geotools.referencing) { excludeJaiCore() } | ||
|
||
// logger, need it for geotools | ||
implementation(libs.log4j.core) | ||
implementation(libs.log4j.api) | ||
|
||
testImplementation(kotlin("test")) | ||
} | ||
|
||
tasks.withType<KotlinCompile>().configureEach { | ||
friendPaths.from(project(projects.core.path).projectDir) | ||
} | ||
|
||
kotlinPublications { | ||
publication { | ||
publicationName = "dataframeGeoJupyter" | ||
artifactId = project.name | ||
description = "GeoDataFrame API" | ||
packageName = artifactId | ||
} | ||
} | ||
|
||
tasks.processJupyterApiResources { | ||
libraryProducers = listOf("org.jetbrains.kotlinx.dataframe.jupyter.IntegrationGeo") | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,8 +68,8 @@ internal class Integration(private val notebook: Notebook, private val options: | |
// TODO temporary settings while these experimental modules are being developed | ||
|
||
private val enableExperimentalCsv = options["enableExperimentalCsv"] | ||
private val enableExperimentalGeo = options["enableExperimentalGeo"] | ||
private val enableExperimentalOpenApi = options["enableExperimentalOpenApi"] | ||
private val enableExperimentalGeo = options["enableExperimentalGeo"] | ||
|
||
private fun KotlinKernelHost.updateImportDataSchemaVariable( | ||
importDataSchema: ImportDataSchema, | ||
|
@@ -170,9 +170,7 @@ internal class Integration(private val notebook: Notebook, private val options: | |
println("CSV module is already enabled by default now.") | ||
} | ||
if (enableExperimentalGeo?.toBoolean() == true) { | ||
println("Enabling experimental Geo module: dataframe-geo") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of completely removing it, please provide a helpful message of what to do instead :) We mentioned the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
repositories("https://repo.osgeo.org/repository/release") | ||
dependencies("org.jetbrains.kotlinx:dataframe-geo:$version") | ||
println("dataframe-geo module was extracted into separate descriptor: %use dataframe-geo") | ||
} | ||
if (enableExperimentalOpenApi?.toBoolean() == true) { | ||
println("Enabling experimental OpenAPI 3.0.0 module: dataframe-openapi") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not ideal, better use
notebook.display("text")
for such things. Reason: we can't guarantee standard stream sync in multithreading envs.