jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
168 stars 31 forks source link

Add forking API #382

Closed davidbrochart closed 2 weeks ago

davidbrochart commented 1 month ago

The forking API consists of the following endpoints:

Jupyter events are emitted when creating and deleting forks.

github-actions[bot] commented 1 month ago

Binder :point_left: Launch a Binder on branch _davidbrochart/jupytercollaboration/suggestion-api

trungleduc commented 3 weeks ago

Downstream users need to interact with the REST API and the Event handlers directly or will you introduce the JS APIs later?

davidbrochart commented 3 weeks ago

Downstream users need to interact with the REST API and the Event handlers directly or will you introduce the JS APIs later?

Yes we can add higher-level JavaScript functions, maybe in another PR?

On a different note, I'm not sure if a fork's room ID should just be uuid, or format:type:uuid. Currently it's the former, because if it were the latter it would be interpreted as a stored document, but we don't want forks to be stored, do we?

trungleduc commented 3 weeks ago

Yes we can add higher-level JavaScript functions, maybe in another PR?

Yes, let's merge this one then I can work on this

davidbrochart commented 3 weeks ago

On a different note, I'm not sure if a fork's room ID should just be uuid, or format:type:uuid. Currently it's the former, because if it were the latter it would be interpreted as a stored document, but we don't want forks to be stored, do we?

We need to answer this question before merging.

trungleduc commented 3 weeks ago

if it's only about changing the ID format, Isn't it safer to store the forks and we can remove them later if we don't have to?

davidbrochart commented 3 weeks ago

But a stored document currently means that it goes through the Jupyter file ID service and that it is a file-backed document. So that would mean adding logic to manage (temporary) files for these forks.

trungleduc commented 3 weeks ago

ah, I thought that the fork data is saved into the .jupyter_ystore.db file

davidbrochart commented 3 weeks ago

If it's a stored document yes, but it's not at the moment.

trungleduc commented 3 weeks ago

creating a file-less document where all data is stored in the .jupyter_ystore.db file could also be useful for the chat application?

davidbrochart commented 3 weeks ago

Yes. But does it make sense to store suggestions?

trungleduc commented 3 weeks ago

Yes. But does it make sense to store suggestions?

Google Docs keeps the suggestions till we explicitly delete them so I say yes.

davidbrochart commented 3 weeks ago

I'm thinking that we should maybe create a new branch to work on forking/suggestions, instead of taking the risk to block main or release completely WIP code.

davidbrochart commented 3 weeks ago

But then it won't help you if you want to use the new features in JupyterCAD?

trungleduc commented 3 weeks ago

But then it won't help you if you want to use the new features in JupyterCAD?

there is no problem, I can link my work with your PR

jtpio commented 3 weeks ago

Wouldn't the forks need be saved also in the case of server restarts? Users would probably expect their suggestions to be there if they resume their work later?

But then it won't help you if you want to use the new features in JupyterCAD?

Maybe there could be some pre-releases made from the new branch? Or one could download the artifacts built by the releaser to use the latest version.

trungleduc commented 3 weeks ago

@davidbrochart could you rebase this PR to bump its version to 3.0.0? I trying to install it locally.

davidbrochart commented 2 weeks ago

Superseded by #394.