geojupyter / jupytergis

JupyterGIS
https://geojupyter.github.io/jupytergis/lab/index.html
BSD 3-Clause "New" or "Revised" License
26 stars 7 forks source link

Automatically open a Python repl with access to the document #41

Closed martinRenou closed 1 week ago

martinRenou commented 2 months ago

Similar to what tools like Mayavi/Freecad/Blender do, we should automatically provide a Python repl with access to the document:

Screenshot from 2024-07-11 15-00-37

Ideally (probably some items are long term) we would:

davidbrochart commented 2 months ago

So this REPL would be a shortcut to creating a new notebook and writing in the first cell the following code?

from jupyterlab_gis import GISDocument

doc = GISDocument("my_document.jGIS")

The state/history is saved in the notebook file already, and the notebook can be collaborative. Maybe a button like "Create new notebook/console from document" would be enough?

martinRenou commented 2 months ago

So this REPL would be a shortcut to creating a new notebook and writing in the first cell the following code?

More or less yes 👍🏽

The state/history is saved in the notebook file already, and the notebook can be collaborative.

True. Wild idea, could the jGIS format/ydoc be just an extension of the Notebook?

I'm thinking that if we have the code information stored in the file, it makes it easier to share and structure without needing multiple files.

EDIT: I also believe the Notebook is probably too much in the UI, a small repl fits better IMO and is closer to what exists in Mayavi/Freecad/Blender

davidbrochart commented 2 months ago

Wild idea, could the jGIS format/ydoc be just an extension of the Notebook?

Or stored somewhere in the notebook metadata?

martinRenou commented 2 months ago

I was also thinking of this idea 😄 Then that would still be a notebook

martinRenou commented 1 month ago

We should port https://github.com/jupytercad/JupyterCAD/pull/392 to JupyterGIS 🚀