init research
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
### :dataframe-compiler-plugin-core
|
||||
|
||||
Subset of :core used by [compiler plugin](https://github.com/JetBrains/kotlin/tree/master/plugins/kotlin-dataframe) to implement compile time interpreters of operations.
|
||||
Bundled together with compiler plugin in Kotlin and by extension in IntelliJ. Should aim to include only necessary code
|
||||
@@ -0,0 +1,88 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
|
||||
plugins {
|
||||
with(convention.plugins) {
|
||||
alias(kotlinJvm11)
|
||||
}
|
||||
with(libs.plugins) {
|
||||
alias(shadow)
|
||||
alias(publisher)
|
||||
}
|
||||
}
|
||||
|
||||
group = "org.jetbrains.kotlinx.dataframe"
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core")) {
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect")
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
|
||||
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-datetime-jvm")
|
||||
exclude(group = "commons-io", module = "commons-io")
|
||||
exclude(group = "commons-io", module = "commons-csv")
|
||||
exclude(group = "org.apache.commons", module = "commons-csv")
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
exclude(group = "io.github.microutils", module = "kotlin-logging-jvm")
|
||||
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-core-jvm")
|
||||
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-json-jvm")
|
||||
exclude(group = "commons-codec", module = "commons-codec")
|
||||
exclude(group = "com.squareup", module = "kotlinpoet-jvm")
|
||||
exclude(group = "ch.randelshofer", module = "fastdoubleparser")
|
||||
exclude(group = "io.github.oshai", module = "kotlin-logging-jvm")
|
||||
exclude(group = "org.jetbrains", module = "annotations")
|
||||
}
|
||||
|
||||
// we assume Kotlin plugin has reflect dependency - we're not bringing our own version
|
||||
testImplementation(kotlin("reflect"))
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.withType<ShadowJar> {
|
||||
dependencies {
|
||||
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
|
||||
exclude(dependency("org.jetbrains.kotlin:kotlin-stdlib:.*"))
|
||||
exclude(dependency("org.jetbrains.kotlinx:kotlinx-datetime-jvm:.*"))
|
||||
exclude(dependency("commons-io:commons-io:.*"))
|
||||
exclude(dependency("commons-io:commons-csv:.*"))
|
||||
exclude(dependency("org.apache.commons:commons-csv:.*"))
|
||||
exclude(dependency("org.slf4j:slf4j-api:.*"))
|
||||
exclude(dependency("io.github.microutils:kotlin-logging-jvm:.*"))
|
||||
exclude(dependency("org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:.*"))
|
||||
exclude(dependency("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:.*"))
|
||||
exclude(dependency("commons-codec:commons-codec:.*"))
|
||||
exclude(dependency("com.squareup:kotlinpoet-jvm:.*"))
|
||||
exclude(dependency("ch.randelshofer:fastdoubleparser:.*"))
|
||||
exclude(dependency("io.github.oshai:kotlinlogging:.*"))
|
||||
exclude(dependency("org.jetbrains:annotations:.*"))
|
||||
}
|
||||
exclude("org/jetbrains/kotlinx/dataframe/jupyter/**")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/io/**")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/documentation/**")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/impl/io/**")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/MaxKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/MinKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/PercentileKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/MedianKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/SumKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/MeanKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/StdKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/api/DataColumnArithmeticsKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/impl/api/DescribeKt*.class")
|
||||
exclude("org/jetbrains/kotlinx/dataframe/impl/api/Parsers*.class")
|
||||
exclude($$"org/jetbrains/kotlinx/dataframe/impl/api/ConvertKt$createConverter*.class")
|
||||
|
||||
exclude("io/github/oshai/kotlinlogging/**")
|
||||
exclude("apache/**")
|
||||
exclude("**.html")
|
||||
exclude("**.js")
|
||||
exclude("**.css")
|
||||
exclude("META-INF/kotlin-jupyter-libraries/**")
|
||||
}
|
||||
|
||||
kotlinPublications {
|
||||
publication {
|
||||
publicationName = "shadowed"
|
||||
artifactId = "dataframe-compiler-plugin-core"
|
||||
packageName = artifactId
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package org.jetbrains.kotlinx.dataframe
|
||||
|
||||
import org.jetbrains.kotlinx.dataframe.api.asColumn
|
||||
import org.jetbrains.kotlinx.dataframe.api.convert
|
||||
import org.jetbrains.kotlinx.dataframe.api.dataFrameOf
|
||||
import org.jetbrains.kotlinx.dataframe.api.map
|
||||
import org.jetbrains.kotlinx.dataframe.api.with
|
||||
import kotlin.test.Test
|
||||
|
||||
// Testing that even excluding dependencies required API still works without exceptions
|
||||
class PluginApiUsages {
|
||||
@Test
|
||||
fun convertWith() {
|
||||
dataFrameOf("a" to listOf("123"))
|
||||
.convert { col("a") }
|
||||
.with { it.toString() }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun convertAsColumn() {
|
||||
dataFrameOf("a" to listOf("123"))
|
||||
.convert { col("a") }
|
||||
.asColumn { col -> col.map { it.toString() } }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user