Skip to content

Commit dc5220e

Browse files
authored
Merge pull request #347 from Kotlin/0.10.0
release 0.10.0
2 parents 841590b + e0a7f7a commit dc5220e

File tree

8 files changed

+64
-92
lines changed

8 files changed

+64
-92
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
ALGOLIA_INDEX_NAME: prod_DATAFRAME_HELP
1616
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
1717
CONFIG_JSON_PRODUCT: Dataframe
18-
CONFIG_JSON_VERSION: 0.9
18+
CONFIG_JSON_VERSION: '0.10'
1919

2020
jobs:
2121
build-job:

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kotlin Dataframe: typesafe in-memory structured data processing for JVM
22
[![JetBrains incubator project](https://jb.gg/badges/incubator.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
33
[![Kotlin component alpha stability](https://img.shields.io/badge/project-alpha-kotlin.svg?colorA=555555&colorB=DB3683&label=&logo=kotlin&logoColor=ffffff&logoWidth=10)](https://kotlinlang.org/docs/components-stability.html)
4-
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
4+
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.20-blue.svg?logo=kotlin)](http://kotlinlang.org)
55
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/dataframe?color=blue&label=Maven%20Central)](https://search.maven.org/artifact/org.jetbrains.kotlinx/dataframe)
66
[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
77

@@ -24,12 +24,18 @@ Explore [**documentation**](https://kotlin.github.io/dataframe/overview.html) fo
2424
## Setup
2525

2626
### Gradle
27-
```groovy
27+
```kotlin
28+
plugins {
29+
// Optional Gradle plugin for enhanced type safety and schema generation
30+
// https://kotlin.github.io/dataframe/gradle.html
31+
id("org.jetbrains.kotlinx.dataframe") version "0.10.0"
32+
}
33+
2834
repositories {
2935
mavenCentral()
3036
}
3137
dependencies {
32-
implementation("org.jetbrains.kotlinx:dataframe:0.9.1")
38+
implementation("org.jetbrains.kotlinx:dataframe:0.10.0")
3339
}
3440
```
3541
### Jupyter Notebook

core/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,16 @@ tasks.withType<KspTaskJvm> {
182182
dependsOn(tasks.generateKeywordsSrc)
183183
}
184184

185+
tasks.formatKotlinMain {
186+
dependsOn(tasks.generateKeywordsSrc)
187+
dependsOn("kspKotlin")
188+
}
189+
190+
tasks.formatKotlinTest {
191+
dependsOn(tasks.generateKeywordsSrc)
192+
dependsOn("kspTestKotlin")
193+
}
194+
185195
tasks.lintKotlinMain {
186196
dependsOn(tasks.generateKeywordsSrc)
187197
dependsOn("kspKotlin")

docs/StardustDocs/project.ihp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<ihp version="2.0">
55
<categories src="c.list"/>
66
<topics dir="topics"/>
7-
<images dir="images" version="0.9" web-path="images/" />
7+
<images dir="images" version="0.10" web-path="images/" />
88
<vars src="v.list"/>
9-
<instance src="d.tree" version="0.9" id="dataframe"/>
9+
<instance src="d.tree" version="0.10" id="dataframe"/>
1010
<settings>
1111
<default-property element-name="chapter" property-name="show-structure-depth" value="2"/>
1212
</settings>

docs/StardustDocs/topics/gradle.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface Person {
2828
}
2929
```
3030

31-
#### Execute kspKotlin task to generate type-safe accessors for schemas:
31+
#### Execute assemble task to generate type-safe accessors for schemas:
3232

3333
<!---FUN useProperties-->
3434

@@ -37,7 +37,7 @@ val df = dataFrameOf("name", "age")(
3737
"Alice", 15,
3838
"Bob", 20
3939
).cast<Person>()
40-
// age only available after executing `build` or `kspKotlin`!
40+
// age only available after executing `assemble` or `kspKotlin`!
4141
val teens = df.filter { age in 10..19 }
4242
teens.print()
4343
```
@@ -46,7 +46,7 @@ teens.print()
4646

4747
### Schema inference
4848

49-
Specify schema with preferred method and execute the `build` task.
49+
Specify schema with preferred method and execute the `assemble` task.
5050

5151
<tabs>
5252
<tab title="Method 1. Annotation processing">
@@ -70,6 +70,7 @@ the same package as file containing the annotation.
7070
)
7171

7272
import org.jetbrains.kotlinx.dataframe.annotations.ImportDataSchema
73+
import org.jetbrains.kotlinx.dataframe.api.*
7374
```
7475

7576
See KDocs for `@ImportDataSchema` in IDE
@@ -98,7 +99,7 @@ See [reference](gradleReference.md) and [examples](gradleReference.md#examples)
9899
</tab>
99100
</tabs>
100101

101-
After `build`, the following code should compile and run:
102+
After `assemble`, the following code should compile and run:
102103

103104
<!---FUN useInferredSchema-->
104105

docs/StardustDocs/topics/installation.md

Lines changed: 28 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If you want to always use the latest version, add another magic before `%use dat
3030
If you want to use specific version of the Kotlin DataFrame library, you can specify it in brackets:
3131

3232
```text
33-
%use dataframe(0.8.1)
33+
%use dataframe(%dataFrameVersion%)
3434
```
3535

3636
After loading, all essential types will be already imported, so you can start using the Kotlin DataFrame library. Enjoy!
@@ -52,45 +52,57 @@ The simplest way of doing this is shown on screenshot:
5252
The Kotlin DataFrame library is published to Maven Central, so you can simply add the following line to your Kotlin DSL
5353
buildscript to depend on it:
5454

55-
### All-in-one artifact
55+
### General configuration
5656

5757
<tabs>
5858
<tab title="Kotlin DSL">
5959

6060
```kotlin
61+
plugins {
62+
id("org.jetbrains.kotlinx.dataframe") version "%dataFrameVersion%"
63+
}
64+
6165
dependencies {
62-
implementation("org.jetbrains.kotlinx:dataframe:<version>")
66+
implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%")
6367
}
6468
```
6569

6670
</tab>
6771

6872
<tab title="Groovy DSL">
6973

70-
```kotlin
74+
```groovy
75+
plugins {
76+
id("org.jetbrains.kotlinx.dataframe") version "%dataFrameVersion%"
77+
}
78+
7179
dependencies {
72-
implementation 'org.jetbrains.kotlinx:dataframe:<version>'
80+
implementation 'org.jetbrains.kotlinx:dataframe:%dataFrameVersion%'
7381
}
7482
```
7583

7684
</tab>
7785

7886
</tabs>
7987

80-
### Only what you need
88+
Note that it's better to use the same version for a library and plugin to avoid unpredictable errors.
89+
After plugin configuration you can try it out with [example](gradle.md#annotation-processing).
90+
91+
### Custom configuration
8192

82-
If you want to avoid adding unnecessary dependency, you can choose whatever you need:
93+
If you want to avoid adding unnecessary dependency, you can choose from following artifacts:
8394

8495
<tabs>
8596
<tab title="Kotlin DSL">
8697

8798
```kotlin
8899
dependencies {
89100
// Artifact containing all APIs and implementations
90-
implementation("org.jetbrains.kotlinx:dataframe-core:<version>")
101+
implementation("org.jetbrains.kotlinx:dataframe-core:%dataFrameVersion%")
91102
// Optional formats support
92-
implementation("org.jetbrains.kotlinx:dataframe-excel:<version>")
93-
implementation("org.jetbrains.kotlinx:dataframe-arrow:<version>")
103+
implementation("org.jetbrains.kotlinx:dataframe-excel:%dataFrameVersion%")
104+
implementation("org.jetbrains.kotlinx:dataframe-arrow:%dataFrameVersion%")
105+
implementation("org.jetbrains.kotlinx:dataframe-openapi:%dataFrameVersion%")
94106
}
95107
```
96108

@@ -101,38 +113,27 @@ dependencies {
101113
```groovy
102114
dependencies {
103115
// Artifact containing all APIs and implementations
104-
implementation 'org.jetbrains.kotlinx:dataframe-core:<version>'
116+
implementation 'org.jetbrains.kotlinx:dataframe-core:%dataFrameVersion%'
105117
// Optional formats support
106-
implementation 'org.jetbrains.kotlinx:dataframe-excel:<version>'
107-
implementation 'org.jetbrains.kotlinx:dataframe-arrow:<version>'
118+
implementation 'org.jetbrains.kotlinx:dataframe-excel:%dataFrameVersion%'
119+
implementation 'org.jetbrains.kotlinx:dataframe-arrow:%dataFrameVersion%'
120+
implementation 'org.jetbrains.kotlinx:dataframe-openapi:%dataFrameVersion%'
108121
}
109122
```
110123

111124
</tab>
112125

113126
</tabs>
114127

115-
### Data schema preprocessor
128+
#### Linter configuration
116129

117130
We provide a Gradle plugin that generates interfaces by your data.
118-
To use it in your project, pick up the latest version from [here](https://plugins.gradle.org/plugin/org.jetbrains.kotlinx.dataframe)
119-
and follow the configuration:
131+
Use this configuration to prevent linter from complaining about formatting in the generated sources.
120132

121133
<tabs>
122134
<tab title="Kotlin DSL">
123135

124136
```kotlin
125-
plugins {
126-
id("org.jetbrains.kotlinx.dataframe") version "<version>"
127-
}
128-
129-
dependencies {
130-
implementation("org.jetbrains.kotlinx:dataframe:<version>")
131-
}
132-
133-
// Make IDE aware of the generated code:
134-
kotlin.sourceSets.getByName("main").kotlin.srcDir("build/generated/ksp/main/kotlin/")
135-
136137
// (Only if you use kotlint) Excludes for `kotlint`:
137138
tasks.withType<org.jmailen.gradle.kotlinter.tasks.LintTask> {
138139
exclude {
@@ -149,18 +150,6 @@ tasks.withType<org.jmailen.gradle.kotlinter.tasks.LintTask> {
149150
<tab title="Groovy DSL">
150151

151152
```groovy
152-
plugins {
153-
id("org.jetbrains.kotlinx.dataframe") version "<version>"
154-
}
155-
156-
dependencies {
157-
implementation("org.jetbrains.kotlinx:dataframe:<version>")
158-
}
159-
160-
// Make IDE aware of the generated code:
161-
kotlin.sourceSets.getByName("main").kotlin.srcDir("build/generated/ksp/main/kotlin/")
162-
163-
// (Only if you use kotlint) Excludes for `kotlint`:
164153
tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
165154
exclude {
166155
it.name.endsWith(".Generated.kt")
@@ -173,50 +162,8 @@ tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
173162

174163
</tab>
175164

176-
<tab title="Multiplatform (JVM target Only)">
177-
178-
```kotlin
179-
plugins {
180-
id("org.jetbrains.kotlinx.dataframe") version "<version>"
181-
}
182-
183-
kotlin {
184-
jvm()
185-
sourceSets {
186-
val jvmMain by getting {
187-
// Make IDE aware of the generated code:
188-
kotlin.srcDir("build/generated/ksp/jvmMain/kotlin/")
189-
dependencies {
190-
implementation("org.jetbrains.kotlinx:dataframe:<version>")
191-
}
192-
}
193-
}
194-
}
195-
196-
// (Only if you use kotlint) Excludes for `kotlint`:
197-
tasks.withType<org.jmailen.gradle.kotlinter.tasks.LintTask> {
198-
exclude {
199-
it.name.endsWith(".Generated.kt")
200-
}
201-
exclude {
202-
it.name.endsWith("\$Extensions.kt")
203-
}
204-
}
205-
```
206-
207-
</tab>
208-
209165
</tabs>
210166

211-
<note>
212-
213-
If the code generated by the plugin isn't resolved in IDE, make sure you've configured source sets according to the snippet above. More information in [KSP documentation](https://github.com/google/ksp/blob/main/docs/quickstart.md#make-ide-aware-of-generated-code)
214-
215-
</note>
216-
217-
Note that it's better to use the same version for a library and plugin to avoid unpredictable errors.
218-
After plugin configuration you can try it out with [example](gradle.md#annotation-processing).
219-
220167
## Other build systems
221168

222169
If you are using Maven, Ivy or Bazel to configure your build, you can still use the Kotlin DataFrame library in your project.

docs/StardustDocs/v.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE vars SYSTEM "https://helpserver.labs.jb.gg/help/schemas/mvp/vars.dtd">
33
<vars>
4-
<var name="dataFrameVersion" value="0.9.1" type="string"/>
4+
<var name="dataFrameVersion" value="0.10.0" type="string"/>
55
</vars>

tests/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ korro {
6767
}
6868
}
6969

70+
tasks.formatKotlinMain {
71+
dependsOn("kspKotlin")
72+
}
73+
74+
tasks.formatKotlinTest {
75+
dependsOn("kspTestKotlin")
76+
}
77+
7078
tasks.lintKotlinMain {
7179
dependsOn("kspKotlin")
7280
}

0 commit comments

Comments
 (0)