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

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

Closed
3 tasks
martinRenou opened this issue Jul 11, 2024 · 5 comments · Fixed by #136
Closed
3 tasks

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

martinRenou opened this issue Jul 11, 2024 · 5 comments · Fixed by #136
Labels
enhancement New feature or request

Comments

@martinRenou
Copy link
Member

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:

  • Pre-execute the opening of the GISDocument and expose it as gis or doc in the Python scope.
  • Save the state and history of the repl in the jGIS document
  • Make the repl collaborative too
@martinRenou martinRenou added the enhancement New feature or request label Jul 11, 2024
@davidbrochart
Copy link
Collaborator

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
Copy link
Member Author

martinRenou commented Jul 11, 2024

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
Copy link
Collaborator

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

Or stored somewhere in the notebook metadata?

@martinRenou
Copy link
Member Author

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

@martinRenou
Copy link
Member Author

We should port jupytercad/JupyterCAD#392 to JupyterGIS 🚀

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 a pull request may close this issue.

2 participants