Skip to content

Commit 4f1ce74

Browse files
committed
Merge branch 'master' into readAllSqlTables-duckdb-fix2
2 parents 69ac5c1 + f9f98b4 commit 4f1ce74

File tree

265 files changed

+8656
-3364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+8656
-3364
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Explore [**documentation**](https://kotlin.github.io/dataframe) for details.
4242
You could find the following articles there:
4343

4444
* [Guides and Examples](https://kotlin.github.io/dataframe/guides-and-examples.html)
45-
* [Get started with Kotlin DataFrame](https://kotlin.github.io/dataframe/gettingstarted.html)
45+
* [Get started with Kotlin DataFrame](https://kotlin.github.io/dataframe/setup.html)
4646
* [Working with Data Schemas](https://kotlin.github.io/dataframe/schemas.html)
4747
* [Setup compiler plugin in Gradle project](https://kotlin.github.io/dataframe/compiler-plugin.html)
4848
* [Full list of all supported operations](https://kotlin.github.io/dataframe/operations.html)
@@ -61,7 +61,7 @@ Check out this [notebook with new features](examples/notebooks/feature_overviews
6161
## Setup
6262

6363
> For more detailed instructions on how to get started with Kotlin DataFrame, refer to the
64-
> [Getting Started](https://kotlin.github.io/dataframe/gettingstarted.html).
64+
> [Getting Started](https://kotlin.github.io/dataframe/setup.html).
6565
6666
### Kotlin Notebook
6767

build.gradle.kts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ plugins {
2020
alias(publisher)
2121
alias(serialization) apply false
2222
alias(dokka)
23-
alias(kover)
23+
// alias(kover)
2424
alias(ktlint)
25-
alias(korro) apply false
26-
alias(kodex) apply false
25+
26+
// TODO cannot define korro and kodex here due to leaking them kotlin-compiler-embeddable into the build classpath
27+
// alias(korro) apply false
28+
// alias(kodex) apply false
29+
2730
alias(simpleGit) apply false
2831
alias(dependencyVersions)
2932
alias(buildconfig) apply false
@@ -41,7 +44,7 @@ repositories {
4144
mavenLocal()
4245
mavenCentral()
4346
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
44-
maven(jupyterApiTCRepo)
47+
if (jupyterApiTCRepo.isNotBlank()) maven(jupyterApiTCRepo)
4548
}
4649

4750
configurations {
@@ -61,15 +64,15 @@ dependencies {
6164
// experimental, so not included by default:
6265
// api(projects.dataframeOpenapi)
6366

64-
kover(projects.core)
65-
kover(projects.dataframeArrow)
66-
kover(projects.dataframeExcel)
67-
kover(projects.dataframeOpenapi)
68-
kover(projects.dataframeJdbc)
69-
kover(projects.dataframeCsv)
70-
kover(projects.dataframeJson)
71-
kover(projects.plugins.kotlinDataframe)
72-
kover(projects.dataframeJupyter)
67+
// kover(projects.core)
68+
// kover(projects.dataframeArrow)
69+
// kover(projects.dataframeExcel)
70+
// kover(projects.dataframeOpenapi)
71+
// kover(projects.dataframeJdbc)
72+
// kover(projects.dataframeCsv)
73+
// kover(projects.dataframeJson)
74+
// kover(projects.plugins.kotlinDataframe)
75+
// kover(projects.dataframeJupyter)
7376
}
7477

7578
enum class Version : Comparable<Version> {
@@ -155,6 +158,7 @@ val modulesUsingJava11 = with(projects) {
155158
dataframeGeo,
156159
examples.ideaExamples.titanic,
157160
tests,
161+
plugins.dataframeGradlePlugin,
158162
)
159163
}.map { it.path }
160164

@@ -204,6 +208,7 @@ allprojects {
204208
configure<BuildConfigExtension> {
205209
packageName = "org.jetbrains.kotlinx.dataframe"
206210
className = "BuildConfig"
211+
buildConfigField("KOTLIN_VERSION", libs.versions.kotlin.asProvider().get())
207212
buildConfigField("VERSION", "${project.version}")
208213
buildConfigField("DEBUG", findProperty("kotlin.dataframe.debug")?.toString()?.toBoolean() ?: false)
209214
}
@@ -248,8 +253,8 @@ kotlinPublications {
248253
fairDokkaJars = false
249254

250255
sonatypeSettings(
251-
project.findProperty("kds.sonatype.user") as String?,
252-
project.findProperty("kds.sonatype.password") as String?,
256+
project.findProperty("kds.sonatype.central.username") as String?,
257+
project.findProperty("kds.sonatype.central.password") as String?,
253258
"dataframe project, v. ${project.version}",
254259
)
255260

core/api/core.api

Lines changed: 202 additions & 200 deletions
Large diffs are not rendered by default.

core/build.gradle.kts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313
alias(publisher)
1414
alias(serialization)
1515
alias(korro)
16-
alias(kover)
16+
// alias(kover)
1717
alias(ktlint)
1818
alias(kodex)
1919
alias(simpleGit)
@@ -112,10 +112,10 @@ tasks.withType<KspTask> {
112112
}
113113
}
114114

115-
val clearTestResults by tasks.creating(Delete::class) {
115+
val clearTestResults by tasks.registering(Delete::class, fun Delete.() {
116116
delete(layout.buildDirectory.dir("dataframes"))
117117
delete(layout.buildDirectory.dir("korroOutputLines"))
118-
}
118+
})
119119

120120
val samplesTest = tasks.register<Test>("samplesTest") {
121121
group = "Verification"
@@ -140,7 +140,7 @@ val samplesTest = tasks.register<Test>("samplesTest") {
140140
sourceSets["main"].runtimeClasspath
141141
}
142142

143-
val clearSamplesOutputs by tasks.creating {
143+
val clearSamplesOutputs by tasks.registering {
144144
group = "documentation"
145145

146146
doFirst {
@@ -152,11 +152,11 @@ val clearSamplesOutputs by tasks.creating {
152152
}
153153
}
154154

155-
val addSamplesToGit by tasks.creating(GitTask::class) {
155+
val addSamplesToGit by tasks.registering(GitTask::class, fun GitTask.() {
156156
directory = file(".")
157157
command = "add"
158158
args = listOf("-A", "../docs/StardustDocs/resources/snippets")
159-
}
159+
})
160160

161161
val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
162162
group = "documentation"
@@ -167,7 +167,7 @@ val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
167167
classpath = sourceSets.test.get().runtimeClasspath
168168

169169
doLast {
170-
addSamplesToGit.executeCommand()
170+
addSamplesToGit.get().executeCommand()
171171
}
172172
}
173173

@@ -240,7 +240,7 @@ idea {
240240
// If `changeJarTask` is run, modify all Jar tasks such that before running the Kotlin sources are set to
241241
// the target of `processKdocMain`, and they are returned to normal afterward.
242242
// This is usually only done when publishing
243-
val changeJarTask by tasks.creating {
243+
val changeJarTask by tasks.registering {
244244
outputs.upToDateWhen { project.hasProperty("skipKodex") }
245245
doFirst {
246246
tasks.withType<Jar> {
@@ -372,21 +372,21 @@ tasks.withType<KotlinCompile> {
372372

373373
tasks.test {
374374
maxHeapSize = "2048m"
375-
kover {
376-
currentProject {
377-
instrumentation { disabledForTestTasks.addAll("samplesTest") }
378-
}
379-
reports {
380-
total {
381-
filters {
382-
excludes {
383-
classes("org.jetbrains.kotlinx.dataframe.jupyter.*")
384-
classes("org.jetbrains.kotlinx.dataframe.jupyter.SampleNotebooksTests")
385-
}
386-
}
387-
}
388-
}
389-
}
375+
// kover {
376+
// currentProject {
377+
// instrumentation { disabledForTestTasks.addAll("samplesTest") }
378+
// }
379+
// reports {
380+
// total {
381+
// filters {
382+
// excludes {
383+
// classes("org.jetbrains.kotlinx.dataframe.jupyter.*")
384+
// classes("org.jetbrains.kotlinx.dataframe.jupyter.SampleNotebooksTests")
385+
// }
386+
// }
387+
// }
388+
// }
389+
// }
390390
}
391391

392392
kotlinPublications {

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/aliases.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,16 @@ public typealias ColumnsSelector<T, C> = Selector<ColumnsSelectionDsl<T>, Column
137137
// region filters
138138

139139
/**
140-
* ## Row Filter
140+
* A lambda expression that evaluates a row of the [DataFrame]
141+
* and returns a [Boolean] indicating whether the row should be included in the result.
141142
*
142-
* [RowFilter] is a lambda function expecting a [Boolean] result given an instance of [DataRow]`<T>` as context
143-
* (`this` and `it`).
143+
* The lambda has access to the [`DataRow<T>`][DataRow] both as `this` and as `it`,
144+
* enabling concise and readable conditions.
144145
*
145-
* Return `true` if the row should be included in the result.
146+
* Commonly used in operations such as [filter][org.jetbrains.kotlinx.dataframe.api.filter],
147+
* [drop][org.jetbrains.kotlinx.dataframe.api.drop], and others.
146148
*
147-
* Shorthand for:
149+
* Equivalent to:
148150
* ```kotlin
149151
* DataRow<T>.(it: DataRow<T>) -> Boolean
150152
* ```

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/Nulls.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,15 @@ public fun <T> DataFrame<T>.dropNulls(whereAllNull: Boolean = false, columns: Co
964964
}
965965
}
966966

967+
@Refine
968+
@Interpretable("DropNulls0")
969+
@Deprecated(
970+
"DataFrame conventional name for filterNot* functions is drop*",
971+
ReplaceWith("dropNulls(columns = columns)"),
972+
DeprecationLevel.ERROR,
973+
)
974+
public fun <T> DataFrame<T>.filterNotNull(columns: ColumnsSelector<T, *>): DataFrame<T> = dropNulls(columns = columns)
975+
967976
/**
968977
* ## The Drop Nulls Operation
969978
*
@@ -1256,6 +1265,8 @@ public fun <T> DataFrame<T>.dropNA(vararg columns: AnyColumnReference, whereAllN
12561265
* If `true`, rows are dropped if all selected cells are [`NA`][org.jetbrains.kotlinx.dataframe.documentation.NA].
12571266
* If `false`, rows are dropped if any of the selected cells is [`NA`][org.jetbrains.kotlinx.dataframe.documentation.NA].
12581267
*/
1268+
@Refine
1269+
@Interpretable("DropNa1")
12591270
public fun <T> DataFrame<T>.dropNA(whereAllNA: Boolean = false): DataFrame<T> = dropNA(whereAllNA) { all() }
12601271

12611272
/**

0 commit comments

Comments
 (0)