Repository navigation
Notebook: check and save, reopen (Stage 1, PR 16b) - #238
Merged
Merged
Conversation
Screen 5 restates the experiment in sentences, asks "same way?" once per replicate beside its folders, pictures and channels, and saves with one click: every short name adopted, morphobricks.toml published under the lock and the derived experiment_design.csv written only then. A published file is the answers on reopening (folded when nothing changed; removed folders need Yes, remove; a replicate whose folders changed is asked again). PreprocessingNotebook(describe=True) retires the labels toggle, the design card's comparable questions and CSV writes, and the global Image type card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
The pairing card's pictures appear once the axis roles are confirmed; tests decode the thumbnail and overlay PNGs (shape, non-constant pixels, each replicate row shows its own folder's image, the overlay is drawn only after the answer). The design card says where the pairing is kept in a described run; the single note is right when only some folders lack the technical-repeat level; R, G and B get their own chips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…PR 16b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
guijacquemet
marked this pull request as ready for review
November 9, 2026 06:01
This was referenced Nov 9, 2026
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.
Stage 1 notebook PR 16b: screen 5 Check and save, reopen, thumbnails on screen 2, and the retirement of the global Image type card and labels toggle for described runs (design
notebook-natural-design-2026-11-08.md§2 "Screen 5", "Reopen"; owner answers 2-5). Stacked on #237 (PR 16a); retarget tomainonce #237 merges.Described run
PreprocessingNotebook(..., describe=True)is the shipped notebook (the notebook cell passes it, and showsmasks_step()andcheck_save_step()beforerun_step()). Withoutdescribethe v0.4 cards stay exactly as they were (embedding bricks, existing API users; every existing notebook test runs that way unchanged). All mode overrides are in one mixin,notebook_described._DescribedRun, each calling the original when the run is not described. In a described run:pairing), never inexperiment_design.csv. Its "comparable" questions are gone (moved to screen 5). The names card's "Yes, use these IDs" is retired: the save click adopts every short name.Screen 5: Check and save (gates Run)
RepeatAnswer.confirmed_on).description_candidate.check_candidatewrites the candidate with the canonical writer, reads those bytes with the strict reader, then runs the run's owncheck_description(R_HETEROGENEOUS_LAYOUT_NOT_ENABLEDsaid in words: saved but not runnable; the physicalR_*checks once the axis roles are confirmed). The derivedexperiment_design.csvchange is listed by row ("written for the first time (4 rows)", "new row …", "drug/rep2: confirmed_on … → …").publish_draftpublishes under the lock (base SHA, strict re-read, transitions, records) and only then writes the derivedexperiment_design.csv(v1 §11), then deletes the draft. Afterwards: green "Saved . Step 3 can run."; the Run checklist item "Save the experiment description (Check and save)" is ticked and Run enabled (unless heterogeneous or the physical checks refuse).Reopen
published_answersmaps it back toDraftAnswerskeyed by source folders (pairing label = repeat ID). The folder draft gets only the retired IDs asused_ids.carry_overkeeps what still exists.removal_questions) with Yes, remove. The save is blocked until it is answered, and the removal goes topublish_draft(removals=…)with the reconfirmations it covers, soremovedrecords are written. A replicate whose folders changed (published_answers.reopened) loses only its comparability date and is asked "same way?" again on screen 5; the others keepconfirmed_onbyte for byte. A changed image count is recorded with the save day (recorded_on).Library
published_answers.py,description_review.py.description_candidate.py,description_reopen.py.run.draft_file.publish_draft: takesremovalsandrecorded_on, and writes the derived CSV._base_draft,_resume_pairing,_wanted_ids,_folder_cell,_design_items/_gate_items,_design_for_run.single_notenow says so when only some folders lack the technical-repeat level (it used to claim the whole experiment had none).Tests
tests/test_notebook_check_save.py(13 headless widget tests):removedrecord;tests/test_published_answers.py(9 library tests):publish_draftwrites the CSV only with the description.test_draft_file(publication now also writes the derived CSV, compared byte for byte),test_embedding_api(pinsdescribe,check_save_step,save_experiment),test_notebook_setup(the fake notebook takesdescribe).describemode and the behaviours do not exist there).Gate
python tools/check.py(.[dev,notebook,zarr], Python 3.13) on2a3e2b2's code:# noqa: ANNbaseline shrank from 46 to 45; nothing grown; files ≤600 lines);The last commit (
858f209) changes only the references help wording in described runs, plus one assert. It was checked with ruff, the code rules and the 4 notebook test files (142 passed). CI: see the checks below.Screenshots
Rendered in headless Chromium (Playwright,
deviceScaleFactor2) from the real widget state (ipywidgets.embed) with synthetic structured images: nuclei-like blobs (DNA), fibre-like lines (ACTIN), a cell haze (PHASE), label and region masks; 2 conditions × 2 replicates, one replicate with two technical-repeat folders; plus an all-RGB experiment. Sent to the owner separately (not committed).Open questions for the owner (each with a recommendation)
describedefault. The shipped notebook passesdescribe=True, but the class default isFalse, so embedding bricks and the API keep the v0.4 cards. Recommend: keepFalseuntil the UX re-evaluation, then flip it at v0.5.0.mixed_dtypes,inconsistent_dimensions), so a mixed experiment cannot reach these screens. The screenshots show an all-RGB experiment instead. Also, an all-RGB experiment still needs one label in step A of Your channels (Notebook: your channels (labels first, then tag per unit) (Stage 1, PR 15) #233 behaviour). Recommend: separate issues for both.Fixes nothing by number (Stage 1 notebook PR 16b).
https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Generated by Claude Code