Skip to content

Commit 60af2a7

Browse files
committed
Remove direct links to deprecated access APIs
1 parent 4d44edf commit 60af2a7

File tree

2 files changed

+10
-52
lines changed
  • core
    • generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation
    • src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation

2 files changed

+10
-52
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/AccessApi.kt

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ import org.jetbrains.kotlinx.dataframe.documentation.AccessApi.AnyApiLinks
99
* or deleted while wrangling. Kotlin, in contrast, is a statically typed language and all types are defined and verified
1010
* ahead of execution. That's why creating a flexible, handy, and, at the same time, safe API to a dataframe is tricky.
1111
*
12-
* In `Kotlin DataFrame` we provide four different ways to access columns, and, while they're essentially different, they
13-
* look pretty similar in the data wrangling DSL. These include:
12+
* In `Kotlin DataFrame` we provide two different ways to access columns:
1413
* - [Extension Properties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ExtensionPropertiesApi]
15-
* - [KProperties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.KPropertiesApi]
16-
* - [Column Accessors API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ColumnAccessorsApi]
1714
* - [String API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.StringApi]
1815
*
1916
* For more information: [See Access APIs on the documentation website.](https://kotlin.github.io/dataframe/apilevels.html)
@@ -23,8 +20,6 @@ internal interface AccessApi {
2320

2421
/**
2522
* - [Extension Properties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ExtensionPropertiesApi]
26-
* - [KProperties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.KPropertiesApi]
27-
* - [Column Accessors API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ColumnAccessorsApi]
2823
* - [String API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.StringApi]
2924
*/
3025
interface AnyApiLinks
@@ -59,20 +54,6 @@ internal interface AccessApi {
5954
* a variable that represents its name and type.
6055
*
6156
* For more information: [See Column Accessors API on the documentation website.](https://kotlin.github.io/dataframe/columnaccessorsapi.html)
62-
*
63-
* For example:
64-
* ```kotlin
65-
* val survived by column<Boolean>()
66-
* val home by column<String>()
67-
* val age by column<Int?>()
68-
* val name by column<String>()
69-
* val lastName by column<String>()
70-
*
71-
* DataFrame.read("titanic.csv")
72-
* .add(lastName) { name().split(",").last() }
73-
* .dropNulls { age }
74-
* .filter { survived() && home().endsWith("NY") && age()!! in 10..20 }
75-
* ```
7657
*/
7758
interface ColumnAccessorsApi
7859

@@ -87,26 +68,6 @@ internal interface AccessApi {
8768
* The name and type of column should match the name and type of property, respectively.
8869
*
8970
* For more information: [See KProperties API on the documentation website.](https://kotlin.github.io/dataframe/kpropertiesapi.html)
90-
*
91-
* For example:
92-
* ```kotlin
93-
* data class Passenger(
94-
* val survived: Boolean,
95-
* val home: String,
96-
* val age: Int,
97-
* val lastName: String
98-
* )
99-
*
100-
* val passengers = DataFrame.read("titanic.csv")
101-
* .add(Passenger::lastName) { "name"<String>().split(",").last() }
102-
* .dropNulls(Passenger::age)
103-
* .filter {
104-
* it[Passenger::survived] &&
105-
* it[Passenger::home].endsWith("NY") &&
106-
* it[Passenger::age] in 10..20
107-
* }
108-
* .toListOf<Passenger>()
109-
* ```
11071
*/
11172
interface KPropertiesApi
11273

@@ -120,10 +81,15 @@ internal interface AccessApi {
12081
*
12182
* For more information: [See Extension Properties API on the documentation website.](https://kotlin.github.io/dataframe/extensionpropertiesapi.html)
12283
*
123-
* For example:
84+
* For example, in notebooks extension properties are generated from runtime data after the cell is executed:
12485
* ```kotlin
12586
* val df /* : AnyFrame */ = DataFrame.read("titanic.csv")
12687
* ```
88+
* ```kotlin
89+
* df.add("lastName") { name.split(",").last() }
90+
* .dropNulls { age }
91+
* .filter { survived && home.endsWith("NY") && age in 10..20 }
92+
* ```
12793
*/
12894
interface ExtensionPropertiesApi
12995

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/AccessApi.kt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import org.jetbrains.kotlinx.dataframe.documentation.AccessApi.AnyApiLinks
99
* or deleted while wrangling. Kotlin, in contrast, is a statically typed language and all types are defined and verified
1010
* ahead of execution. That's why creating a flexible, handy, and, at the same time, safe API to a dataframe is tricky.
1111
*
12-
* In `Kotlin DataFrame` we provide four different ways to access columns, and, while they're essentially different, they
13-
* look pretty similar in the data wrangling DSL. These include:
12+
* In `Kotlin DataFrame` we provide two different ways to access columns:
1413
* @include [AnyApiLinks]
1514
*
1615
* For more information: {@include [DocumentationUrls.AccessApis]}
@@ -21,8 +20,6 @@ internal interface AccessApi {
2120

2221
/**
2322
* - {@include [ExtensionPropertiesApiLink]}
24-
* - {@include [KPropertiesApiLink]}
25-
* - {@include [ColumnAccessorsApiLink]}
2623
* - {@include [StringApiLink]}
2724
*/
2825
interface AnyApiLinks
@@ -48,9 +45,6 @@ internal interface AccessApi {
4845
* a variable that represents its name and type.
4946
*
5047
* For more information: {@include [DocumentationUrls.AccessApis.ColumnAccessorsApi]}
51-
*
52-
* For example: {@comment This works if you include the test module when running KoDEx}
53-
* @sample [org.jetbrains.kotlinx.dataframe.samples.api.ApiLevels.accessors3]
5448
*/
5549
interface ColumnAccessorsApi
5650

@@ -65,9 +59,6 @@ internal interface AccessApi {
6559
* The name and type of column should match the name and type of property, respectively.
6660
*
6761
* For more information: {@include [DocumentationUrls.AccessApis.KPropertiesApi]}
68-
*
69-
* For example: {@comment This works if you include the test module when running KoDEx}
70-
* @sample [org.jetbrains.kotlinx.dataframe.samples.api.ApiLevels.kproperties1]
7162
*/
7263
interface KPropertiesApi
7364

@@ -81,8 +72,9 @@ internal interface AccessApi {
8172
*
8273
* For more information: {@include [DocumentationUrls.AccessApis.ExtensionPropertiesApi]}
8374
*
84-
* For example: {@comment This works if you include the test module when running KoDEx}
75+
* For example, in notebooks extension properties are generated from runtime data after the cell is executed: {@comment This works if you include the test module when running KoDEx}
8576
* @sample [org.jetbrains.kotlinx.dataframe.samples.api.ApiLevels.extensionProperties1]
77+
* @sample [org.jetbrains.kotlinx.dataframe.samples.api.ApiLevels.extensionProperties2]
8678
*/
8779
interface ExtensionPropertiesApi
8880

0 commit comments

Comments
 (0)