Skip to content

Commit 7b07187

Browse files
authored
Merge branch 'Kotlin:master' into nullable-without-nulls
2 parents af06594 + 6bb6cf7 commit 7b07187

File tree

169 files changed

+13818
-1870
lines changed

Some content is hidden

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

169 files changed

+13818
-1870
lines changed

.github/workflows/main.yml

+24-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Build docs
22

33
on:
4+
# Specify to run a workflow manually from the Actions tab on GitHub.
45
workflow_dispatch:
56

7+
# Gives the workflow permissions to clone the repo and create a page deployment
68
permissions:
79
id-token: write
810
pages: write
@@ -20,15 +22,31 @@ env:
2022
jobs:
2123
build-job:
2224
runs-on: ubuntu-latest
25+
container: registry.jetbrains.team/p/writerside/builder/writerside-builder:2.1.1481-p3872-df
26+
outputs:
27+
artifact: ${{ steps.generate-artifact.outputs.artifact }}
2328
steps:
2429
- name: Checkout repository
2530
uses: actions/checkout@v3
26-
- name: Build Writerside docs using Docker
27-
uses: ./.github/writerside-build
28-
- name: Upload artifact
31+
- name: Prepare for build
32+
run: |
33+
apt-get update
34+
apt-get install -y zip
35+
mkdir -p artifacts
36+
- name: Build docs and include sitemap.xml
37+
run: |
38+
export DISPLAY=:99
39+
Xvfb :99 &
40+
/opt/builder/bin/idea.sh helpbuilderinspect -source-dir . -product $PRODUCT --runner github -output-dir artifacts/ || true
41+
test -e artifacts/$ARTIFACT && echo $ARTIFACT exists
42+
cp docs/StardustDocs/sitemap.xml artifacts/sitemap.xml
43+
cd artifacts
44+
zip -r $ARTIFACT sitemap.xml
45+
working-directory: ${{ github.workspace }}
46+
- name: Upload modified documentation artifact
2947
uses: actions/upload-artifact@v3
3048
with:
31-
name: artifact
49+
name: help
3250
path: artifacts/${{ env.ARTIFACT }}
3351
retention-days: 7
3452
- name: Upload algolia-indexes
@@ -42,13 +60,14 @@ jobs:
4260
environment:
4361
name: github-pages
4462
url: ${{ steps.deployment.outputs.page_url }}
63+
# Requires the build-job results
4564
needs: build-job
4665
runs-on: ubuntu-latest
4766
steps:
4867
- name: Download artifact
4968
uses: actions/download-artifact@v3
5069
with:
51-
name: artifact
70+
name: help
5271
- name: Unzip artifact
5372
uses: montudor/action-zip@v1
5473
with:

.github/writerside-build/Dockerfile

-10
This file was deleted.

.github/writerside-build/action.yml

-6
This file was deleted.

.github/writerside-build/entrypoint.sh

-6
This file was deleted.

README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![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)
7+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Kotlin/dataframe/HEAD)
78

89
Kotlin Dataframe aims to reconcile Kotlin's static typing with the dynamic nature of data by utilizing both the full power of the Kotlin language and the opportunities provided by intermittent code execution in Jupyter notebooks and REPL.
910

