Skip to content
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

Improve codegen for stdlib <-> df interop workflow #763

Merged
merged 8 commits into from
Jul 8, 2024

Conversation

koperagen
Copy link
Collaborator

@koperagen koperagen commented Jul 3, 2024

I recommend to review commits individually. First two were small changes made to improve debugging experience, and other two are separate features
Fixes #344

should haveSubstring doesn't show diff between two texts, and with generated code being 500 lines or so it's impossible to find why assertion fails.
@koperagen koperagen added the enhancement New feature or request label Jul 3, 2024
@koperagen koperagen added this to the 0.14.0 milestone Jul 3, 2024
@koperagen koperagen self-assigned this Jul 3, 2024
@koperagen koperagen requested a review from zaleslaw July 3, 2024 14:47
@koperagen koperagen force-pushed the generate-data-classes branch 2 times, most recently from f592180 to 7879438 Compare July 5, 2024 13:46
Copy link
Collaborator

@zaleslaw zaleslaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an analogue of suggested printDataClassSchema from https://github.com/holgerbrandl/kdfutils?tab=readme-ov-file#data-frame-schema?

I could not understand this and find in tests in proposed PR, sorry

@koperagen
Copy link
Collaborator Author

df.generateDataClasses().print()

…eGen to org.jetbrains.kotlinx.dataframe.api

Having to import this function in notebooks is bothersome. Api package is imported by default. Adding codeGen to default imports would add too much things.
Function is intended to be used together with either KSP or compiler plugin, so generated extension properties won't be needed
@zaleslaw
Copy link
Collaborator

zaleslaw commented Jul 5, 2024

@koperagen could you add a page in our docs or chapter with simple description and small example?

@koperagen
Copy link
Collaborator Author

Let's do it later. I want to find a better form and place for it

@zaleslaw
Copy link
Collaborator

zaleslaw commented Jul 8, 2024

We could add documentation later, but in this case, please create a doc ticket for this, link to this issue and assign on your-self (because we need to extract some knowledge here and could not deliver without documentation new functionality)

Copy link
Contributor

Generated sources will be updated after merging this PR.
Please inspect the changes in here.

@koperagen koperagen deleted the generate-data-classes branch August 26, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streamline use of toListOf by adding method to print data class definition of table schema
2 participants