watchfiles
watchfiles copied to clipboard
Watchfiles with editable packages
I have a docker-compose.yaml application using watchfiles to reload project files.
However, changes made to packages referenced locally and installed via pip install -e .
aren't reflected. Changes only appear after rebuilding the whole clusters docker-compose up -d build
." which is time-consuming.
My question is; how should I handle reloading packages installed via editable mode such that I don't need to rebuild every time?
I can confirm that adding sys.exit(0) inside the editable module launches a reload, but without the newly added line.
Yup, we've had the same problem at Pydantic, it's because by default we ignore changes in the site-packages
directory.
https://github.com/samuelcolvin/watchfiles/blob/6ea19cac0447b3594cca29793fe0d308c3585a6a/watchfiles/filters.py#L82
PR welcome to remove that directory from the list.
fixed by #249.