Repository navigation
PP-11b: the notebook's Make named-axis copies card - #127
Merged
Merged
Conversation
Step 2's card under the axis check, shown when it reports axes_yx_swapped, axes_contradict_header, axes_x_before_y or axes_not_named: a required folder for the copies (the command's rule), the user's confirmed roles, the plan from preview_conversion (the command's plan_conversion, moved to conversion_plan), the space, then convert_experiment with a progress bar under the copy folder's lock; refusals and the stale-lock button on the existing cards; afterwards the record and Check the copies in step 1. ConversionResult.unknown_sizes lists the copies whose relabelled sizes are unknown. Hidden with folder_step(show_output=False). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…ween calls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
… the other lock tests Windows cannot tell whether a process runs, so remove_stale_lock leaves the decision to the user. 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 2, 2026 16:32
Conflicts resolved hunk by hunk: - conversion_plan.py: PP-11c's plan_conversion (epoch binding, dtype, _copied) kept as merged; PP-11b's copy_folder_issues, ConversionPreview and preview_conversion added after it, with their imports. - conversion.py: PP-11c's split kept; PP-11b's ConversionResult.unknown_sizes and the call to copy_folder_issues (its _folder_issues removed) applied. - pyproject.toml: PP-11c's layers plus notebook_convert. - AGENTS.md, contract §17, plan §10 and question 59: both PRs' text (PP-11c marked implemented in #126; PP-11b's notebook row replaces "Not yet"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Contributor
Author
|
Independent review: merged as c9a54f3 (merge commit, head 73b3efb). The branch was auto-deleted and has been restored on 73b3efb. Merge of main (#126) into this PR, 73b3efb, no rebase
Checked in the code
I found nothing in this PR that needed fixing. Gate (own worktree, Python 3.12,
§9 figures (src files touched)
Generated by Claude Code |
guijacquemet
pushed a commit
that referenced
this pull request
Nov 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
guijacquemet
pushed a commit
that referenced
this pull request
Nov 2, 2026
No conflicts; plan questions on main end at 59, so 62-64 are renumbered once #128 and #129 land. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
guijacquemet
pushed a commit
that referenced
this pull request
Nov 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
guijacquemet
pushed a commit
that referenced
this pull request
Nov 2, 2026
docs/plan.md: main's PP-11b and PP-11c items first, then this PR's links item; this PR's questions 60 and 61 become 61 and 62, after main's question 60 (OME-Zarr axes and calibration, #129). docs/contract.md: both additions to the error row kept (main's OME-Zarr codes, this PR's link codes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
This was referenced Nov 2, 2026
Links stay inside the experiment and masks folders; --log is checked before it opens (#81, #99)
#128
Merged
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.
PP-11b of the v0.4.0 plan (design v0.4 §5: "the notebook offers conversion only for files with errors"; contract §17; plan §10 and question 59 (15)). Version stays 0.4.0rc3.
Summary (by module)
notebook_convert(ui, new):_ConvertCard, step 2's Make named-axis copies (optional) card. It sits directly under the axis check and is shown only when that check reportsaxes_yx_swapped,axes_contradict_header,axes_x_before_yoraxes_not_namedfor the roles being edited. It is hidden withfolder_step(show_output=False).Roles (nothing guessed). The copies use the roles confirmed with Confirm axis roles. That is only possible when the only finding is
axes_not_named, because the axis errors keep that button disabled. Otherwise they use the roles shown once Yes, the preview looks right and then the card's Yes, write the copies with these roles are pressed. That answer stays disabled until the preview is checked. Any change to a role or to the missing-axes answer takes it back, and the button stays disabled until the roles are confirmed.Folder for the copies. Required, with no default. It can be pasted or chosen with Browse…; when no dialog can open, the card shows the Colab "Copy path" card. It is checked with the command's rule.
What will happen comes from
preview_conversionand reads headers only. It lists the images written as OME-TIFF (with their axis code) and those copied byte for byte (withexcluded), and shows the space needed and the free space. Any error that would stop the conversion, or too little space, keeps the button disabled.Make named-axis copies calls
convert_experimentwith a progress bar. It holds the copy folder's lock and runs the same checks again first. Refusals use the existing cards: the red issue cards, and_LockCardwith Remove the lock of a stopped run, which uses theremove_stale_lockrule. An unexpected exception becomes a red card and its traceback goes to Technical details.After the copies, the card shows:
Check the copies in step 1 sets step 1's experiment folder to the copies and keeps the output folder: an empty box is filled with the originals' default. It then runs the check again. The card also says that Yes, they have a single plane there must be given again (
--missing-as-singletonon the command line). It lists the copies whose relabelled Y/X sizes are unknown, which happens unless the header gave X and Y equal, and says to state them under Pixel sizes in step 1.conversion_plan(orchestration; created by PP-11c PP-11c: conversion integrity (copy SHA-256, metadata epochs, exact CLI sizes) #126, which movedplan_conversionandPlannedCopyhere; this PR adds to it after merging main):copy_folder_issues;convert_experimentcalls the same function.preview_conversion(...)returns aConversionPreviewwith the issues, converted and copied images, needed and free bytes, andearlier_conversion. It writes nothing. It is exported from the package.conversion_plan320 lines,conversion290.conversion:ConversionResult.unknown_sizes(new, read-only) maps each image to the roles whose header sizes the copy does not carry.notebook_output._LockCard: optionalheader,explanationandwho, so the same card can name the folder for the copies. The output folder's defaults are unchanged apart from one help sentence ("…only if you are sure none is going on: …").notebook_ui/notebook_axis_step: the mixin, the card's place inaxis_box, and_refresh_convert_card(review)called from_mapping_changed. No public method was added (the pinned embedding API is unchanged).Independent review: merge of main (#126) into this PR (73b3efb)
Both PRs created
conversion_plan.py, and the conflicts were resolved hunk by hunk:plan_conversionis the PP-11c: conversion integrity (copy SHA-256, metadata epochs, exact CLI sizes) #126 version: epoch binding, the pixel type from the header, and_copied.copy_folder_issues,ConversionPreviewandpreview_conversionare added after it.conversion.pykeeps PP-11c: conversion integrity (copy SHA-256, metadata epochs, exact CLI sizes) #126's split and gets this PR'sunknown_sizesandcopy_folder_issues.pyproject.toml, AGENTS.md, contract §17, plan §10 and question 59 combine both PRs' text.I found nothing in the card itself that needed changing:
preview_conversion.show_output=Falsehides the card.tests/test_embedding_api.pyis unchanged.Gate after the merge: 1799 passed, 1 skipped (
test_discovery.py:665, running as root). The headless nbclient notebook test runs, and ruff andtools/check.py --rulesare clean.Decisions and interpretations (please check)
ConfirmToggle. It is enabled only after the preview check and is reset by any change to a role or to the missing-axes answer. Step 3 stays gated as before, becauseconfirmed_mappingis not set by the card.convert_experimentdecides under the lock.Tests
.[dev,notebook,zarr]):ruff checkandruff format --checkare clean,tools/check.py --rulespasses, and pytest gives 1769 passed, 1 skipped, 1 warning. The skip istest_discovery.py:665, expected as root. The warning is the existing tifffile "closed file" warning intest_planes.py. Main has 1750 passed, 1 skipped.tests/test_notebook_convert.py, at widget level. The notebook-file test also checks the 3 new buttons, an addition only.tests/test_embedding_api.pyis unchanged.src), as doestest_notebook_names_buttons_that_exist. They cover:show_output=False;preview_conversion;preview_conversionmatchingplan_conversion;copy_folder_not_emptyon the card;ZYXfrom the copies' headers, the design is kept, and the run is written withaxes_from: "header"on every file,experiment_root= the copies andconversion_record_sha256= the record's.§9 figures
notebook_convert433,conversion_plan284,tests/test_notebook_convert.py411.conversion455 (was 587),notebook_output249,notebook_axis_step348,notebook_ui483._build_convert_card49,_on_convert33,plan_conversion23 (moved).plan_conversion5 (moved),_plan_html4.preview_conversion, 6.# noqawas added (125 lines carry one on both main and the branch), and C901/PLR0913/PLR0915/ANN pass.Not verified
embed_minimal_htmlvisual check was not done here, since no browser was available.Colab hand-check list
https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Generated by Claude Code