-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add forking API #382
base: main
Are you sure you want to change the base?
Add forking API #382
Conversation
e544d26
to
5108312
Compare
f1b3fa9
to
e55f2ef
Compare
6cb8740
to
9185cd1
Compare
78f3867
to
49f3ef1
Compare
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 |
Yes, let's merge this one then I can work on this |
We need to answer this question before merging. |
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? |
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. |
ah, I thought that the fork data is saved into the |
If it's a stored document yes, but it's not at the moment. |
creating a file-less document where all data is stored in the |
Yes. But does it make sense to store suggestions? |
Google Docs keeps the suggestions till we explicitly delete them so I say yes. |
I'm thinking that we should maybe create a new branch to work on forking/suggestions, instead of taking the risk to block |
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 |
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?
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. |
849b70c
to
bc60338
Compare
@davidbrochart could you rebase this PR to bump its version to 3.0.0? I trying to install it locally. |
bc60338
to
9d27f2b
Compare
The forking API consists of the following endpoints:
PUT /api/collaboration/fork/{root_roomid}
: creates a fork of a root document (optionally synchronizing with the root document).DELETE /api/collaboration/fork/{fork_roomid}
: deletes a fork of a root document (optionally merging back in the root document).GET /api/collaboration/fork/{root_roomid}
: returns the fork IDs of a root document given by its ID.Jupyter events are emitted when creating and deleting forks.