Repository navigation
Template 0.1.20: lock files, no lost workflow pushes, fresh JupyterLab launch - #37
Merged
Merged
Conversation
…b launch Workflow race (update_on_notebook_change.yml / update_on_src_change.yaml): - Both workflows commit inline and, when the push is rejected because the branch moved, rebase onto it (git rebase --autostash) and push again (5 attempts). stefanzweifel/git-auto-commit-action is no longer used. - The revert of a user commit runs only when the conda test failed, on top of the latest branch, with -m 1 only for a merge commit. - Each workflow has its own concurrency group (a shared group kept only one waiting run, so a third push cancelled the other workflow's run). Lock files: - New .tools/python/lock_requirements.py (uv==0.13.3, uv pip compile --universal) writes requirements*.lock.txt next to each requirements file: every package with its exact version, versions only. Conda packages of environment.yaml are constraints, not emitted. A fingerprint header keeps the lock unchanged until its inputs change. A failure is a warning and removes the stale lock. - The notebook workflow runs it after the merge; test_conda_environment.sh, post_install.sh / .bat and bump_constructor.py use the lock when present. Launcher: - launch_jupyter.py asks to press Enter when JupyterLab stops (--no-wait to skip) and gives JupyterLab a new, empty workspaces_dir at every launch, so only the app's Welcome notebook opens. - notebook_launcher.json: the Windows command ends with "& exit" so the cmd window closes after Enter. Migration v0_1_19_to_v0_1_20.py (surgical, idempotent, skips customised files), tests (workflow steps run with real git against a moving origin, lock script, bump_constructor, launcher, migration, chain) and the design note .tools/docs/migration_0_1_20.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Template 0.1.20. Design note:
.tools/docs/migration_0_1_20.md.1. Lost workflow pushes (race between the two update workflows)
A push that touches both
src/andnotebooks/starts Updates on src change and Updates on notebook change. Each checks out the triggering commit, so the second one to commit was behindmainand its push was rejected (non-fast-forward). The notebook workflow then ran "Revert user commit that broke requirements" (its condition was any failure) and created a revert of the user's merge; only a second rejected push stopped it (CellMigrationLab/LabChronicle runs 41727822989 and 41800906840).git rebase --autostashonto the latest branch and push again (5 attempts; a conflict stops with::error::and pushes nothing).stefanzweifel/git-auto-commit-actionis removed.-m 1only for a merge commit.2. Lock files
.tools/python/lock_requirements.py(uv==0.13.3,uv pip compile --universal) writesrequirements*.lock.txtnext to each requirements file: every package with its exact version for Windows, macOS and Linux (versions only, no hashes).environment.yamlconstrain the resolution and are not emitted; per-OS files are constrained by the main lock; index lines (CUDA) are kept.test_conda_environment.sh(plus apip checkwarning),post_install.sh/.batandbump_constructor.py(bundles the locks).3. Launcher
launch_jupyter.pyasks to press Enter when JupyterLab stops (--no-waitskips it); the Windows menu command ends with& exit, so the window closes.--LabApp.workspaces_dir(removed afterwards): only the app's Welcome notebook opens, no notebooks of other apps. Settings and themes are kept.Migration
v0_1_19_to_v0_1_20.pySurgical and idempotent; replaces a file only when it is still the 0.1.19 template file, otherwise
SKIPPEDwith the reason; keeps line endings; never deletes.Test plan
pytest tests/on Linux (WSL): 204 passed;tests/smoke/post_install_hosts.pypasses; ruff and mypy clean. On Windows the same 55 bash/Linux-only tests fail as onmain, none new.pip checkclean..batending withWelcome.ipynb & exit;post_install.batlock selection tested in realcmd.[Process completed]depending on its profile).🤖 Generated with Claude Code