jupyter-server / jupyter_ydoc

Jupyter document structures for collaborative editing using Yjs/pycrdt
https://jupyter-ydoc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
28 stars 17 forks source link

Improve Python API #122

Closed davidbrochart closed 1 year ago

davidbrochart commented 1 year ago

Closes #65.

davidbrochart commented 1 year ago

@fcollonval I believe commit https://github.com/jupyter-server/jupyter_ydoc/pull/122/commits/b7ab80a2a553e98ec8e9049d69f65c7f4d65dc4d addresses your concerns in #65. See https://github.com/jupyter-server/jupyter_server_ydoc/pull/72 for an example of the change required in the callback.

davidbrochart commented 1 year ago

You probably need to update the signature of YBaseDoc.observe too.

Yes, thanks.

davidbrochart commented 1 year ago

Commit https://github.com/jupyter-server/jupyter_ydoc/pull/122/commits/a75ea4e79d56180ea4d86a96a03d9cb3f1183517 partially addresses #123 by adding YUTF8 (same as YFile) and YBytes. YBytes doesn't support changing individual bytes, only the whole content (see https://github.com/y-crdt/ypy/issues/108#issuecomment-1376730696).