validate & status: pre-flight checks and a dataset progress report#60
Merged
Conversation
…ders `validate config.yml` checks setup before a run: - seg_dir exists (error) and tomo_dir exists (warning only -- tomograms are needed only for density sampling, thickness, and refinement); - each segmentation has a matching tomogram under the pipeline's prefix convention (the tomogram name is a prefix of the segmentation name), so a name mismatch shows up here rather than as a silently skipped tomogram later; - which configured segmentation_values labels actually appear in each segmentation, flagging segmentations where none of them appear or where an unmapped label value is present. Exits non-zero on errors; warnings do not fail. Registered as a Setup subcommand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds the reverse (tomogram -> segmentation) direction: a Tomograms section warns about any tomogram whose name does not prefix any segmentation, catching name mismatches from the other side. Test added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ntation
`status config.yml` scans the work_dir and prints, per segmentation and surface,
which steps have run -- mesh, curvature, refinement (and the accepted iteration),
and which self/inter distances, verticality, and thickness measurements exist. It
is fully derived from the artifacts on disk and the per-surface CSV column headers,
so it always reflects reality with no separate state to maintain. --output also
writes the summary to a text file.
The one non-derivable piece -- which refinement iteration was accepted -- is now
recorded by accept_refinement as a one-line {surface}.accepted_iter marker; without
it (older datasets) status reports "accepted (step unknown)" from the .orig.bak
backups.
Co-Authored-By: Claude Opus 4.8 <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.
Two read-only utility commands for setting up and tracking a dataset.
morphometrics validate config.ymlPre-flights a config + folder setup before a run:
seg_direxists (error) andtomo_direxists (warning only — tomograms are needed only for density sampling, thickness, and refinement);segmentation_valueslabels actually appear in each segmentation (flags segmentations where none appear, or where an unmapped label value is present).Exits non-zero on errors; warnings do not fail. Label scan reads slice-by-slice via mmap (~0.6 s for a 1000×1000×200 segmentation).
morphometrics status config.ymlPrints a per-segmentation, per-surface summary of what has been computed — mesh, curvature, refinement (and the accepted iteration), and which self/inter distances, verticality, and thickness measurements exist. Everything is derived from the files in
work_dirand the per-surface CSV column headers, so it always reflects reality with no state to maintain.--output PATHalso writes the summary to a text file.The one non-derivable piece — which refinement iteration was accepted — is now recorded by
accept_refinementas a one-line{surface}.accepted_itermarker; older datasets without it reportaccepted (step unknown)from the.orig.bakbackups.Notes
--help.main(commit d423a8e) ahead of this merge.🤖 Generated with Claude Code