Skip to content

Kotlin 2.1 and fixes :plugins:expressions-converter #997

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(kotlin.jvm)
alias(publisher)
alias(serialization) apply false
alias(dokka)
alias(kover)
alias(ktlint)
alias(korro) apply false
Expand All @@ -41,7 +40,7 @@ repositories {
mavenLocal()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
maven(jupyterApiTCRepo)
if (jupyterApiTCRepo.isNotBlank()) maven(jupyterApiTCRepo)
}

configurations {
Expand Down Expand Up @@ -154,6 +153,8 @@ val modulesUsingJava11 = with(projects) {
dataframeJupyter,
dataframeGeo,
examples.ideaExamples.titanic,
plugins.symbolProcessor,
plugins.dataframeGradlePlugin,
)
}.map { it.path }

Expand Down
4 changes: 0 additions & 4 deletions core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -6481,8 +6481,6 @@ public final class org/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords : j
public static final field EXTERNAL Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field FINAL Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field FUN Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field HEADER Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field IMPL Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field IN Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field INFIX Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
public static final field INLINE Lorg/jetbrains/kotlinx/dataframe/keywords/ModifierKeywords;
Expand Down Expand Up @@ -6536,8 +6534,6 @@ public final class org/jetbrains/kotlinx/dataframe/keywords/SoftKeywords : java/
public static final field FINAL Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field FINALLY Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field GET Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field HEADER Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field IMPL Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field IMPORT Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field INFIX Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
public static final field INIT Lorg/jetbrains/kotlinx/dataframe/keywords/SoftKeywords;
Expand Down
20 changes: 5 additions & 15 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ tasks.withType<KspTask> {
}
}

