-
Notifications
You must be signed in to change notification settings - Fork 63
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
Korro outputs #370
Korro outputs #370
Conversation
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.
Unclear in a few moments for me, but the result of PR is great with the removal of all these links
df.select { it[Person::name][Name::firstName] } | ||
df.select { Person::name[Name::firstName] } | ||
df.select { it["name"]["firstName"] } | ||
df.select { "name"["firstName"] } |
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.
is it really works this way, call [] on String? I don't know about it
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 is! It's an overloaded "get" operator.
|
||
// column arithmetics | ||
df.select { 2021 - (Person::age)() } | ||
df.select { 2021 - "age"<Int>() } |
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.
honestly need to say, that Person::age was better than "age"
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.
The PR is a bit unclear in this part. In fact, it's a very bad "diff". In this file after update of korro KProperties API tab was removed (we discussed it with Jolan). And "String API" tab was already there
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.
There has also been some shifting around, that's where the clashes come from
|
||
// depth-first-search traversal of all children columns | ||
df.select { Person::name.allDfs() } | ||
df.select { "name".allDfs() } | ||
``` |
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 you and @Jolanrensen will have a clash here
docs/StardustDocs/topics/toHTML.md
Outdated
@@ -38,6 +38,7 @@ val df3 = df.sortByDesc { age } | |||
listOf(df1, df2, df3).fold(DataFrameHtmlData.tableDefinitions()) { acc, df -> acc + df.toHTML() } | |||
``` | |||
|
|||
<dataFrame src="org.jetbrains.kotlinx.dataframe.samples.api.Render.composeTables.html"/> |
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.
Why do we need this line here?
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 how we embed the table component into the documentation now
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.
But you're right, this specific example is not very useful, i'll remove it for now
Could you run |
I updated Render.kt in generated sources. Is it what you asked for? |
@@ -2,6 +2,6 @@ projectName=dataframe | |||
version=0.11.0 | |||
jupyterApiTCRepo= | |||
kotlin.jupyter.add.scanner=false | |||
org.gradle.jvmargs=-Xmx2G | |||
org.gradle.jvmargs=-Xmx4G |
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.
back to 4 hey?
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.
Yes, korro needs it, otherwise fails with OOM
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
Now running
korro
task will not only update code snippets, but also copy-paste content of the file with name corresponding to FQ name of the korro FUN directive. So, it means that we can append arbitrary content to the docs by simply writing it into the file during test execution. korro will keep docs in sync with it.