-
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
Fix for #573: Change serialization format for rendering in IntelliJ IDEA #574
Conversation
core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt
Outdated
Show resolved
Hide resolved
core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt
Outdated
Show resolved
Hide resolved
Can i ask you to move internal and private functions from this file to new writeJson.kt / readJson.kt files under impl.io package? This file became too big to navigate :c |
core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/JupyterHtmlRenderer.kt
Outdated
Show resolved
Hide resolved
aa038c8
to
f12853c
Compare
…lugin * Added the necessary metadata to the serialization format of the dataframe for it to be rendered in the Kotlin notebooks plugin. * Introduced the method `toJsonWithMetadata` which includes the metadata during the serialization process of the dataframe.
…entation and tests.
This commit includes a new document that explains the JSON serialization format used for rendering dataframes in the Kotlin notebooks plugin for IntelliJ IDEA. The format does not adhere to any formal schema such as Json Schema, but is intended for illustrative purposes.
This update introduces specific rendering flows based on the version of the IDE. A new method has been added to retrieve the IDE build number. This information is then used to conditionally generate a JSON-encoded DataFrame, adapting to the specific capabilities of the IDE version in use. Additionally, relevant tests have been updated to accommodate these changes.
Changed the condition check in the fromString function. Now, it accepts build numbers with three or more parts.
* Renamed encodePrimitiveData to encodeValue * Changed return type of toJsonWithMetadata to not expose JsonObject in publec API * Moved internal and private functions from json.kt to new writeJson.kt / readJson.kt files under impl.io package
done |
core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/writeJson.kt
Outdated
Show resolved
Hide resolved
core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/writeJson.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.
Approved, just one tiny fix related to take before merge please
Replaced the usage of 'rows().take().toDataFrame()' with the more concise 'take()' method in multiple files.
Fixes #573