From c8de3396d39d041bb313e8dfb94ecb7a4ad151e7 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Tue, 12 Nov 2024 17:22:52 +0100 Subject: [PATCH] bumping ktlint engine version to 1.4.1, disabled new when-entry-bracing rule as it was a bit too aggressive --- .editorconfig | 1 + build.gradle.kts | 2 +- core/api/core.api | 14 +++++++++++--- .../org/jetbrains/kotlinx/dataframe/math/mean.kt | 1 + .../jetbrains/kotlinx/dataframe/statistics/sum.kt | 2 -- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.editorconfig b/.editorconfig index cb28f789b2..be0f4587f3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -32,6 +32,7 @@ ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_e ktlint_standard_chain-method-continuation = disabled ktlint_ignore_back_ticked_identifier = true ktlint_standard_multiline-expression-wrapping = disabled +ktlint_standard_when-entry-bracing = disabled [{*/build/**/*,**/*keywords*/**,**/*.Generated.kt,**/*$Extensions.kt}] ktlint = disabled diff --git a/build.gradle.kts b/build.gradle.kts index 54209b4da9..bb0df363e4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -153,7 +153,7 @@ allprojects { afterEvaluate { try { configure { - version = "1.3.0" + version = "1.4.1" // rules are set up through .editorconfig } } catch (_: UnknownDomainObjectException) { diff --git a/core/api/core.api b/core/api/core.api index 0d9aa53c8e..9711065442 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -2691,7 +2691,7 @@ public abstract interface class org/jetbrains/kotlinx/dataframe/api/ColumnDescri public abstract fun getPath ()Lorg/jetbrains/kotlinx/dataframe/columns/ColumnPath; public abstract fun getStd ()D public abstract fun getTop ()Ljava/lang/Object; - public abstract fun getType ()Lkotlin/reflect/KType; + public abstract fun getType ()Ljava/lang/String; public abstract fun getUnique ()I } @@ -2719,7 +2719,7 @@ public final class org/jetbrains/kotlinx/dataframe/api/ColumnDescription_Extensi public static final fun ColumnDescription_top (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; public static final fun ColumnDescription_top (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Ljava/lang/Object; public static final fun ColumnDescription_type (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; - public static final fun ColumnDescription_type (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Lkotlin/reflect/KType; + public static final fun ColumnDescription_type (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Ljava/lang/String; public static final fun ColumnDescription_unique (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; public static final fun ColumnDescription_unique (Lorg/jetbrains/kotlinx/dataframe/DataRow;)I public static final fun NullableColumnDescription_count (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; @@ -2745,7 +2745,7 @@ public final class org/jetbrains/kotlinx/dataframe/api/ColumnDescription_Extensi public static final fun NullableColumnDescription_top (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; public static final fun NullableColumnDescription_top (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Ljava/lang/Object; public static final fun NullableColumnDescription_type (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; - public static final fun NullableColumnDescription_type (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Lkotlin/reflect/KType; + public static final fun NullableColumnDescription_type (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Ljava/lang/String; public static final fun NullableColumnDescription_unique (Lorg/jetbrains/kotlinx/dataframe/ColumnsContainer;)Lorg/jetbrains/kotlinx/dataframe/DataColumn; public static final fun NullableColumnDescription_unique (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Ljava/lang/Integer; } @@ -4146,9 +4146,11 @@ public final class org/jetbrains/kotlinx/dataframe/api/DataColumnArithmeticsKt { } public final class org/jetbrains/kotlinx/dataframe/api/DataColumnTypeKt { + public static final fun isBigNumber (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z public static final fun isColumnGroup (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z public static final fun isComparable (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z public static final fun isFrameColumn (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z + public static final fun isInterComparable (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z public static final fun isList (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z public static final fun isNumber (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z public static final fun isPrimitive (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z @@ -10771,6 +10773,7 @@ public final class org/jetbrains/kotlinx/dataframe/math/BasicStats { public final class org/jetbrains/kotlinx/dataframe/math/MeanKt { public static final fun bigDecimalMean (Ljava/lang/Iterable;)D + public static final fun bigIntegerMean (Ljava/lang/Iterable;)D public static final fun byteMean (Ljava/lang/Iterable;)D public static final fun doubleMean (Ljava/lang/Iterable;Z)D public static synthetic fun doubleMean$default (Ljava/lang/Iterable;ZILjava/lang/Object;)D @@ -10794,6 +10797,8 @@ public final class org/jetbrains/kotlinx/dataframe/math/MedianKt { public final class org/jetbrains/kotlinx/dataframe/math/StdKt { public static final fun bigDecimalStd (Ljava/lang/Iterable;I)D public static synthetic fun bigDecimalStd$default (Ljava/lang/Iterable;IILjava/lang/Object;)D + public static final fun bigIntegerStd (Ljava/lang/Iterable;I)D + public static synthetic fun bigIntegerStd$default (Ljava/lang/Iterable;IILjava/lang/Object;)D public static final fun doubleStd (Ljava/lang/Iterable;ZI)D public static synthetic fun doubleStd$default (Ljava/lang/Iterable;ZIILjava/lang/Object;)D public static final fun floatStd (Ljava/lang/Iterable;ZI)D @@ -10808,6 +10813,7 @@ public final class org/jetbrains/kotlinx/dataframe/math/StdKt { public final class org/jetbrains/kotlinx/dataframe/math/StdMeanKt { public static final fun bigDecimalVarianceAndMean (Ljava/lang/Iterable;)Lorg/jetbrains/kotlinx/dataframe/math/BasicStats; + public static final fun bigIntegerVarianceAndMean (Ljava/lang/Iterable;)Lorg/jetbrains/kotlinx/dataframe/math/BasicStats; public static final fun doubleVarianceAndMean (Ljava/lang/Iterable;Z)Lorg/jetbrains/kotlinx/dataframe/math/BasicStats; public static synthetic fun doubleVarianceAndMean$default (Ljava/lang/Iterable;ZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/math/BasicStats; public static final fun floatVarianceAndMean (Ljava/lang/Iterable;Z)Lorg/jetbrains/kotlinx/dataframe/math/BasicStats; @@ -10818,8 +10824,10 @@ public final class org/jetbrains/kotlinx/dataframe/math/StdMeanKt { public final class org/jetbrains/kotlinx/dataframe/math/SumKt { public static final fun sum (Ljava/lang/Iterable;)Ljava/math/BigDecimal; + public static final fun sum (Ljava/lang/Iterable;)Ljava/math/BigInteger; public static final fun sum (Ljava/lang/Iterable;Lkotlin/reflect/KType;)Ljava/lang/Number; public static final fun sum (Lkotlin/sequences/Sequence;)Ljava/math/BigDecimal; + public static final fun sum (Lkotlin/sequences/Sequence;)Ljava/math/BigInteger; public static final fun sumNullableT (Ljava/lang/Iterable;Lkotlin/reflect/KType;)Ljava/lang/Number; public static final fun sumOf (Ljava/lang/Iterable;Lkotlin/reflect/KType;Lkotlin/jvm/functions/Function1;)Ljava/lang/Number; } diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/math/mean.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/math/mean.kt index d4deec31a1..40fe9bbce1 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/math/mean.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/math/mean.kt @@ -11,6 +11,7 @@ import kotlin.reflect.full.withNullability internal fun Iterable.mean(type: KType, skipNA: Boolean = skipNA_default): Double = asSequence().mean(type, skipNA) +@Suppress("UNCHECKED_CAST") internal fun Sequence.mean(type: KType, skipNA: Boolean = skipNA_default): Double { if (type.isMarkedNullable) { return filterNotNull().mean(type.withNullability(false), skipNA) diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/statistics/sum.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/statistics/sum.kt index 5675590abf..b93d8ab705 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/statistics/sum.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/statistics/sum.kt @@ -61,6 +61,4 @@ class SumTests { df.sum { value2 } shouldBe expected2 df.sum { value3 } shouldBe expected3 } - - }