Skip to content

Commit

Permalink
Automated commit of generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 29, 2024
1 parent b83cbfc commit 99d4d00
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnPath
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
import org.jetbrains.kotlinx.dataframe.impl.columns.TransformableColumnSet
import org.jetbrains.kotlinx.dataframe.util.COL_ENDS_WITH
import org.jetbrains.kotlinx.dataframe.util.COL_ENDS_WITH_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_STARTS_WITH
import org.jetbrains.kotlinx.dataframe.util.COL_STARTS_WITH_REPLACE
import org.jetbrains.kotlinx.dataframe.util.ENDS_WITH
import org.jetbrains.kotlinx.dataframe.util.ENDS_WITH_REPLACE
import org.jetbrains.kotlinx.dataframe.util.STARTS_WITH
import org.jetbrains.kotlinx.dataframe.util.STARTS_WITH_REPLACE
import kotlin.reflect.KProperty

// region ColumnsSelectionDsl
Expand Down Expand Up @@ -606,17 +614,6 @@ public interface ColumnNameFiltersColumnsSelectionDsl {

// region nameStartsWith

@Deprecated("Use nameStartsWith instead", ReplaceWith("this.nameStartsWith(prefix)"))
public fun <C> ColumnSet<C>.startsWith(prefix: CharSequence): TransformableColumnSet<C> = nameStartsWith(prefix)

@Deprecated("Use nameStartsWith instead", ReplaceWith("this.nameStartsWith(prefix)"))
public fun ColumnsSelectionDsl<*>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
nameStartsWith(prefix)

@Deprecated("Use colsNameStartsWith instead", ReplaceWith("this.colsNameStartsWith(prefix)"))
public fun SingleColumn<DataRow<*>>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
colsNameStartsWith(prefix)

/**
* ## (Cols) Name Starts With
* Returns a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns from [this]
Expand Down Expand Up @@ -850,18 +847,6 @@ public interface ColumnNameFiltersColumnsSelectionDsl {

// region nameEndsWith

@Deprecated("Use nameEndsWith instead", ReplaceWith("this.nameEndsWith(suffix)"))
@Suppress("UNCHECKED_CAST")
public fun <C> ColumnSet<C>.endsWith(suffix: CharSequence): TransformableColumnSet<C> =
colsInternal { it.name.endsWith(suffix) } as TransformableColumnSet<C>

@Deprecated("Use nameEndsWith instead", ReplaceWith("this.nameEndsWith(suffix)"))
public fun ColumnsSelectionDsl<*>.endsWith(suffix: CharSequence): TransformableColumnSet<*> = nameEndsWith(suffix)

@Deprecated("Use colsNameEndsWith instead", ReplaceWith("this.colsNameEndsWith(suffix)"))
public fun SingleColumn<DataRow<*>>.endsWith(suffix: CharSequence): TransformableColumnSet<*> =
this.ensureIsColumnGroup().colsInternal { it.name.endsWith(suffix) }

/**
* ## (Cols) Name Ends With
* Returns a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns from [this]
Expand Down Expand Up @@ -1090,6 +1075,57 @@ public interface ColumnNameFiltersColumnsSelectionDsl {
): TransformableColumnSet<*> = columnGroup(this).colsNameEndsWith(suffix, ignoreCase)

// endregion

// region deprecations

@Deprecated(
message = STARTS_WITH,
replaceWith = ReplaceWith(STARTS_WITH_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun <C> ColumnSet<C>.startsWith(prefix: CharSequence): TransformableColumnSet<C> = nameStartsWith(prefix)

@Deprecated(
message = STARTS_WITH,
replaceWith = ReplaceWith(STARTS_WITH_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun ColumnsSelectionDsl<*>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
nameStartsWith(prefix)

@Deprecated(
message = COL_STARTS_WITH,
replaceWith = ReplaceWith(COL_STARTS_WITH_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
colsNameStartsWith(prefix)

@Deprecated(
message = ENDS_WITH,
replaceWith = ReplaceWith(ENDS_WITH_REPLACE),
level = DeprecationLevel.ERROR,
)
@Suppress("UNCHECKED_CAST")
public fun <C> ColumnSet<C>.endsWith(suffix: CharSequence): TransformableColumnSet<C> =
colsInternal { it.name.endsWith(suffix) } as TransformableColumnSet<C>

@Deprecated(
message = ENDS_WITH,
replaceWith = ReplaceWith(ENDS_WITH_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun ColumnsSelectionDsl<*>.endsWith(suffix: CharSequence): TransformableColumnSet<*> = nameEndsWith(suffix)

@Deprecated(
message = COL_ENDS_WITH,
replaceWith = ReplaceWith(COL_ENDS_WITH_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.endsWith(suffix: CharSequence): TransformableColumnSet<*> =
this.ensureIsColumnGroup().colsInternal { it.name.endsWith(suffix) }

// endregion
}

// endregion
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ package org.jetbrains.kotlinx.dataframe.util
* Level.ERROR -> Remove
*/

// region WARNING in 0.14, ERROR in 0.15

private const val MESSAGE_0_15 = "Will be ERROR in 0.15."

internal const val STARTS_WITH = "Use nameStartsWith() instead. $MESSAGE_0_15"
internal const val STARTS_WITH_REPLACE = "this.nameStartsWith(prefix)"

internal const val COL_STARTS_WITH = "Use colsNameStartsWith() instead. $MESSAGE_0_15"
internal const val COL_STARTS_WITH_REPLACE = "this.colsNameStartsWith(prefix)"

internal const val ENDS_WITH = "Use nameEndsWith() instead. $MESSAGE_0_15"
internal const val ENDS_WITH_REPLACE = "this.nameEndsWith(suffix)"

internal const val COL_ENDS_WITH = "Use colsNameEndsWith() instead. $MESSAGE_0_15"
internal const val COL_ENDS_WITH_REPLACE = "this.colsNameEndsWith(suffix)"

// region WARNING in 0.15, ERROR in 0.16

private const val MESSAGE_0_16 = "Will be ERROR in 0.16."
Expand Down

0 comments on commit 99d4d00

Please sign in to comment.