Skip to content

CLI wording: help, next steps and refusals (v0.10.1 review) - #627

Merged
guijacquemet merged 1 commit into
integration/v0.10.1from
docs/cli-wording-v0.10.1
Dec 4, 2026
Merged

guijacquemet merged 1 commit into
integration/v0.10.1from
docs/cli-wording-v0.10.1

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Summary (by module)

  • cli.py, cli_describe.py, cli_run.py, cli_calibrate.py, cli_convert.py, cli_declare_masks.py, cli_tissue_mask.py, cli_masks.py: each subcommand now has a description and examples in --help, and the option help is rewritten. Success lines say what was saved and where, then print the next commands with the user's options, shell-quoted.
  • cli_run_options.py, cli_describe_options.py (new, ui): the option definitions moved out of cli_run.py and cli_describe.py to stay under the 600-line limit. parse_size and add_describe_parser are re-exported, so existing imports still work.
  • Refusal texts in required_description, fast_answers, describe_questions, describe_ids, mask_declare, ignored_masks, description_run_text, run/preflight, he_tissue_mask, tissue_masks_folder, projection_issues, conversion_issues and run_inputs_text: each says what was refused, why, and what to do. Commands sit on their own lines.
  • report.py, mask_text.py, run_inputs_tissue.py: the wording of the stopped-run, mask-property and tie texts.
  • README, docs/user_guide.md: the complete workflow (describe, publish, check, run), both masks-folder layouts, plane_histograms.parquet, pinned install lines, and the §8 entries that matched the old messages.
  • CHANGELOG: a "Changed" entry under v0.10.1.

Decisions

  • Issue codes, severities and output paths are unchanged; only wording changed.
  • The numpy.swapaxes text was kept because docs/contract.md fixes it.
  • R_FAST_LAYOUT_CONTRADICTION still names channels_from = "unit", as experiment-v1 §8 requires.
  • In the interim, the zarr install line pins the installed version (v0.10.0).

Notes for review

  • physical_issues(output_folder=...) is not yet passed from cli.py or run/description_run.py, so those commands still say OUTPUT.
  • The install lines pinned to @v0.10.1 fail until that tag exists.
  • convert --help now lists --store, --memory-limit and --remove-stale-lock after the projection options.

Tests

Only targeted tests were run here. The full suite and release gates are left to the owner's local session.

  • About 50 changed test files plus the CLI, notebook, report and doc tests: 670 passed and 1 skipped.
  • 3 failed before the last fixes:
    • test_cli_convert_mask: a wrong assertion edit, now reverted (passes).
    • The two test_a_non_editable_install… tests in test_he_tissue_mask.py and test_he_tissue_array.py: they need a non-editable install and fail under PYTHONPATH=src. The first was confirmed to fail the same way with these changes stashed.
  • ruff check / ruff format --check: clean. tools/check.py --rules: no new violations.

Plan: PR2 (behaviour, next, separate branch from integration/v0.10.1)

  1. convert refuses --axes that contradict an RGB header.
  2. check validates what run validates (apart from pixels) and reuses the recorded masks and exclusions.
  3. describe --publish exits 1 when a header contradicts the description.
  4. Refuse options that would change an existing description.
  5. declare-masks --type and --ignore become atomic.
  6. tissue-mask checks its prerequisites first.
  7. The non-comparable refusal points to the notebook.

Each change comes with tests.


Generated by Claude Code

… README

Every subcommand gets a description and examples; success lines say what
was saved and print the next commands with the user's options (quoted);
refusals say what, why and what to do. Codes, severities and paths are
unchanged. README and user guide follow the complete workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
@guijacquemet
guijacquemet merged commit 174721c into integration/v0.10.1 Dec 4, 2026
2 of 3 checks passed
guijacquemet pushed a commit that referenced this pull request Dec 4, 2026
Conflicts with #627's wording resolved: cli.py and cli_describe.py keep
both sides' new functions; tissue-mask checks its prerequisites before
creating the masks folder and keeps #627's created flag; the
comparability refusal keeps #627's sentence and #628's pointer to the
Check and save card; the user guide keeps #627's text and says check
reuses the earlier run's exclusions and masks folder.

Follow-ups of the merge: describe_command's ignored-option refusals moved
to _ignored_options (C901); check_ignore wraps an unreadable ignore list
with unreadable_fix, as ignore_masks does, so the early refusal keeps the
recovery text; the header-rewrite test expects #627's message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
guijacquemet pushed a commit that referenced this pull request Dec 4, 2026
- describe_ids.REASONS and description_run_text._MEANINGS keyed by the
  Code / Refusal constants of description_rules, not code strings, and
  _meaning reads a code's family instead of matching code prefixes: the
  Spec's "no second copy of the rules" scan (test_spec_no_fallback)
  allows code tables only in description_rules.py.
- test_description_write_types and test_calibrate_containment expect the
  new wording ("of type numpy.bool, E_TYPE)", "Calibration saved to").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guijacquemet
guijacquemet deleted the docs/cli-wording-v0.10.1 branch December 4, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants