From 2dc428ceb373bb5d5432da92699453f9deed27a1 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Fri, 17 Jan 2025 16:05:23 +0100 Subject: [PATCH 1/4] simplified DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate by using @get defaults instead of @set+@get --- .../DslGrammarTemplateColumnsSelectionDsl.kt | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt index f5cb8f1d2f..168ae0b933 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt @@ -4,15 +4,10 @@ import org.jetbrains.kotlinx.dataframe.ColumnFilter import org.jetbrains.kotlinx.dataframe.ColumnSelector import org.jetbrains.kotlinx.dataframe.ColumnsSelector import org.jetbrains.kotlinx.dataframe.DataRow -import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDslLink import org.jetbrains.kotlinx.dataframe.columns.ColumnKind import org.jetbrains.kotlinx.dataframe.columns.ColumnSet import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver -import org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ColumnGroupRef -import org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate.ColumnSetRef -import org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.UsageTemplateExample.ColumnGroupName -import org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.UsageTemplateExample.ColumnSetName /* * This template is to be used in displaying the Usage / DSL grammar @@ -26,21 +21,21 @@ public interface DslGrammarTemplateColumnsSelectionDsl { /** * {@include [LineBreak]} * {@include [DslGrammarLink]} - * {@set [DslGrammarTemplate.DefinitionsPart] + * {@get [DslGrammarTemplate.DefinitionsPart] * {@include [LineBreak]} * ### Definitions: * {@get [DslGrammarTemplate.DefinitionsArg]} - * }{@get [DslGrammarTemplate.DefinitionsPart]} + * } * {@comment -------------------------------------------------------------------------------------------- } - * {@set [DslGrammarTemplate.PlainDslPart] + * {@get [DslGrammarTemplate.PlainDslPart] * {@include [LineBreak]} * ### What can be called directly in the {@include [ColumnsSelectionDslLink]}: * * {@include [LineBreak]} * {@get [DslGrammarTemplate.PlainDslFunctionsArg]} - * }{@get [DslGrammarTemplate.PlainDslPart]} + * } * {@comment -------------------------------------------------------------------------------------------- } - * {@set [DslGrammarTemplate.ColumnSetPart] + * {@get [DslGrammarTemplate.ColumnSetPart] * {@include [LineBreak]} * ### What can be called on a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet]: * @@ -48,9 +43,9 @@ public interface DslGrammarTemplateColumnsSelectionDsl { * {@include [ColumnSetRef]} * * {@get [DslGrammarTemplate.ColumnSetFunctionsArg]} - * }{@get [DslGrammarTemplate.ColumnSetPart]} + * } * {@comment -------------------------------------------------------------------------------------------- } - * {@set [DslGrammarTemplate.ColumnGroupPart] + * {@get [DslGrammarTemplate.ColumnGroupPart] * {@include [LineBreak]} * ### What can be called on a [Column Group (reference)][DslGrammarTemplate.ColumnGroupDef]: * @@ -58,13 +53,7 @@ public interface DslGrammarTemplateColumnsSelectionDsl { * {@include [ColumnGroupRef]} * * {@get [DslGrammarTemplate.ColumnGroupFunctionsArg]} - * }{@get [DslGrammarTemplate.ColumnGroupPart]} - * {@comment -------------------------------------------------------------------------------------------- } - * {@comment Setting default arguments for the template} - * {@set [DslGrammarTemplate.DefinitionsArg]} - * {@set [DslGrammarTemplate.PlainDslFunctionsArg]} - * {@set [DslGrammarTemplate.ColumnSetFunctionsArg]} - * {@set [DslGrammarTemplate.ColumnGroupFunctionsArg]} + * } */ public interface DslGrammarTemplate { From 48ce54d736e3b8c46ec7607d397e10baf25b5de6 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Fri, 17 Jan 2025 16:16:29 +0100 Subject: [PATCH 2/4] set KoDEx version to 0.4.2 and updated gradle files --- core/build.gradle.kts | 12 ++++-------- dataframe-csv/build.gradle.kts | 12 ++++-------- gradle/libs.versions.toml | 2 +- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index c9fc84e03c..9e9ebc9aad 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,8 +1,7 @@ import com.google.devtools.ksp.gradle.KspTask import com.google.devtools.ksp.gradle.KspTaskJvm import io.github.devcrocod.korro.KorroTask -import nl.jolanrensen.kodex.defaultProcessors.ARG_DOC_PROCESSOR_LOG_NOT_FOUND -import nl.jolanrensen.kodex.gradle.creatingProcessDocTask +import nl.jolanrensen.kodex.gradle.creatingRunKodexTask import org.gradle.jvm.tasks.Jar import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import xyz.ronella.gradle.plugin.simple.git.task.GitTask @@ -207,9 +206,9 @@ val generatedSources by kotlin.sourceSets.creating { } // Task to generate the processed documentation -val processKDocsMain by creatingProcessDocTask(processKDocsMainSources) { +val processKDocsMain by creatingRunKodexTask(processKDocsMainSources) { + group = "KDocs" target = file(generatedSourcesFolderName) - arguments += ARG_DOC_PROCESSOR_LOG_NOT_FOUND to false // false, so `runKtlintFormatOverGeneratedSourcesSourceSet` can format the output outputReadOnly = false @@ -217,10 +216,7 @@ val processKDocsMain by creatingProcessDocTask(processKDocsMainSources) { exportAsHtml { dir = file("../docs/StardustDocs/snippets/kdocs") } - task { - group = "KDocs" - finalizedBy("runKtlintFormatOverGeneratedSourcesSourceSet") - } + finalizedBy("runKtlintFormatOverGeneratedSourcesSourceSet") } tasks.named("ktlintGeneratedSourcesSourceSetCheck") { diff --git a/dataframe-csv/build.gradle.kts b/dataframe-csv/build.gradle.kts index 7c7a929bdc..70367d0245 100644 --- a/dataframe-csv/build.gradle.kts +++ b/dataframe-csv/build.gradle.kts @@ -1,5 +1,4 @@ -import nl.jolanrensen.kodex.defaultProcessors.ARG_DOC_PROCESSOR_LOG_NOT_FOUND -import nl.jolanrensen.kodex.gradle.creatingProcessDocTask +import nl.jolanrensen.kodex.gradle.creatingRunKodexTask import org.gradle.jvm.tasks.Jar plugins { @@ -85,9 +84,9 @@ val generatedSources by kotlin.sourceSets.creating { } // Task to generate the processed documentation -val processKDocsMain by creatingProcessDocTask(processKDocsMainSources) { +val processKDocsMain by creatingRunKodexTask(processKDocsMainSources) { + group = "KDocs" target = file(generatedSourcesFolderName) - arguments += ARG_DOC_PROCESSOR_LOG_NOT_FOUND to false // false, so `runKtlintFormatOverGeneratedSourcesSourceSet` can format the output outputReadOnly = false @@ -95,10 +94,7 @@ val processKDocsMain by creatingProcessDocTask(processKDocsMainSources) { exportAsHtml { dir = file("../docs/StardustDocs/snippets/kdocs") } - task { - group = "KDocs" - finalizedBy("runKtlintFormatOverGeneratedSourcesSourceSet") - } + finalizedBy("runKtlintFormatOverGeneratedSourcesSourceSet") } tasks.named("ktlintGeneratedSourcesSourceSetCheck") { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f2c0290289..7923a0c8e2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,7 +46,7 @@ kotestAsserions = "5.5.4" jsoup = "1.18.3" arrow = "18.1.0" -kodex = "0.4.0" +kodex = "0.4.2" simpleGit = "2.0.3" # Can't be updated to 2.1.0+ due to Java 8 compatibility dependencyVersions = "0.51.0" plugin-publish = "1.3.0" From 842cdec550aab29bcb8a35ca823ce18d8484a9b2 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Fri, 17 Jan 2025 16:18:43 +0100 Subject: [PATCH 3/4] fixed changed reference behavior in KoDEx --- .../main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt index 114a386ae9..be33f4259b 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt @@ -71,10 +71,10 @@ public class Update( * {@get [UpdateOperationArg]}**` { `**[`columns`][SelectingColumns]**` }`** * * {@include [Indent]} - * `[ `__`.`__[**`where`**][Update.where]**` { `**[`rowValueCondition`][SelectingRows.RowValueCondition.WithExample]**` } `**`]` + * `\[ `__`.`__[**`where`**][Update.where]**` { `**[`rowValueCondition`][SelectingRows.RowValueCondition.WithExample]**` } `**`]` * * {@include [Indent]} - * `[ `__`.`__[**`at`**][Update.at]**`(`**[`rowIndices`][CommonUpdateAtFunctionDoc.RowIndicesParam]**`)`**` ]` + * `\[ `__`.`__[**`at`**][Update.at]**`(`**[`rowIndices`][CommonUpdateAtFunctionDoc.RowIndicesParam]**`)`**` ]` * * {@include [Indent]} * __`.`__[**`with`**][Update.with]**` { `**[`rowExpression`][ExpressionsGivenRow.RowValueExpression.WithExample]**` }`** From 91d927c69a92245b29859da70336d58f6b511dae Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Fri, 17 Jan 2025 16:32:55 +0100 Subject: [PATCH 4/4] Excluding DslGrammarTemplateColumnsSelectionDsl from sources --- .../documentation/DslGrammarTemplateColumnsSelectionDsl.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt index 168ae0b933..150644cde9 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DslGrammarTemplateColumnsSelectionDsl.kt @@ -1,3 +1,5 @@ +@file:ExcludeFromSources + package org.jetbrains.kotlinx.dataframe.documentation import org.jetbrains.kotlinx.dataframe.ColumnFilter