val clearTestResults by tasks.creating(Delete::class) {
val clearTestResults by tasks.registering(Delete::class) {
delete(layout.buildDirectory.dir("dataframes"))
delete(layout.buildDirectory.dir("korroOutputLines"))
}
Expand Down Expand Up @@ -140,7 +140,7 @@ val samplesTest = tasks.register<Test>("samplesTest") {
sourceSets["main"].runtimeClasspath
}

val clearSamplesOutputs by tasks.creating {
val clearSamplesOutputs by tasks.registering {
group = "documentation"

doFirst {
Expand All @@ -152,7 +152,7 @@ val clearSamplesOutputs by tasks.creating {
}
}

val addSamplesToGit by tasks.creating(GitTask::class) {
val addSamplesToGit by tasks.registering(GitTask::class) {
directory = file(".")
command = "add"
args = listOf("-A", "../docs/StardustDocs/snippets")
Expand All @@ -167,7 +167,7 @@ val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
classpath = sourceSets.test.get().runtimeClasspath

doLast {
addSamplesToGit.executeCommand()
addSamplesToGit.get().executeCommand()
}
}

Expand Down Expand Up @@ -240,7 +240,7 @@ idea {
// If `changeJarTask` is run, modify all Jar tasks such that before running the Kotlin sources are set to
// the target of `processKdocMain`, and they are returned to normal afterward.
// This is usually only done when publishing
val changeJarTask by tasks.creating {
val changeJarTask by tasks.registering {
outputs.upToDateWhen { project.hasProperty("skipKodex") }
doFirst {
tasks.withType<Jar> {
Expand Down Expand Up @@ -282,16 +282,6 @@ idea {
}
}

// 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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package org.jetbrains.kotlinx.dataframe.exceptions

public class ColumnNotFoundException(public val columnName: String, public override val message: String) :
RuntimeException()
RuntimeException(),
DataFrameException
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.jetbrains.kotlinx.dataframe.exceptions

public class DuplicateColumnNamesException(public val allColumnNames: List<String>) : IllegalArgumentException() {
public class DuplicateColumnNamesException(public val allColumnNames: List<String>) :
IllegalArgumentException(),
DataFrameException {

public val duplicatedNames: List<String> = allColumnNames
.groupBy { it }
Expand Down
2 changes: 1 addition & 1 deletion dataframe-csv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ tasks.named("runKtlintCheckOverGeneratedSourcesSourceSet") {
// If `changeJarTask` is run, modify all Jar tasks such that before running the Kotlin sources are set to
// the target of `processKdocMain`, and they are returned to normal afterward.
// This is usually only done when publishing
val changeJarTask by tasks.creating {
val changeJarTask by tasks.registering {
outputs.upToDateWhen { false }
doFirst {
tasks.withType<Jar> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ internal object DelimParams {
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
*/
const val HAS_FIXED_WIDTH_COLUMNS: Boolean = false
Expand Down Expand Up @@ -163,7 +163,7 @@ internal object DelimParams {
const val IGNORE_EMPTY_LINES: Boolean = false

/**
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
*/
Expand Down Expand Up @@ -201,7 +201,7 @@ internal object DelimParams {
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
*/
const val PARSE_PARALLEL: Boolean = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import kotlin.time.Duration
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand All @@ -102,7 +102,7 @@ import kotlin.time.Duration
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -120,7 +120,7 @@ import kotlin.time.Duration
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
* @param compression The compression of the data.
* Default: [Compression.None], unless detected otherwise from the input file or url.
* @param adjustCsvSpecs Optional extra [CsvSpecs] configuration. Default: `{ it }`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import kotlin.io.path.inputStream
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand Down Expand Up @@ -119,7 +119,7 @@ import kotlin.io.path.inputStream
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -137,7 +137,7 @@ import kotlin.io.path.inputStream
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
*/
public fun DataFrame.Companion.readCsv(
path: Path,
Expand Down Expand Up @@ -234,7 +234,7 @@ public fun DataFrame.Companion.readCsv(
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand Down Expand Up @@ -271,7 +271,7 @@ public fun DataFrame.Companion.readCsv(
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -289,7 +289,7 @@ public fun DataFrame.Companion.readCsv(
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
*/
public fun DataFrame.Companion.readCsv(
file: File,
Expand Down Expand Up @@ -386,7 +386,7 @@ public fun DataFrame.Companion.readCsv(
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand Down Expand Up @@ -423,7 +423,7 @@ public fun DataFrame.Companion.readCsv(
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -441,7 +441,7 @@ public fun DataFrame.Companion.readCsv(
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
*/
public fun DataFrame.Companion.readCsv(
url: URL,
Expand Down Expand Up @@ -538,7 +538,7 @@ public fun DataFrame.Companion.readCsv(
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand Down Expand Up @@ -575,7 +575,7 @@ public fun DataFrame.Companion.readCsv(
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -593,7 +593,7 @@ public fun DataFrame.Companion.readCsv(
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
*/
public fun DataFrame.Companion.readCsv(
fileOrUrl: String,
Expand Down Expand Up @@ -690,7 +690,7 @@ public fun DataFrame.Companion.readCsv(
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand Down Expand Up @@ -727,7 +727,7 @@ public fun DataFrame.Companion.readCsv(
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -745,7 +745,7 @@ public fun DataFrame.Companion.readCsv(
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
* @param adjustCsvSpecs Optional extra [CsvSpecs] configuration. Default: `{ it }`.
*
* Before instantiating the [CsvSpecs], the [CsvSpecs.Builder] will be passed to this lambda.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import org.jetbrains.kotlinx.dataframe.impl.io.readDelimImpl
*
* Fixed-width columns can occur, for instance, in multi-space delimited data, where the columns are separated
* by multiple spaces instead of a single delimiter, so columns are visually aligned.
* Columns widths are determined by the header in the data (if present), or manually by setting
* Column widths are determined by the header in the data (if present), or manually by setting
* [fixedColumnWidths].
* @param fixedColumnWidths The fixed column widths. Default: empty list.
*
Expand Down Expand Up @@ -107,7 +107,7 @@ import org.jetbrains.kotlinx.dataframe.impl.io.readDelimImpl
* @param ignoreEmptyLines Whether to skip intermediate empty lines. Default: `false`.
*
* If `false`, empty lines will be interpreted as having _empty_ values if [allowMissingColumns].
* @param allowMissingColumns Wether to allow rows with fewer columns than the header. Default: `true`.
* @param allowMissingColumns Whether to allow rows with fewer columns than the header. Default: `true`.
*
* If `true`, rows that are too short will be interpreted as _empty_ values.
* @param ignoreExcessColumns Whether to ignore rows with more columns than the header. Default: `true`.
Expand All @@ -125,7 +125,7 @@ import org.jetbrains.kotlinx.dataframe.impl.io.readDelimImpl
* @param parseParallel Whether to parse the data in parallel. Default: `true`.
*
* If `true`, the data will be read and parsed in parallel by the Deephaven parser.
* This is usually faster, but can be turned off for debugging.
* This is usually faster but can be turned off for debugging.
*/
public fun DataFrame.Companion.readCsvStr(
text: String,
Expand Down
Loading