jupyter-server / jupyter_server_fileid

An extension that maintains file IDs for documents in a running Jupyter Server
https://jupyter-server-fileid.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
3 stars 12 forks source link

Update file path out-of-band #80

Open brichet opened 2 months ago

brichet commented 2 months ago

Description

Renaming a file from the file system (not from jupyter) does not update the database.

Reproduce

Open a file in collaboration, rename it from the file system. The ContentManager is not happy because it looks for the former file path.

Renaming it from jupyterlab correctly update the file path in the database, though.

Expected behavior

The new file path to be used.

Context

Peek 2024-08-29 13-43

krassowski commented 2 months ago

I guess we would need to (optimally) depend on https://github.com/gorakhargosh/watchdog/ or similar. Watching files cross-platform is not easy. In the repo at the bottom there is a list of other libraries that allow for that.

davidbrochart commented 2 months ago

Jupyverse uses watchfiles.

krassowski commented 2 months ago

Jupyverse uses watchfiles.

This package was previously named "watchgod"

Good one! Does not seem to support tracking renames yet though: https://github.com/samuelcolvin/watchfiles/issues/201