Skip to content

Commit 25200a7

Browse files
committed
fixed deprecation error
1 parent a312860 commit 25200a7

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import org.jetbrains.kotlinx.dataframe.impl.getListType
1717
import kotlin.reflect.typeOf
1818

1919
internal fun <T, C> DataFrame<T>.implodeImpl(dropNA: Boolean = false, columns: ColumnsSelector<T, C>): DataFrame<T> {
20-
return groupBy { except(columns) }.updateGroups {
20+
return groupBy { allExcept(columns) }.updateGroups {
2121
replace(columns).with { column ->
2222
val (value, type) = when (column.kind()) {
2323
ColumnKind.Value -> (if (dropNA) column.dropNA() else column).toList() to getListType(column.type())

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/gather.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class GatherTests {
9696
fun gather() {
9797
val mode by column<String>()
9898
val temp by column<String>()
99-
val gathered = typed.gather { except(name) }.cast<String>().into(mode, temp).ungroup(temp)
99+
val gathered = typed.gather { allExcept(name) }.cast<String>().into(mode, temp).ungroup(temp)
100100

101101
val expected = typed.groupBy { name }.updateGroups {
102102
val cols = columns().drop(1).map { it.asColumnGroup() } // drop 'name' column

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/pivot.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PivotTests {
4141
}
4242
pivoted.columnsCount() shouldBe 3
4343
pivoted.rowsCount() shouldBe 2
44-
val cols = pivoted.getColumns { except(a).colsAtAnyDepth { !it.isColumnGroup() } }
44+
val cols = pivoted.getColumns { allExcept(a).colsAtAnyDepth { !it.isColumnGroup() } }
4545
cols.size shouldBe 4
4646
cols.forEach {
4747
it.type() shouldBe typeOf<Char>()

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/DataFrameTreeTests.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,23 +314,23 @@ class DataFrameTreeTests : BaseTest() {
314314
@Test
315315
fun `all except`() {
316316
val info by columnGroup()
317-
val moved = typed.group { except(name) }.into(info)
318-
val actual = moved.select { except(info) }
317+
val moved = typed.group { allExcept(name) }.into(info)
318+
val actual = moved.select { allExcept(info) }
319319
actual shouldBe typed.select { name }
320320
}
321321

322322
@Test
323323
fun `move and group`() {
324324
val info by columnGroup()
325-
val moved = typed.group { except(name) }.into(info)
326-
val grouped = moved.groupBy { except(info) }.toDataFrame()
325+
val moved = typed.group { allExcept(name) }.into(info)
326+
val grouped = moved.groupBy { allExcept(info) }.toDataFrame()
327327
grouped.rowsCount() shouldBe typed.name.countDistinct()
328328
}
329329

330330
@Test
331331
fun `merge rows into table`() {
332332
val info by columnGroup()
333-
val moved = typed.group { except(name) }.into(info)
333+
val moved = typed.group { allExcept(name) }.into(info)
334334
val merged = moved.implode { info }
335335
val grouped = typed.groupBy { name }.updateGroups { remove { name } }
336336
val expected = grouped.toDataFrame().rename(grouped.groups).into(info)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import org.jetbrains.kotlinx.dataframe.impl.getListType
1717
import kotlin.reflect.typeOf
1818

1919
internal fun <T, C> DataFrame<T>.implodeImpl(dropNA: Boolean = false, columns: ColumnsSelector<T, C>): DataFrame<T> {
20-
return groupBy { except(columns) }.updateGroups {
20+
return groupBy { allExcept(columns) }.updateGroups {
2121
replace(columns).with { column ->
2222
val (value, type) = when (column.kind()) {
2323
ColumnKind.Value -> (if (dropNA) column.dropNA() else column).toList() to getListType(column.type())

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/gather.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class GatherTests {
9696
fun gather() {
9797
val mode by column<String>()
9898
val temp by column<String>()
99-
val gathered = typed.gather { except(name) }.cast<String>().into(mode, temp).ungroup(temp)
99+
val gathered = typed.gather { allExcept(name) }.cast<String>().into(mode, temp).ungroup(temp)
100100

101101
val expected = typed.groupBy { name }.updateGroups {
102102
val cols = columns().drop(1).map { it.asColumnGroup() } // drop 'name' column

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/pivot.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PivotTests {
4141
}
4242
pivoted.columnsCount() shouldBe 3
4343
pivoted.rowsCount() shouldBe 2
44-
val cols = pivoted.getColumns { except(a).colsAtAnyDepth { !it.isColumnGroup() } }
44+
val cols = pivoted.getColumns { allExcept(a).colsAtAnyDepth { !it.isColumnGroup() } }
4545
cols.size shouldBe 4
4646
cols.forEach {
4747
it.type() shouldBe typeOf<Char>()

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/DataFrameTreeTests.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,23 +314,23 @@ class DataFrameTreeTests : BaseTest() {
314314
@Test
315315
fun `all except`() {
316316
val info by columnGroup()
317-
val moved = typed.group { except(name) }.into(info)
318-
val actual = moved.select { except(info) }
317+
val moved = typed.group { allExcept(name) }.into(info)
318+
val actual = moved.select { allExcept(info) }
319319
actual shouldBe typed.select { name }
320320
}
321321

322322
@Test
323323
fun `move and group`() {
324324
val info by columnGroup()
325-
val moved = typed.group { except(name) }.into(info)
326-
val grouped = moved.groupBy { except(info) }.toDataFrame()
325+
val moved = typed.group { allExcept(name) }.into(info)
326+
val grouped = moved.groupBy { allExcept(info) }.toDataFrame()
327327
grouped.rowsCount() shouldBe typed.name.countDistinct()
328328
}
329329

330330
@Test
331331
fun `merge rows into table`() {
332332
val info by columnGroup()
333-
val moved = typed.group { except(name) }.into(info)
333+
val moved = typed.group { allExcept(name) }.into(info)
334334
val merged = moved.implode { info }
335335
val grouped = typed.groupBy { name }.updateGroups { remove { name } }
336336
val expected = grouped.toDataFrame().rename(grouped.groups).into(info)

0 commit comments

Comments
 (0)