-
Notifications
You must be signed in to change notification settings - Fork 77
KDocs fixes for distinct and distinctBy
#1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
b67f0d0 to
37ca771
Compare
|
@Allex-Nik To avoid this problem with I'd even say it's better to write |
AndreiKingsley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Please, remove headers and add cross-references for distinct/distinctBy operations
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
TL;DR: write it like Long explanation: Whenever some KDocs is If a reference cannot be found, it's left unchanged as Unfortunately, this system is not perfect (resolving symbols by path in kotlin myself is hard XD), so when you write /** @param [columns] The names of the columns to consider for evaluating distinct rows. */
interface DistinctDocs
/** @include [DistinctDocs] */
public fun <T> DataFrame<T>.distinctBy...KoDEx tries to find Luckily, we have the |
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
| * {@include [DistinctDocs]} | ||
| * {@set PHRASE_ENDING the specified columns}. | ||
| * {@set DESCRIPTION It selects the specified columns and keeps only distinct rows based on these selected columns} | ||
| * {@set [DistinctDocs.DISTINCT_PARAM] @param [columns] The names of the columns to select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not "The names of the columns" though, it's a columns selector. Check how we write the @param of columnsSelectors in other operations :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably best to just write the @param line at the bottom of this KDoc, as each overload needs a different line of text for it. Yes, it will be below the @return then, but the IDE still renders it well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the descriptions of the parameters, thank you :)
Why is it best to write the @param line at the bottom, below the @return? If I set the @return after the @param, everything seems to work for all cases in the file.
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/distinct.kt
Outdated
Show resolved
Hide resolved
37ca771 to
690b780
Compare
@Jolanrensen, thank you! I understand :) |
Fixes #1434
The documentation for the
distinctfunction with parameters described the functionality ofdistinctBy: it suggested thatdistinctremoves duplicated rows omitting the fact that it also selects the specified columns and the result contains only these columns.In this PR I:
distinctdistinctByto DocumentationUrls