@@ -30,15 +31,15 @@ Explore [**documentation**](https://kotlin.github.io/dataframe/overview.html) fo
3031
plugins {
3132
// Optional Gradle plugin for enhanced type safety and schema generation
3233
// https://kotlin.github.io/dataframe/gradle.html
33-
id 'org.jetbrains.kotlinx.dataframe' version '0.11.0'
34+
id 'org.jetbrains.kotlinx.dataframe' version '0.11.1'
3435
}
3536
3637
repositories {
3738
mavenCentral()
3839
}
3940
4041
dependencies {
41-
implementation 'org.jetbrains.kotlinx:dataframe:0.11.0'
42+
implementation 'org.jetbrains.kotlinx:dataframe:0.11.1'
4243
}
4344
```
4445

@@ -48,15 +49,15 @@ dependencies {
4849
plugins {
4950
// Optional Gradle plugin for enhanced type safety and schema generation
5051
// https://kotlin.github.io/dataframe/gradle.html
51-
id("org.jetbrains.kotlinx.dataframe") version "0.11.0"
52+
id("org.jetbrains.kotlinx.dataframe") version "0.11.1"
5253
}
5354

5455
repositories {
5556
mavenCentral()
5657
}
5758

5859
dependencies {
59-
implementation("org.jetbrains.kotlinx:dataframe:0.11.0")
60+
implementation("org.jetbrains.kotlinx:dataframe:0.11.1")
6061
}
6162
```
6263

@@ -67,11 +68,11 @@ dependencies {
6768
plugins {
6869
// Optional Gradle plugin for enhanced type safety and schema generation
6970
// https://kotlin.github.io/dataframe/gradle.html
70-
id 'org.jetbrains.kotlinx.dataframe' version '0.11.0'
71+
id 'org.jetbrains.kotlinx.dataframe' version '0.11.1'
7172
}
7273
7374
dependencies {
74-
implementation 'org.jetbrains.kotlinx:dataframe:0.11.0'
75+
implementation 'org.jetbrains.kotlinx:dataframe:0.11.1'
7576
}
7677
7778
android {
@@ -115,11 +116,11 @@ tasks.withType(KotlinCompile).configureEach {
115116
plugins {
116117
// Optional Gradle plugin for enhanced type safety and schema generation
117118
// https://kotlin.github.io/dataframe/gradle.html
118-
id("org.jetbrains.kotlinx.dataframe") version "0.11.0"
119+
id("org.jetbrains.kotlinx.dataframe") version "0.11.1"
119120
}
120121

121122
dependencies {
122-
implementation("org.jetbrains.kotlinx:dataframe:0.11.0")
123+
implementation("org.jetbrains.kotlinx:dataframe:0.11.1")
123124
}
124125

125126
android {
@@ -189,6 +190,7 @@ This table shows the mapping between main library component versions and minimum
189190
| 0.10.0 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
190191
| 0.10.1 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
191192
| 0.11.0 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
193+
| 0.11.1 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
192194
## Usage example
193195

194196
**Create:**

RELEASE_CHECK_LIST.md

+5
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@
2929
17. Create Release from the release tag on GitHub
3030
18. Update a KDF version in the [Kotlin Jupyter Descriptor](https://github.com/Kotlin/kotlin-jupyter-libraries/blob/master/dataframe.json). Now the Renovate bot doing this
3131
19. Update DataFrame version in gradle.properties file for next release cycle (i.e. 0.10.0 -> 0.11.0)
32+
20. Update deprecated functions in [deprecationMessages.kt](/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt)
33+
such that
34+
- `Level.WARNING` messages are changed to `Level.ERROR`
35+
- `Level.ERROR` messages and their functions are removed.
36+
- Update regions in the file accordingly.

core/build.gradle.kts

+40-13
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,28 @@ tasks.withType<KorroTask> {
154154
dependsOn(copySamplesOutputs)
155155
}
156156

157+
// This task installs the pre-commit hook to the local machine the first time the project is built
158+
// The pre-commit hook contains the command to run processKDocsMain before each commit
159+
val installGitPreCommitHook by tasks.creating(Copy::class) {
160+
doNotTrackState(/* reasonNotToTrackState = */ "Fails on TeamCity otherwise.")
161+
162+
val gitHooksDir = File(rootProject.rootDir, ".git/hooks")
163+
if (gitHooksDir.exists()) {
164+
from(File(rootProject.rootDir, "gradle/scripts/pre-commit"))
165+
into(gitHooksDir)
166+
fileMode = 755
167+
} else {
168+
logger.lifecycle("'.git/hooks' directory not found. Skipping installation of pre-commit hook.")
169+
}
170+
171+
}
172+
tasks.named("assemble") {
173+
dependsOn(installGitPreCommitHook)
174+
}
175+
176+
// region docPreprocessor
177+
178+
// This task is used to add all generated sources (from processKDocsMain) to git
157179
val generatedSourcesFolderName = "generated-sources"
158180
val addGeneratedSourcesToGit by tasks.creating(GitTask::class) {
159181
directory.set(file("."))
@@ -162,8 +184,8 @@ val addGeneratedSourcesToGit by tasks.creating(GitTask::class) {
162184
}
163185

164186
// Backup the kotlin source files location
165-
val kotlinMainSources = kotlin.sourceSets.main.get().kotlin.sourceDirectories
166-
val kotlinTestSources = kotlin.sourceSets.test.get().kotlin.sourceDirectories
187+
val kotlinMainSources: FileCollection = kotlin.sourceSets.main.get().kotlin.sourceDirectories
188+
val kotlinTestSources: FileCollection = kotlin.sourceSets.test.get().kotlin.sourceDirectories
167189

168190
fun pathOf(vararg parts: String) = parts.joinToString(File.separator)
169191

@@ -176,12 +198,15 @@ val processKDocsMain by creatingProcessDocTask(
176198
processors = listOf(
177199
INCLUDE_DOC_PROCESSOR,
178200
INCLUDE_FILE_DOC_PROCESSOR,
179-
INCLUDE_ARG_DOC_PROCESSOR,
201+
ARG_DOC_PROCESSOR,
180202
COMMENT_DOC_PROCESSOR,
181203
SAMPLE_DOC_PROCESSOR,
182204
)
183205

206+
arguments += ARG_DOC_PROCESSOR_LOG_NOT_FOUND to false
207+
184208
task {
209+
group = "KDocs"
185210
doLast {
186211
// ensure generated sources are added to git
187212
addGeneratedSourcesToGit.executeCommand()
@@ -224,6 +249,18 @@ tasks.withType<Jar> {
224249
}
225250
}
226251

252+
// If we want to use Dokka, make sure to use the preprocessed sources
253+
tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaLeafTask> {
254+
dependsOn(processKDocsMain)
255+
dokkaSourceSets {
256+
all {
257+
sourceRoot(processKDocsMain.target.get())
258+
}
259+
}
260+
}
261+
262+
// endregion
263+
227264
korro {
228265
docs = fileTree(rootProject.rootDir) {
229266
include("docs/StardustDocs/topics/*.md")
@@ -370,13 +407,3 @@ dataframes {
370407
name = "org.jetbrains.kotlinx.dataframe.samples.api.Repository"
371408
}
372409
}
373-
374-
// If we want to use Dokka, make sure to use the preprocessed sources
375-
tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaLeafTask> {
376-
dependsOn(processKDocsMain)
377-
dokkaSourceSets {
378-
all {
379-
sourceRoot(processKDocsMain.target.get())
380-
}
381-
}
382-
}

0 commit comments

Comments
 (0)