118 points · by okost1 · 1y ago · 27 comments
Could be fantastic for my use-case. We have a large repo of notebooks that are generally write-once, sometimes-re-run. Having a separate repo/venv/kernel per notebook would be a big overhead, so I currently just try to do a kind of semantic versioning where I make a new kernel on something like a 6-month cadence and try to keep breaking dependency changes to a minimum in that window. I can then keep around the old kernels for running old notebooks that depend on them. This is not at all an ideal state.
Thanks for sharing!
I can see the point of PEP-723, in the context of jupyter, but another usecase is having your notebook to work on the same environment as some product, instead of just being a standalone thing.
I believe this is solving the common complaint that you can't just email a jupyter notebook, since it doesn't capture the dependencies.
In my case, I usually cd to the project directory, activate the associated environment, then do one of the following to work on a notebook in one of my projects, `jupyter lab`, `pycharm .`, or `code .` and go from there. In all of these cases, I get the ability to open notebooks that make use of this environment, either in the actual Jupyter lab interface, or in the tool's notebook interface (pycharm or vs code). All of these options make it pretty effortless to use the kernel associated with the environment - it's either automatically selected or it's the default in the dropdown.
> No additional lock or requirements files are needed
Additional to what?
> Guaranteed reproducibility
Of what?
I probably need your project, but I don't understand what it is for.
I'm not sure which model fits best, I'll have to see how your juvio handles kernels in jupyter. Does the kernel name change, is it all the default kernel, and what changes when an install happens?
I'm not quite sure what you mean by cleaner git diffs, but hopefully that will become clear with experimentation.
For my particular method of working, I've mostly switched to having each small project (roughly a JIRA ticket) be a separate uv-managed project in a git repo, and I create a kernel for each of the uv projects. This allows me to examine multiple different tickets and kernels without having to launch multiple jupyter labs.
The whole kernel<->venv mapping is another layer of massive complexity on top of the current huge amount of complexity in Python packaging. uv makes it fast , but it does not provide the "correct" or even single route to managing venvs.
This should be your primary selling point!