Skip to content

Commit

Permalink
Merge branch 'Kotlin:master' into nullable-without-nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
Kopilov authored Aug 24, 2023
2 parents af06594 + 6bb6cf7 commit 7b07187
Show file tree
Hide file tree
Showing 169 changed files with 13,818 additions and 1,870 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Build docs

on:
# Specify to run a workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Gives the workflow permissions to clone the repo and create a page deployment
permissions:
id-token: write
pages: write
Expand All @@ -20,15 +22,31 @@ env:
jobs:
build-job:
runs-on: ubuntu-latest
container: registry.jetbrains.team/p/writerside/builder/writerside-builder:2.1.1481-p3872-df
outputs:
artifact: ${{ steps.generate-artifact.outputs.artifact }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build Writerside docs using Docker
uses: ./.github/writerside-build
- name: Upload artifact
- name: Prepare for build
run: |
apt-get update
apt-get install -y zip
mkdir -p artifacts
- name: Build docs and include sitemap.xml
run: |
export DISPLAY=:99
Xvfb :99 &
/opt/builder/bin/idea.sh helpbuilderinspect -source-dir . -product $PRODUCT --runner github -output-dir artifacts/ || true
test -e artifacts/$ARTIFACT && echo $ARTIFACT exists
cp docs/StardustDocs/sitemap.xml artifacts/sitemap.xml
cd artifacts
zip -r $ARTIFACT sitemap.xml
working-directory: ${{ github.workspace }}
- name: Upload modified documentation artifact
uses: actions/upload-artifact@v3
with:
name: artifact
name: help
path: artifacts/${{ env.ARTIFACT }}
retention-days: 7
- name: Upload algolia-indexes
Expand All @@ -42,13 +60,14 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Requires the build-job results
needs: build-job
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: artifact
name: help
- name: Unzip artifact
uses: montudor/action-zip@v1
with:
Expand Down
10 changes: 0 additions & 10 deletions .github/writerside-build/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .github/writerside-build/action.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/writerside-build/entrypoint.sh

This file was deleted.

18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.20-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![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)
[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Kotlin/dataframe/HEAD)

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.

Expand All @@ -30,15 +31,15 @@ Explore [**documentation**](https://kotlin.github.io/dataframe/overview.html) fo
plugins {
// Optional Gradle plugin for enhanced type safety and schema generation
// https://kotlin.github.io/dataframe/gradle.html
id 'org.jetbrains.kotlinx.dataframe' version '0.11.0'
id 'org.jetbrains.kotlinx.dataframe' version '0.11.1'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.jetbrains.kotlinx:dataframe:0.11.0'
implementation 'org.jetbrains.kotlinx:dataframe:0.11.1'
}
```

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

repositories {
mavenCentral()
}

dependencies {
implementation("org.jetbrains.kotlinx:dataframe:0.11.0")
implementation("org.jetbrains.kotlinx:dataframe:0.11.1")
}
```

Expand All @@ -67,11 +68,11 @@ dependencies {
plugins {
// Optional Gradle plugin for enhanced type safety and schema generation
// https://kotlin.github.io/dataframe/gradle.html
id 'org.jetbrains.kotlinx.dataframe' version '0.11.0'
id 'org.jetbrains.kotlinx.dataframe' version '0.11.1'
}
dependencies {
implementation 'org.jetbrains.kotlinx:dataframe:0.11.0'
implementation 'org.jetbrains.kotlinx:dataframe:0.11.1'
}
android {
Expand Down Expand Up @@ -115,11 +116,11 @@ tasks.withType(KotlinCompile).configureEach {
plugins {
// Optional Gradle plugin for enhanced type safety and schema generation
// https://kotlin.github.io/dataframe/gradle.html
id("org.jetbrains.kotlinx.dataframe") version "0.11.0"
id("org.jetbrains.kotlinx.dataframe") version "0.11.1"
}

dependencies {
implementation("org.jetbrains.kotlinx:dataframe:0.11.0")
implementation("org.jetbrains.kotlinx:dataframe:0.11.1")
}

android {
Expand Down Expand Up @@ -189,6 +190,7 @@ This table shows the mapping between main library component versions and minimum
| 0.10.0 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
| 0.10.1 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
| 0.11.0 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
| 0.11.1 | 8 | 1.8.20 | 0.11.0-358 | 3.0.0 | 11.0.0 |
## Usage example

**Create:**
Expand Down
5 changes: 5 additions & 0 deletions RELEASE_CHECK_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@
17. Create Release from the release tag on GitHub
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
19. Update DataFrame version in gradle.properties file for next release cycle (i.e. 0.10.0 -> 0.11.0)
20. Update deprecated functions in [deprecationMessages.kt](/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt)
such that
- `Level.WARNING` messages are changed to `Level.ERROR`
- `Level.ERROR` messages and their functions are removed.
- Update regions in the file accordingly.
53 changes: 40 additions & 13 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,28 @@ tasks.withType<KorroTask> {
dependsOn(copySamplesOutputs)
}

// This task installs the pre-commit hook to the local machine the first time the project is built
// The pre-commit hook contains the command to run processKDocsMain before each commit
val installGitPreCommitHook by tasks.creating(Copy::class) {
doNotTrackState(/* reasonNotToTrackState = */ "Fails on TeamCity otherwise.")

val gitHooksDir = File(rootProject.rootDir, ".git/hooks")
if (gitHooksDir.exists()) {
from(File(rootProject.rootDir, "gradle/scripts/pre-commit"))
into(gitHooksDir)
fileMode = 755
} else {
logger.lifecycle("'.git/hooks' directory not found. Skipping installation of pre-commit hook.")
}

}
tasks.named("assemble") {
dependsOn(installGitPreCommitHook)
}

// region docPreprocessor

// This task is used to add all generated sources (from processKDocsMain) to git
val generatedSourcesFolderName = "generated-sources"
val addGeneratedSourcesToGit by tasks.creating(GitTask::class) {
directory.set(file("."))
Expand All @@ -162,8 +184,8 @@ val addGeneratedSourcesToGit by tasks.creating(GitTask::class) {
}

// Backup the kotlin source files location
val kotlinMainSources = kotlin.sourceSets.main.get().kotlin.sourceDirectories
val kotlinTestSources = kotlin.sourceSets.test.get().kotlin.sourceDirectories
val kotlinMainSources: FileCollection = kotlin.sourceSets.main.get().kotlin.sourceDirectories
val kotlinTestSources: FileCollection = kotlin.sourceSets.test.get().kotlin.sourceDirectories

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

Expand All @@ -176,12 +198,15 @@ val processKDocsMain by creatingProcessDocTask(
processors = listOf(
INCLUDE_DOC_PROCESSOR,
INCLUDE_FILE_DOC_PROCESSOR,
INCLUDE_ARG_DOC_PROCESSOR,
ARG_DOC_PROCESSOR,
COMMENT_DOC_PROCESSOR,
SAMPLE_DOC_PROCESSOR,
)

arguments += ARG_DOC_PROCESSOR_LOG_NOT_FOUND to false

task {
group = "KDocs"
doLast {
// ensure generated sources are added to git
addGeneratedSourcesToGit.executeCommand()
Expand Down Expand Up @@ -224,6 +249,18 @@ tasks.withType<Jar> {
}
}

// If we want to use Dokka, make sure to use the preprocessed sources
tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaLeafTask> {
dependsOn(processKDocsMain)
dokkaSourceSets {
all {
sourceRoot(processKDocsMain.target.get())
}
}
}

// endregion

korro {
docs = fileTree(rootProject.rootDir) {
include("docs/StardustDocs/topics/*.md")
Expand Down Expand Up @@ -370,13 +407,3 @@ dataframes {
name = "org.jetbrains.kotlinx.dataframe.samples.api.Repository"
}
}

// If we want to use Dokka, make sure to use the preprocessed sources
tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaLeafTask> {
dependsOn(processKDocsMain)
dokkaSourceSets {
all {
sourceRoot(processKDocsMain.target.get())
}
}
}
Loading

0 comments on commit 7b07187

Please sign in to comment.