Skip to content

Commit ba94dd6

Browse files
committed
Merge branch 'master' into copilot/fix-1321
# Conflicts: # settings.gradle.kts
2 parents e072bfe + 295fe51 commit ba94dd6

File tree

394 files changed

+38243
-2742
lines changed

Some content is hidden

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

394 files changed

+38243
-2742
lines changed

.devcontainer/devcontainer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Java",
3+
"image": "mcr.microsoft.com/devcontainers/java:1-21",
4+
"features": {
5+
"ghcr.io/devcontainers/features/java:1": {
6+
"version": "none",
7+
"installMaven": "true",
8+
"mavenVersion": "3.8.6",
9+
"installGradle": "true"
10+
}
11+
}
12+
}

.github/workflows/junie.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Junie
2+
run-name: Junie run ${{ inputs.run_id }}
3+
4+
permissions:
5+
contents: write
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
run_id:
11+
description: "id of workflow process"
12+
required: true
13+
workflow_params:
14+
description: "stringified params"
15+
required: true
16+
17+
jobs:
18+
call-workflow-passing-data:
19+
uses: jetbrains-junie/junie-workflows/.github/workflows/ej-issue.yml@main
20+
with:
21+
workflow_params: ${{ inputs.workflow_params }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
.kotlin
99
build
1010
.ipynb_checkpoints
11+
local.properties

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: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ kotlin {
156156
val modulesUsingJava11 = with(projects) {
157157
setOf(
158158
dataframeJupyter,
159-
dataframeGeo,
159+
dataframeGeoJupyter,
160160
examples.ideaExamples.titanic,
161+
examples.ideaExamples.unsupportedDataSources,
161162
tests,
162163
plugins.dataframeGradlePlugin,
163164
)
@@ -209,6 +210,13 @@ allprojects {
209210
options.release.set(8)
210211
}
211212
}
213+
tasks.withType<KotlinCompile> {
214+
compilerOptions {
215+
// enables support for kotlin.time.Instant as kotlinx.datetime.Instant was deprecated; Issue #1350
216+
// Can be removed once kotlin.time.Instant is marked "stable".
217+
optIn.add("kotlin.time.ExperimentalTime")
218+
}
219+
}
212220

213221
// Attempts to configure ktlint for each sub-project that uses the plugin
214222
afterEvaluate {
@@ -274,8 +282,8 @@ kotlinPublications {
274282
fairDokkaJars = false
275283

276284
sonatypeSettings(
277-
project.findProperty("kds.sonatype.user") as String?,
278-
project.findProperty("kds.sonatype.password") as String?,
285+
project.findProperty("kds.sonatype.central.username") as String?,
286+
project.findProperty("kds.sonatype.central.password") as String?,
279287
"dataframe project, v. ${project.version}",
280288
)
281289

core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and [tests/.../samples/api](../tests/src/test/kotlin/org/jetbrains/kotlinx/dataf
1818
and they are copied over to Markdown files in [docs/StardustDocs/topics](../docs/StardustDocs/topics)
1919
by [Korro](https://github.com/devcrocod/korro).
2020

21-
### Explainer dataframes
21+
### ~~Explainer dataframes~~ NOTE: This is being moved to [tests](../tests)
2222

2323
Aside from code samples, `@TransformDataFrameExpressions` annotated test functions also generate sample
2424
dataframe HTML files that can be used as iFrames on the documentation website.

core/api/core.api

Lines changed: 99 additions & 49 deletions
Large diffs are not rendered by default.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ public interface DataFrame<out T> :
6868

6969
// region rows
7070

71+
/**
72+
* Returns the total number of rows of this [DataFrame].
73+
*
74+
* @return The number of rows in the [DataFrame].
75+
*/
7176
public fun rowsCount(): Int
7277

7378
public operator fun iterator(): Iterator<DataRow<T>> = rows().iterator()

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.jetbrains.kotlinx.dataframe
22

33
import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
4+
import org.jetbrains.kotlinx.dataframe.annotations.HasSchema
45
import org.jetbrains.kotlinx.dataframe.api.next
56
import org.jetbrains.kotlinx.dataframe.api.prev
67
import org.jetbrains.kotlinx.dataframe.columns.ColumnKind
@@ -10,13 +11,15 @@ import org.jetbrains.kotlinx.dataframe.impl.columnName
1011
import org.jetbrains.kotlinx.dataframe.impl.owner
1112
import org.jetbrains.kotlinx.dataframe.impl.toIterable
1213
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
14+
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_DATA_ROW_COLUMN_REFERENCE_GET
1315
import kotlin.reflect.KProperty
1416

1517
/**
1618
* Single row of a [DataFrame].
1719
*
1820
* @param T Schema marker. See [DataFrame] for details
1921
*/
22+
@HasSchema(schemaArg = 0)
2023
public interface DataRow<out T> {
2124

2225
public fun index(): Int
@@ -29,7 +32,7 @@ public interface DataRow<out T> {
2932

3033
public operator fun <R> get(expression: RowExpression<T, R>): R = expression(this, this)
3134

32-
@Deprecated(DEPRECATED_ACCESS_API)
35+
@Deprecated(DEPRECATED_DATA_ROW_COLUMN_REFERENCE_GET)
3336
@AccessApiOverload
3437
public operator fun <R> get(column: ColumnReference<R>): R
3538

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@ package org.jetbrains.kotlinx.dataframe.annotations
22

33
import kotlin.reflect.KClass
44

5+
/**
6+
* Matches the type parameter of the annotated class to DataRow/DataFrame type parameter T.
7+
*
8+
* Annotate public API classes that implement DataRow/DataFrame interface to enable "extract schema/create column from values" operation:
9+
* ```kotlin
10+
* df.add {
11+
* "col" from { it }
12+
* }
13+
* ```
14+
* Result before:
15+
* `col: DataColumn<AddDataRow<MySchema>>`
16+
*
17+
* Result after:
18+
*
19+
* ```
20+
* col:
21+
* col1: Int
22+
* col2: String
23+
* ```
24+
*/
525
@Target(AnnotationTarget.CLASS)
626
public annotation class HasSchema(val schemaArg: Int)
727

0 commit comments

Comments
 (0)