Skip to content

Commit

Permalink
Merge pull request #877 from Kotlin/0.14-post-release
Browse files Browse the repository at this point in the history
0.14 post release Part 2
  • Loading branch information
Jolanrensen authored Sep 25, 2024
2 parents 096a86a + 13404d2 commit da17b1f
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 517 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ Here's a [compiler plugin demo project](https://github.com/koperagen/df-plugin-d
## Setup

```kotlin
implementation("org.jetbrains.kotlinx:dataframe:0.14.0")
implementation("org.jetbrains.kotlinx:dataframe:0.14.1")
```

Optional Gradle plugin for enhanced type safety and schema generation
https://kotlin.github.io/dataframe/schemasgradle.html
```kotlin
id("org.jetbrains.kotlinx.dataframe") version "0.14.0"
id("org.jetbrains.kotlinx.dataframe") version "0.14.1"
```

Check out the [custom setup page](https://kotlin.github.io/dataframe/gettingstartedgradleadvanced.html) if you don't need some of the formats as dependencies,
Expand All @@ -77,7 +77,7 @@ df.filter { "stargazers_count"<Int>() > 50 }.print()

Requires Gradle plugin to work
```kotlin
id("org.jetbrains.kotlinx.dataframe") version "0.14.0"
id("org.jetbrains.kotlinx.dataframe") version "0.14.1"
```

Plugin generates extension properties API for provided sample of data. Column names and their types become discoverable in completion.
Expand Down Expand Up @@ -228,7 +228,7 @@ This table shows the mapping between main library component versions and minimum
| 0.12.0 | 8 | 1.9.0 | 0.11.0-358 | 3.0.0 | 11.0.0 |
| 0.12.1 | 8 | 1.9.0 | 0.11.0-358 | 3.0.0 | 11.0.0 |
| 0.13.1 | 8 | 1.9.22 | 0.12.0-139 | 3.0.0 | 15.0.0 |
| 0.14.0 | 8 | 2.0.20 | 0.12.0-139 | 3.0.0 | 17.0.0 |
| 0.14.1 | 8 | 2.0.20 | 0.12.0-139 | 3.0.0 | 17.0.0 |

## Code of Conduct

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package org.jetbrains.kotlinx.dataframe.api

import org.jetbrains.kotlinx.dataframe.ColumnsSelector
import org.jetbrains.kotlinx.dataframe.DataColumn
import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.DataRow
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.DslGrammar.ColumnGroupPartOfGrammar
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.DslGrammar.ColumnSetPartOfGrammar
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.DslGrammar.DefinitionsPartOfGrammar
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.DslGrammar.PlainDslPartOfGrammar
import org.jetbrains.kotlinx.dataframe.columns.ColumnPath
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
Expand All @@ -16,9 +19,6 @@ import org.jetbrains.kotlinx.dataframe.documentation.Indent
import org.jetbrains.kotlinx.dataframe.documentation.LineBreak
import org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns
import org.jetbrains.kotlinx.dataframe.impl.DataFrameReceiver
import org.jetbrains.kotlinx.dataframe.impl.columns.ColumnsList
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_LIST_DATACOLUMN_GET
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_LIST_DATACOLUMN_GET_REPLACE
import kotlin.reflect.KProperty

/** [Columns Selection DSL][ColumnsSelectionDsl] */
Expand Down Expand Up @@ -380,22 +380,6 @@ public interface ColumnsSelectionDsl<out T> : // SingleColumn<DataRow<T>>
public operator fun <C> ColumnsSelector<T, C>.invoke(): ColumnsResolver<C> =
this@invoke(this@ColumnsSelectionDsl, this@ColumnsSelectionDsl)

/**
* ## Deprecated: Columns by Index Range from List of Columns
* Helper function to create a [ColumnSet] from a list of columns by specifying a range of indices.
*
* ### Deprecated
*
* Deprecated because it's too niche. Let us know if you have a good use for it!
*/
@Deprecated(
message = COL_SELECT_DSL_LIST_DATACOLUMN_GET,
replaceWith = ReplaceWith(COL_SELECT_DSL_LIST_DATACOLUMN_GET_REPLACE),
level = DeprecationLevel.ERROR,
)
public operator fun <C> List<DataColumn<C>>.get(range: IntRange): ColumnSet<C> =
ColumnsList(subList(range.first, range.last + 1))

// region select
// NOTE: due to invoke conflicts these cannot be moved out of the interface

Expand Down
134 changes: 0 additions & 134 deletions core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,6 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.addPath
import org.jetbrains.kotlinx.dataframe.impl.columns.onResolve
import org.jetbrains.kotlinx.dataframe.impl.columns.transform
import org.jetbrains.kotlinx.dataframe.impl.owner
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_AFTER
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_AFTER_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_BEFORE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_BEFORE_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_FROM
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_FROM_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_UP_TO
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_COLS_UP_TO_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_FROM
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_FROM_REPLACE
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_UP_TO
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_ALL_UP_TO_REPLACE
import kotlin.reflect.KProperty

// region DataColumn
Expand Down Expand Up @@ -1187,126 +1173,6 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnPath.allColsUpTo(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

// endregion

// region deprecated

@Deprecated(
COL_SELECT_DSL_ALL_COLS,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.all(): TransformableColumnSet<*> = allCols()

@Deprecated(
COL_SELECT_DSL_ALL_COLS,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun String.all(): TransformableColumnSet<*> = allCols()

@Deprecated(
COL_SELECT_DSL_ALL_COLS_AFTER,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_AFTER_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allAfter(column: ColumnPath): ColumnSet<*> = allColsAfter(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_AFTER,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_AFTER_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allAfter(column: String): ColumnSet<*> = allColsAfter(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_AFTER,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_AFTER_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allAfter(column: AnyColumnReference): ColumnSet<*> = allColsAfter(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_BEFORE,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_BEFORE_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allBefore(column: ColumnPath): ColumnSet<*> = allColsBefore(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_BEFORE,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_BEFORE_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allBefore(column: String): ColumnSet<*> = allColsBefore(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_BEFORE,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_BEFORE_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allBefore(column: AnyColumnReference): ColumnSet<*> = allColsBefore(column)

@Deprecated(COL_SELECT_DSL_ALL_FROM, ReplaceWith(COL_SELECT_DSL_ALL_FROM_REPLACE), level = DeprecationLevel.ERROR)
public fun ColumnsSelectionDsl<*>.allSince(column: ColumnPath): ColumnSet<*> = allFrom(column)

@Deprecated(COL_SELECT_DSL_ALL_FROM, ReplaceWith(COL_SELECT_DSL_ALL_FROM_REPLACE), level = DeprecationLevel.ERROR)
public fun ColumnsSelectionDsl<*>.allSince(column: String): ColumnSet<*> = allFrom(column)

@Deprecated(COL_SELECT_DSL_ALL_FROM, ReplaceWith(COL_SELECT_DSL_ALL_FROM_REPLACE), level = DeprecationLevel.ERROR)
public fun ColumnsSelectionDsl<*>.allSince(column: AnyColumnReference): ColumnSet<*> = allFrom(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_FROM,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_FROM_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allSince(column: ColumnPath): ColumnSet<*> = allColsFrom(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_FROM,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_FROM_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allSince(column: String): ColumnSet<*> = allColsFrom(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_FROM,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_FROM_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allSince(column: AnyColumnReference): ColumnSet<*> = allColsFrom(column)

@Deprecated(COL_SELECT_DSL_ALL_UP_TO, ReplaceWith(COL_SELECT_DSL_ALL_UP_TO_REPLACE), level = DeprecationLevel.ERROR)
public fun ColumnsSelectionDsl<*>.allUntil(column: ColumnPath): ColumnSet<*> = allUpTo(column)

@Deprecated(COL_SELECT_DSL_ALL_UP_TO, ReplaceWith(COL_SELECT_DSL_ALL_UP_TO_REPLACE), level = DeprecationLevel.ERROR)
public fun ColumnsSelectionDsl<*>.allUntil(column: String): ColumnSet<*> = allUpTo(column)

@Deprecated(COL_SELECT_DSL_ALL_UP_TO, ReplaceWith(COL_SELECT_DSL_ALL_UP_TO_REPLACE), level = DeprecationLevel.ERROR)
public fun ColumnsSelectionDsl<*>.allUntil(column: AnyColumnReference): ColumnSet<*> = allUpTo(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_UP_TO,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_UP_TO_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allUntil(column: ColumnPath): ColumnSet<*> = allColsUpTo(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_UP_TO,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_UP_TO_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allUntil(column: String): ColumnSet<*> = allColsUpTo(column)

@Deprecated(
COL_SELECT_DSL_ALL_COLS_UP_TO,
ReplaceWith(COL_SELECT_DSL_ALL_COLS_UP_TO_REPLACE),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.allUntil(column: AnyColumnReference): ColumnSet<*> = allColsUpTo(column)

// endregion
}

/**
Expand Down
113 changes: 0 additions & 113 deletions core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.transformSingle
import org.jetbrains.kotlinx.dataframe.util.ALL_COLS_EXCEPT
import org.jetbrains.kotlinx.dataframe.util.ALL_COLS_REPLACE
import org.jetbrains.kotlinx.dataframe.util.ALL_COLS_REPLACE_VARARG
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_EXCEPT
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_EXCEPT_REPLACE_RESOLVER
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_EXCEPT_REPLACE_SELECTOR
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_SINGLE_COL_EXCEPT
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHER
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHERS
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_RESOLVER
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_RESOLVERS
import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_SELECTOR
import kotlin.reflect.KProperty

// region ColumnsSelectionDsl
Expand Down Expand Up @@ -1017,110 +1008,6 @@ public interface AllExceptColumnsSelectionDsl {
columnGroup(this).exceptExperimentalInternal(others.toColumnSet())

// endregion

// region deprecated

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_SELECTOR),
level = DeprecationLevel.ERROR,
)
public infix fun <C> SingleColumn<DataRow<C>>.except(selector: ColumnsSelector<C, *>): ColumnSet<*> =
allColsExcept(selector)

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_RESOLVER),
level = DeprecationLevel.ERROR,
)
public infix fun SingleColumn<DataRow<*>>.except(other: ColumnsResolver<*>): ColumnSet<*> = allColsExcept { other }

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_RESOLVERS),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.except(vararg others: ColumnsResolver<*>): ColumnSet<*> =
allColsExcept { others.toColumnSet() }

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHER),
level = DeprecationLevel.ERROR,
)
public infix fun SingleColumn<DataRow<*>>.except(other: String): ColumnSet<*> = allColsExcept(other)

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHERS),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.except(vararg others: String): ColumnSet<*> = allColsExcept(*others)

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHER),
level = DeprecationLevel.ERROR,
)
public infix fun SingleColumn<DataRow<*>>.except(other: KProperty<*>): ColumnSet<*> = allColsExcept(other)

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHERS),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.except(vararg others: KProperty<*>): ColumnSet<*> = allColsExcept(*others)

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHER),
level = DeprecationLevel.ERROR,
)
public infix fun SingleColumn<DataRow<*>>.except(other: ColumnPath): ColumnSet<*> = allColsExcept(other)

@Deprecated(
message = COL_SELECT_DSL_SINGLE_COL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_SINGLE_COL_EXCEPT_REPLACE_OTHERS),
level = DeprecationLevel.ERROR,
)
public fun SingleColumn<DataRow<*>>.except(vararg others: ColumnPath): ColumnSet<*> = allColsExcept(*others)

@Deprecated(
message = COL_SELECT_DSL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_EXCEPT_REPLACE_SELECTOR),
level = DeprecationLevel.ERROR,
)
public fun <C> ColumnsSelectionDsl<C>.except(selector: ColumnsSelector<C, *>): ColumnSet<*> = allExcept(selector)

@Deprecated(
message = COL_SELECT_DSL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_EXCEPT_REPLACE_RESOLVER),
level = DeprecationLevel.ERROR,
)
public fun ColumnsSelectionDsl<*>.except(vararg others: ColumnsResolver<*>): ColumnSet<*> = allExcept(*others)

@Deprecated(
message = COL_SELECT_DSL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_EXCEPT_REPLACE_RESOLVER),
level = DeprecationLevel.ERROR,
)
public fun ColumnsSelectionDsl<*>.except(vararg others: String): ColumnSet<*> = allExcept(*others)

@Deprecated(
message = COL_SELECT_DSL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_EXCEPT_REPLACE_RESOLVER),
level = DeprecationLevel.ERROR,
)
public fun ColumnsSelectionDsl<*>.except(vararg others: KProperty<*>): ColumnSet<*> = allExcept(*others)

@Deprecated(
message = COL_SELECT_DSL_EXCEPT,
replaceWith = ReplaceWith(COL_SELECT_DSL_EXCEPT_REPLACE_RESOLVER),
level = DeprecationLevel.ERROR,
)
public fun ColumnsSelectionDsl<*>.except(vararg others: ColumnPath): ColumnSet<*> = allExcept(*others)

// endregion
}

/**
Expand Down
Loading

0 comments on commit da17b1f

Please sign in to comment.