-
Notifications
You must be signed in to change notification settings - Fork 75
Rename kdocs #1402
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
Rename kdocs #1402
Conversation
# Conflicts: # core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DocumentationUrls.kt
* - [toCamelCase()][RenameClause.toCamelCase] — renames all selected columns to `camelCase`. | ||
* | ||
* See [Grammar][RenameDocs.Grammar] for more details. | ||
*/ | ||
@HasSchema(schemaArg = 0) |
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.
Looks like we need a catalogue / design doc with all annotations, invented this year @koperagen ?
Could you create a simple md doc with them?
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 recently updated the kdoc for HasSchema, should be clear now. They're all in the same file
* Each pair consists of the current column name and the desired new name. | ||
* | ||
* Example: | ||
* ``` |
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.
kt
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'd still mark examples with kotlin or kt so the highlighting is correct
* @param mappings A vararg of pairs where each pair consists of the original column name (`first`) | ||
* and the new column name (`second`). | ||
* @return A new [DataFrame] with the renamed columns. | ||
*/ | ||
@Refine | ||
@Interpretable("RenameMapping") | ||
public fun <T> DataFrame<T>.rename(vararg mappings: Pair<String, String>): DataFrame<T> = |
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.
should this one be mentioned in the grammar as 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.
maybe also renameToCamelCase?
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 believe they're out of grammar. I mean we should mention them, but not as part of operation grammar
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/rename.kt
Outdated
Show resolved
Hide resolved
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!
close #1388.