-
Notifications
You must be signed in to change notification settings - Fork 5
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 lock
command and support juv run Untitled.ipynb --locked
#7
Comments
lock
command and support juv run Untitled.ipynb --locked
lock
command and support juv run Untitled.ipynb --locked
I saw this project and had the exact same thought! In fact I don‘t think we’d need dependency specification in a code cell at all: jupyter has a perfect place for notebook-wide structured metadata already. |
Should be able to benefit from: When it lands to save the export to the notebook metadata. |
Yeah, I'm a bit torn on this. Keeping in a notebook cell as a comment aligns closer with scripts, but hiding means we could do more to control the behavior of adding/removing dependencies. We'd probably need better ways to show this metadata to users though in the notebook, if we choose to hide it. When/if we introduce locking, we could always write a new lock on any command ( |
uv scripts now also support e.g., juv init Untitled.ipynb # writes a timestamp to the notebook metadata
juv add Untitled.ipynb notebook
# juv timestamp Untitled.ipynb # explicitly update
juv run Untitled.ipynb
juv run --exclude-newer=last-timestamp Untitled.ipyng |
The purpose of putting it into the metadata isn’t supposed to hide it, but to allow us to
|
def, love the lock idea :) |
In lieu of locking, for the time being I've added |
See #64, uv now supports locking standalone scripts. uv lock --script foo.py # generates foo.py.lock Right now I'm writing this metadata to the notebook-level metadata under a |
Released in v0.3.0! |
Ref: https://x.com/rahuldave/status/1848072186340196391
The idea would be to put a lockfile in the notebook metadata (either cell-level or top-level) and we could update the lock file on
run
/add
/lock
.Then we could add a flag to
--locked
to skip dependency resolution and just create the enviroment from the lockfile.The text was updated successfully, but these errors were encountered: