Skip to content

Commit 42d5f06

Browse files
committed
Merge branch 'master' into generateCode-docs-tests
2 parents ca2360c + a1d46b8 commit 42d5f06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1509
-446
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ kotlinPublications {
253253
fairDokkaJars = false
254254

255255
sonatypeSettings(
256-
project.findProperty("kds.sonatype.user") as String?,
257-
project.findProperty("kds.sonatype.password") as String?,
256+
project.findProperty("kds.sonatype.central.username") as String?,
257+
project.findProperty("kds.sonatype.central.password") as String?,
258258
"dataframe project, v. ${project.version}",
259259
)
260260

core/api/core.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,6 +3494,7 @@ public final class org/jetbrains/kotlinx/dataframe/api/NullsKt {
34943494
public static final fun fillNulls (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/api/Update;
34953495
public static final fun fillNulls (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lkotlin/reflect/KProperty;)Lorg/jetbrains/kotlinx/dataframe/api/Update;
34963496
public static final fun fillNulls (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lorg/jetbrains/kotlinx/dataframe/columns/ColumnReference;)Lorg/jetbrains/kotlinx/dataframe/api/Update;
3497+
public static final fun filterNotNull (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
34973498
}
34983499

34993500
public final class org/jetbrains/kotlinx/dataframe/api/ParseKt {

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/Nulls.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,15 @@ public fun <T> DataFrame<T>.dropNulls(whereAllNull: Boolean = false, columns: Co
964964
}
965965
}
966966

967+
@Refine
968+
@Interpretable("DropNulls0")
969+
@Deprecated(
970+
"DataFrame conventional name for filterNot* functions is drop*",
971+
ReplaceWith("dropNulls(columns = columns)"),
972+
DeprecationLevel.ERROR,
973+
)
974+
public fun <T> DataFrame<T>.filterNotNull(columns: ColumnsSelector<T, *>): DataFrame<T> = dropNulls(columns = columns)
975+
967976
/**
968977
* ## The Drop Nulls Operation
969978
*
@@ -1256,6 +1265,8 @@ public fun <T> DataFrame<T>.dropNA(vararg columns: AnyColumnReference, whereAllN
12561265
* If `true`, rows are dropped if all selected cells are [`NA`][org.jetbrains.kotlinx.dataframe.documentation.NA].
12571266
* If `false`, rows are dropped if any of the selected cells is [`NA`][org.jetbrains.kotlinx.dataframe.documentation.NA].
12581267
*/
1268+
@Refine
1269+
@Interpretable("DropNa1")
12591270
public fun <T> DataFrame<T>.dropNA(whereAllNA: Boolean = false): DataFrame<T> = dropNA(whereAllNA) { all() }
12601271

12611272
/**

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
444444
* - [Update per col][org.jetbrains.kotlinx.dataframe.api.Update.perCol] to provide a new value for every selected cell giving its column.
445445
* @param [expression] The [Row Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRowAndColumn.RowColumnExpression] to provide a new value for every selected cell giving its row and column.
446446
*/
447+
@Refine
447448
@Interpretable("UpdatePerRowCol")
448449
public inline fun <T, C> Update<T, C>.perRowCol(crossinline expression: RowColumnExpression<T, C, C>): DataFrame<T> =
449450
updateImpl { row, column, _ -> expression(row, column) }
@@ -529,6 +530,7 @@ public fun <T, C, R> Update<T, DataRow<C>>.asFrame(expression: DataFrameExpressi
529530
* @param [values] The [Map]<[String], Value> to provide a new value for every selected cell.
530531
* For each selected column, there must be a value in the map with the same name.
531532
*/
533+
@Refine
532534
@Interpretable("UpdatePerColMap")
533535
public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
534536
updateWithValuePerColumnImpl {
@@ -568,6 +570,7 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
568570
*
569571
* @param [values] The [DataRow] to provide a new value for every selected cell.
570572
*/
573+
@Refine
571574
@Interpretable("UpdatePerColRow")
572575
public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(values.toMap() as Map<String, C>)
573576

@@ -596,6 +599,7 @@ public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(val
596599
*
597600
* @param [valueSelector] The [Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenColumn.ColumnExpression] to provide a new value for every selected cell giving its column.
598601
*/
602+
@Refine
599603
@Interpretable("UpdatePerCol")
600604
public fun <T, C> Update<T, C>.perCol(valueSelector: ColumnExpression<C, C>): DataFrame<T> =
601605
updateWithValuePerColumnImpl(valueSelector)
@@ -650,6 +654,7 @@ public fun <T, C> Update<T, C?>.notNull(): Update<T, C> = where { it != null } a
650654
*
651655
* @param expression Optional [Row Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowExpression.WithExample] to update the rows with.
652656
*/
657+
@Refine
653658
@Interpretable("UpdateNotNull")
654659
public fun <T, C> Update<T, C?>.notNull(expression: UpdateExpression<T, C, C>): DataFrame<T> =
655660
notNull().with(expression)
@@ -787,6 +792,8 @@ public fun <T> DataFrame<T>.update(
787792
*
788793
*
789794
*/
795+
@Refine
796+
@Interpretable("UpdateWithNull")
790797
public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
791798

792799
/**
@@ -799,4 +806,6 @@ public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
799806
*
800807
*
801808
*/
809+
@Refine
810+
@Interpretable("UpdateWithZero")
802811
public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColumnImpl { 0 as C }

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ internal fun Instant.toLocalDate(zone: TimeZone = defaultTimeZone) = toLocalDate
725725

726726
internal fun Instant.toLocalTime(zone: TimeZone = defaultTimeZone) = toLocalDateTime(zone).time
727727

728-
internal val defaultTimeZone = TimeZone.currentSystemDefault()
728+
internal val defaultTimeZone get() = TimeZone.currentSystemDefault()
729729

730730
internal fun Number.toBigDecimal(): BigDecimal =
731731
when (this) {

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/Nulls.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,15 @@ public fun <T> DataFrame<T>.dropNulls(whereAllNull: Boolean = false, columns: Co
383383
}
384384
}
385385

386+
@Refine
387+
@Interpretable("DropNulls0")
388+
@Deprecated(
389+
"DataFrame conventional name for filterNot* functions is drop*",
390+
ReplaceWith("dropNulls(columns = columns)"),
391+
DeprecationLevel.ERROR,
392+
)
393+
public fun <T> DataFrame<T>.filterNotNull(columns: ColumnsSelector<T, *>): DataFrame<T> = dropNulls(columns = columns)
394+
386395
/**
387396
* @include [CommonDropNullsFunctionDoc]
388397
* This overload operates on all columns in the [DataFrame].
@@ -534,6 +543,8 @@ public fun <T> DataFrame<T>.dropNA(vararg columns: AnyColumnReference, whereAllN
534543
* This overload operates on all columns in the [DataFrame].
535544
* @include [DropNA.WhereAllNAParam]
536545
*/
546+
@Refine
547+
@Interpretable("DropNa1")
537548
public fun <T> DataFrame<T>.dropNA(whereAllNA: Boolean = false): DataFrame<T> = dropNA(whereAllNA) { all() }
538549

539550
/**

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
266266
* - {@include [SeeAlsoUpdatePerCol]}
267267
* @param [expression] The {@include [ExpressionsGivenRowAndColumn.RowColumnExpressionLink]} to provide a new value for every selected cell giving its row and column.
268268
*/
269+
@Refine
269270
@Interpretable("UpdatePerRowCol")
270271
public inline fun <T, C> Update<T, C>.perRowCol(crossinline expression: RowColumnExpression<T, C, C>): DataFrame<T> =
271272
updateImpl { row, column, _ -> expression(row, column) }
@@ -356,6 +357,7 @@ private interface CommonUpdatePerColMapDoc
356357
* @param [values] The [Map]<[String], Value> to provide a new value for every selected cell.
357358
* For each selected column, there must be a value in the map with the same name.
358359
*/
360+
@Refine
359361
@Interpretable("UpdatePerColMap")
360362
public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
361363
updateWithValuePerColumnImpl {
@@ -374,6 +376,7 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
374376
*
375377
* @param [values] The [DataRow] to provide a new value for every selected cell.
376378
*/
379+
@Refine
377380
@Interpretable("UpdatePerColRow")
378381
public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(values.toMap() as Map<String, C>)
379382

@@ -384,6 +387,7 @@ public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(val
384387
*
385388
* @param [valueSelector] The {@include [ExpressionsGivenColumn.ColumnExpressionLink]} to provide a new value for every selected cell giving its column.
386389
*/
390+
@Refine
387391
@Interpretable("UpdatePerCol")
388392
public fun <T, C> Update<T, C>.perCol(valueSelector: ColumnExpression<C, C>): DataFrame<T> =
389393
updateWithValuePerColumnImpl(valueSelector)
@@ -424,6 +428,7 @@ public fun <T, C> Update<T, C?>.notNull(): Update<T, C> = where { it != null } a
424428
* {@comment No brackets around `expression` because this doc is copied to [Update.notNull]}
425429
* @param expression Optional {@include [ExpressionsGivenRow.RowExpressionLink]} to update the rows with.
426430
*/
431+
@Refine
427432
@Interpretable("UpdateNotNull")
428433
public fun <T, C> Update<T, C?>.notNull(expression: UpdateExpression<T, C, C>): DataFrame<T> =
429434
notNull().with(expression)
@@ -509,6 +514,8 @@ private interface CommonSpecificWithDoc {
509514
* {@set [CommonSpecificWithDoc.FIRST] `null`}
510515
* {@set [CommonSpecificWithDoc.SECOND] [withNull][withNull]`()}
511516
*/
517+
@Refine
518+
@Interpretable("UpdateWithNull")
512519
public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
513520

514521
/**
@@ -517,4 +524,6 @@ public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
517524
* {@set [CommonSpecificWithDoc.FIRST] `0`}
518525
* {@set [CommonSpecificWithDoc.SECOND] [withZero][withZero]`()}
519526
*/
527+
@Refine
528+
@Interpretable("UpdateWithZero")
520529
public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColumnImpl { 0 as C }

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ internal fun Instant.toLocalDate(zone: TimeZone = defaultTimeZone) = toLocalDate
725725

726726
internal fun Instant.toLocalTime(zone: TimeZone = defaultTimeZone) = toLocalDateTime(zone).time
727727

728-
internal val defaultTimeZone = TimeZone.currentSystemDefault()
728+
internal val defaultTimeZone get() = TimeZone.currentSystemDefault()
729729

730730
internal fun Number.toBigDecimal(): BigDecimal =
731731
when (this) {

dataframe-jdbc/api/dataframe-jdbc.api

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
public final class org/jetbrains/kotlinx/dataframe/io/DbConnectionConfig {
2-
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
3-
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
2+
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
3+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
44
public final fun component1 ()Ljava/lang/String;
55
public final fun component2 ()Ljava/lang/String;
66
public final fun component3 ()Ljava/lang/String;
7-
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/io/DbConnectionConfig;
8-
public static synthetic fun copy$default (Lorg/jetbrains/kotlinx/dataframe/io/DbConnectionConfig;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/io/DbConnectionConfig;
7+
public final fun component4 ()Z
8+
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lorg/jetbrains/kotlinx/dataframe/io/DbConnectionConfig;
9+
public static synthetic fun copy$default (Lorg/jetbrains/kotlinx/dataframe/io/DbConnectionConfig;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/io/DbConnectionConfig;
910
public fun equals (Ljava/lang/Object;)Z
1011
public final fun getPassword ()Ljava/lang/String;
12+
public final fun getReadOnly ()Z
1113
public final fun getUrl ()Ljava/lang/String;
1214
public final fun getUser ()Ljava/lang/String;
1315
public fun hashCode ()I

0 commit comments

Comments
 (0)