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
@@ -19,7 +19,6 @@ plugins {
alias(kotlin.jvm)
alias(publisher)
alias(serialization) apply false
alias(dokka)
alias(kover)
alias(ktlint)
alias(korro) apply false
@@ -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 {
@@ -154,6 +153,8 @@ val modulesUsingJava11 = with(projects) {
dataframeJupyter,
dataframeGeo,
examples.ideaExamples.titanic,
plugins.symbolProcessor,
plugins.dataframeGradlePlugin,
)
}.map { it.path }

4 changes: 0 additions & 4 deletions core/api/core.api
Original file line number Diff line number Diff line change
@@ -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;
@@ -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;
20 changes: 5 additions & 15 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"))
}
@@ -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 {
@@ -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")
@@ -167,7 +167,7 @@ val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
classpath = sourceSets.test.get().runtimeClasspath

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

@@ -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> {
@@ -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 {
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 }
2 changes: 1 addition & 1 deletion dataframe-csv/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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> {
Original file line number Diff line number Diff line change
@@ -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
@@ -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.
*/
@@ -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

Original file line number Diff line number Diff line change
@@ -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.
*
@@ -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`.
@@ -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 }`.
Original file line number Diff line number Diff line change
@@ -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.
*
@@ -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`.
@@ -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,
@@ -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.
*
@@ -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`.
@@ -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,
@@ -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.
*
@@ -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`.
@@ -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,
@@ -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.
*
@@ -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`.
@@ -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,
@@ -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.
*
@@ -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`.
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
*
@@ -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`.
@@ -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,
Loading