Skip to content

Version bumps #590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions RELEASE_CHECK_LIST.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
**Release activities check-list for releases:**

0. Run code inspections (fix typos, Kotlin issues, fix code formatting, linter)
1. Write missed KDocs for new APIs
2. Update tutorials according to last code changes
3. Update README.MD according last code changes
1. Run code inspections (fix typos, Kotlin issues, fix code formatting, linter)
2. Write missed KDocs for new APIs
3. Update tutorials according to last code changes
4. Update README.MD according last code changes
- update an artifact version
- update a Kotlin version
- update the [section](README.md#kotlin-kotlin-jupyter-openapi-arrow-and-jdk-versions) about library versions
4. Update a project version in the file `gradle.properties` (i.e. 0.9.0 -> 0.10.0)
5. Update a project version in the file `gradle.properties` (i.e. 0.9.0 -> 0.10.0)
- For major releases: update a project version in the file [`v.list`](https://github.com/Kotlin/dataframe/blame/master/docs/StardustDocs/v.list)
- For major releases: update a project version in the file [`main.yml`](https://github.com/Kotlin/dataframe/blob/master/.github/workflows/main.yml)
- For major releases: update a project version in the file [`project.ihp`](https://github.com/Kotlin/dataframe/blob/master/docs/StardustDocs/project.ihp)
5. Update `libs.versions.toml` file if required
6. Create and checkout the release branch
7. Make last commit with release tag (_v0.1.1_ for example) to the release branch
8. Run tests and build artifacts on TC for the commit with the release tag
9. Deploy artifacts on MavenCentral via `Publish` task running on TC based on the commit with the release tag
10. Check artifacts' availability on [MavenCentral](https://mvnrepository.com/artifact/org.jetbrains.kotlinx/dataframe)
11. Check [Gradle Plugin portal availability](https://plugins.gradle.org/plugin/org.jetbrains.kotlinx.dataframe/) (usually it takes 12 hours)
12. Update a bootstrap dependency version in the `libs.versions.toml` file (only after the plugin's publication)
13. Make final testing
6. Update `libs.versions.toml` file if required, run `./gradlew dependencyUpdates` to check for updates
7. Create and checkout the release branch
8. Make last commit with release tag (_v0.1.1_ for example) to the release branch
9. Run tests and build artifacts on TC for the commit with the release tag
10. Deploy artifacts on MavenCentral via `Publish` task running on TC based on the commit with the release tag
11. Check artifacts' availability on [MavenCentral](https://mvnrepository.com/artifact/org.jetbrains.kotlinx/dataframe)
12. Check [Gradle Plugin portal availability](https://plugins.gradle.org/plugin/org.jetbrains.kotlinx.dataframe/) (usually it takes 12 hours)
13. Update a bootstrap dependency version in the `libs.versions.toml` file (only after the plugin's publication)
14. Make final testing
- Check on Datalore with a test project (TODO: add link)
- Check for Android with a test project (TODO: add link)
- Check for ServerSide with a test project (TODO: add link)
14. Publish Documentation from [GitHub Action](https://github.com/Kotlin/dataframe/actions/workflows/main.yml)
15. Prepare and publish the Release Notes
16. Create Release from the release tag on GitHub
17. 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
18. Update DataFrame version in the `gradle.properties` file for the next release cycle (i.e. 0.10.0 -> 0.11.0)
19. Update deprecated functions in [deprecationMessages.kt](/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt)
15. Publish Documentation from [GitHub Action](https://github.com/Kotlin/dataframe/actions/workflows/main.yml)
16. Prepare and publish the Release Notes
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 the `gradle.properties` file for the 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.
20. Update Notebook examples, both in the project and on Datalore.
21. Update Notebook examples, both in the project and on Datalore.
109 changes: 95 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.tooling.core.closure
import org.jetbrains.kotlinx.dataframe.AnyFrame
import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.api.filter
import org.jetbrains.kotlinx.dataframe.api.print
import org.jetbrains.kotlinx.dataframe.api.select
import org.jetbrains.kotlinx.dataframe.io.readJson
import org.jetbrains.kotlinx.publisher.apache2
import org.jetbrains.kotlinx.publisher.developer
import org.jetbrains.kotlinx.publisher.githubRepo
import org.jmailen.gradle.kotlinter.KotlinterExtension

@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
plugins {
kotlin("jvm") version libs.versions.kotlin
kotlin("libs.publisher") version libs.versions.libsPublisher
kotlin("plugin.serialization") version libs.versions.kotlin
id("org.jetbrains.kotlinx.dataframe") version libs.versions.dataframe apply false
kotlin("jupyter.api") version libs.versions.kotlinJupyter apply false

id("org.jetbrains.dokka") version libs.versions.dokka
id("org.jetbrains.kotlinx.kover") version libs.versions.kover
id("org.jmailen.kotlinter") version libs.versions.ktlint
id("nl.jolanrensen.docProcessor") version libs.versions.docProcessor apply false
id("xyz.ronella.simple-git") version libs.versions.simpleGit apply false
with(libs.plugins) {
alias(kotlin.jvm)
alias(publisher)
alias(serialization)
alias(jupyter.api) apply false
alias(dokka)
alias(kover)
alias(kotlinter)
alias(docProcessor) apply false
alias(simpleGit) apply false
alias(dependencyVersions)

// dependence on our own plugin
alias(dataframe) apply false
alias(ksp) apply false
}
}

val jupyterApiTCRepo: String by project
Expand All @@ -42,6 +51,78 @@ dependencies {
api(project(":dataframe-jdbc"))
}

private enum class Version : Comparable<Version> {
SNAPSHOT, DEV, ALPHA, BETA, RC, STABLE;
}

private fun String.findVersion(): Version {
val version = this.lowercase()
return when {
"snapshot" in version -> Version.SNAPSHOT
"dev" in version -> Version.DEV
"alpha" in version -> Version.ALPHA
"beta" in version -> Version.BETA
"rc" in version -> Version.RC
else -> Version.STABLE
}
}

// these names of outdated dependencies will not show up in the table output
val dependencyUpdateExclusions = listOf(
// 5.6 requires Java 11
libs.klaxon.get().name,
// TODO Requires more work to be updated to 1.7.0+, https://github.com/Kotlin/dataframe/issues/594
libs.plugins.kover.get().pluginId,
// TODO Updating requires major changes all across the project, https://github.com/Kotlin/dataframe/issues/364
libs.plugins.kotlinter.get().pluginId,
// TODO 5.8.0 is not possible due to https://github.com/Kotlin/dataframe/issues/595
libs.kotestAssertions.get().name,
// Can't be updated to 7.4.0+ due to Java 8 compatibility
libs.android.gradle.api.get().group,
// TODO 1.9.10 requires korro and docProcessor to update, https://github.com/Kotlin/dataframe/issues/596
libs.plugins.dokka.get().pluginId,
// Directly dependent on the Gradle version
"org.gradle.kotlin.kotlin-dsl",
)

// run `./gradlew dependencyUpdates` to check for updates
tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
checkForGradleUpdate = true
outputFormatter = "json,html"
revision = "milestone"

rejectVersionIf {
val current = currentVersion.findVersion()
val candidate = candidate.version.findVersion()
candidate < current
}

doLast {
val outputFile = layout.buildDirectory
.file("../$outputDir/$reportfileName.json")
.get().asFile
when (val outDatedDependencies = DataFrame.readJson(outputFile)["outdated"]["dependencies"][0]) {
is AnyFrame -> {
val df = outDatedDependencies.select {
cols("group", "name", "version") and {
"available"["milestone"] named "newVersion"
}
}.filter { "name"() !in dependencyUpdateExclusions && "group"() !in dependencyUpdateExclusions }
logger.warn("Outdated dependencies found:")
df.print(
rowsLimit = Int.MAX_VALUE,
valueLimit = Int.MAX_VALUE,
borders = true,
title = true,
alignLeft = true,
)
}

else -> logger.info("No outdated dependencies found")
}
}
}

allprojects {
tasks.withType<KotlinCompile> {
kotlinOptions {
Expand Down
36 changes: 21 additions & 15 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
import com.google.devtools.ksp.gradle.KspTaskJvm
import com.google.devtools.ksp.gradle.KspTask
import com.google.devtools.ksp.gradle.KspTaskJvm
import io.github.devcrocod.korro.KorroTask
import nl.jolanrensen.docProcessor.defaultProcessors.*
import nl.jolanrensen.docProcessor.defaultProcessors.ARG_DOC_PROCESSOR_LOG_NOT_FOUND
import nl.jolanrensen.docProcessor.gradle.creatingProcessDocTask
import org.gradle.jvm.tasks.Jar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jmailen.gradle.kotlinter.tasks.LintTask
import xyz.ronella.gradle.plugin.simple.git.task.GitTask

@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
plugins {
kotlin("jvm")
kotlin("libs.publisher")
kotlin("plugin.serialization")
kotlin("jupyter.api")

id("io.github.devcrocod.korro") version libs.versions.korro
id("org.jetbrains.dataframe.generator")
id("org.jetbrains.kotlinx.kover")
id("org.jmailen.kotlinter")
id("org.jetbrains.kotlinx.dataframe")
id("nl.jolanrensen.docProcessor")
id("xyz.ronella.simple-git")
with(libs.plugins) {
alias(kotlin.jvm)
alias(publisher)
alias(serialization)
alias(jupyter.api)
alias(korro)
alias(keywordGenerator)
alias(kover)
alias(kotlinter)
alias(docProcessor)
alias(simpleGit)

// dependence on our own plugin
alias(dataframe)

// only mandatory if `kotlin.dataframe.add.ksp=false` in gradle.properties
alias(ksp)
}
idea
}

Expand Down Expand Up @@ -221,6 +226,7 @@ idea {
// the target of processKdocMain and they are returned back to normal afterwards.
tasks.withType<Jar> {
dependsOn(processKDocsMain)
mustRunAfter(tasks.generateKeywordsSrc)
outputs.upToDateWhen { false }

doFirst {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import org.jetbrains.kotlinx.dataframe.api.filter
import org.jetbrains.kotlinx.dataframe.api.map
import org.jetbrains.kotlinx.dataframe.api.schema
import org.jetbrains.kotlinx.dataframe.api.take
import org.jetbrains.kotlinx.dataframe.api.type
import org.jetbrains.kotlinx.dataframe.columns.BaseColumn
import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup
import org.jetbrains.kotlinx.dataframe.columns.ColumnKind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CodeGenerationTests : DataFrameJupyterTest() {

private fun Code.checkCompilation() {
lines().forEach {
exec(it)
execRendered(it)
}
}

Expand Down
Loading