Skip to content

Fix jupyter logger #1361

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

Merged
merged 8 commits into from
Aug 12, 2025
Merged

Fix jupyter logger #1361

merged 8 commits into from
Aug 12, 2025

Conversation

AndreiKingsley
Copy link
Collaborator

Fixes #1155 + geodataframe jupyter fix + new geo-jupyter module

@@ -67,7 +72,7 @@ internal class IntegrationGeo : JupyterIntegration() {
val generatedDf = execute(
codeWithTypeCastGenerator = replCodeGeneratorImpl.process(geo.df, kProperty),
expression = "(${kProperty.name}.df as DataFrame<*>)",
)
).let { "`" + it.toString() + "`" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

"`$it`" is a bit shorter ;P

But what does this do? It renders the DF as string and adds crs? Isn't it better to output the DF natively and output CRS as string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean by "this"?
FieldHandlerFactory.createUpdateExecution<GeoDataFrame<*>> adds inner df schema retrieving for jupuyter.
new render section adds a new render for geodf like that:
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice :)

Is it always static, though? or is that just your screenshot?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering, should this be a separate module? I think it can just be part of the dataframe-jupyter module, potentially with the useExperimentalGeo flag

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

dataframe-geo is really heavy and I wouldn't like it to be a part of general dataframe artifact, neither %use dataframe in notebooks. So I'd really like to keep them separate

@@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to remove this file :D

@koperagen
Copy link
Collaborator

koperagen commented Aug 5, 2025

What changes in terms of setup? I reckon previously we could use dataframe(useExperimentalGeo = true), do you need to update dependencies there to include a new module?

@AndreiKingsley
Copy link
Collaborator Author

@koperagen as I said above, I'd like to remove useExperimentalGeo.

@AndreiKingsley
Copy link
Collaborator Author

Removed with the latest commit

@@ -169,11 +168,6 @@ internal class Integration(private val notebook: Notebook, private val options:
if (enableExperimentalCsv?.toBoolean() == true) {
println("CSV module is already enabled by default now.")
}
if (enableExperimentalGeo?.toBoolean() == true) {
println("Enabling experimental Geo module: dataframe-geo")
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of completely removing it, please provide a helpful message of what to do instead :)

We mentioned the enableExperimentalGeo in some release, so if it suddenly does nothing anymore, people will be confused

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@AndreiKingsley AndreiKingsley merged commit 9572313 into master Aug 12, 2025
5 checks passed
@AndreiKingsley AndreiKingsley deleted the fix_jupyter_logger branch August 12, 2025 12:50
@@ -54,6 +54,11 @@ internal class IntegrationGeo : JupyterIntegration() {
useSchema<WithMultiLineStringGeometry>()
}

render<GeoDataFrame<*>> {
println("GeoDataFrame with ${it.crs?.name?.code} CRS and inner dataframe:")
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not ideal, better use notebook.display("text") for such things. Reason: we can't guarantee standard stream sync in multithreading envs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix excel module logger
4 participants