Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates a set of maintenance updates across the FastSurfer codebase, spanning Docker build tooling, shell entrypoints, docs, and a broad set of Python typing/logging cleanups.
Changes:
- Refactors FreeSurfer license auto-detection into a reusable shell helper and wires it into
run_fastsurfer.shand SLURM tooling. - Improves Docker build metadata/tagging and adjusts locale handling in the Docker image.
- Performs widespread typing/logging/formatting cleanups across FastSurferCNN, HypVINN, CerebNet, and CorpusCallosum modules.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Docker/build.py | Updates dry-run printing, adds repository URL detection, tweaks image tag/build args. |
| tools/Docker/Dockerfile | Adjusts locale generation/install and environment variables. |
| stools.sh | Reuses recon-surf helper to auto-detect FreeSurfer license for SLURM scripts. |
| run_fastsurfer.sh | Replaces inline FS license checks with auto_detect_fs_license. |
| recon_surf/recon-surf.sh | Minor user-facing error message reflow. |
| recon_surf/functions.sh | Adds auto_detect_fs_license helper and tweaks command logging/spelling. |
| pyproject.toml | Adds ty to the style extra. |
| doc/overview/SINGULARITY.md | Adds a new “Common problems” warning explanation and adjusts formatting. |
| HypVINN/utils/img_processing_utils.py | Updates typing and orientation logging via aff2axcodes. |
| HypVINN/data_loader/data_utils.py | Tightens dtype/shape typing and minor array casting changes. |
| FastSurferCNN/version.py | Typing-oriented refactors and build-file parsing tweaks. |
| FastSurferCNN/utils/common.py | Path/typing tweaks and docstring formatting changes. |
| FastSurferCNN/utils/brainvolstats.py | Typing hardening, input validation for masking helpers, and internal refactors. |
| FastSurferCNN/utils/init.py | Reworks exported typing aliases and adds check_literal_type. |
| FastSurferCNN/segstats.py | Switches user output from print to logger. |
| FastSurferCNN/run_prediction.py | Typing cleanups and small refactors in config handling and tensor initialization. |
| FastSurferCNN/quick_qc.py | Migrates CLI parsing to argparse and replaces prints with structured logging. |
| FastSurferCNN/data_loader/data_utils.py | Adds stronger typing, minor safety checks, and LUT parsing refactor. |
| CorpusCallosum/utils/visualization.py | Replaces removed noop context with nullcontext for backend switching. |
| CorpusCallosum/utils/mapping_helpers.py | Updates matrix typing alias usage for nodding correction. |
| CorpusCallosum/paint_cc_into_pred.py | Removes leftover debug prints. |
| CorpusCallosum/data/read_write.py | Updates header typing alias for Mdc matrix. |
| CerebNet/data_loader/dataset.py | Typing additions/refactors and sample dict construction changes. |
| .gitignore | Ignores /tools/debug-helpers. |
| .dockerignore | Refines docker build context ignores (venv, docs, tooling, lockfiles, etc.). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d40f11f to
f87d4f7
Compare
…bugfix to the property SubjectDirectory.asegdkt_segfile
Use this function in srun_fastsurfer and run_fastsurfer.sh
f87d4f7 to
609d558
Compare
- make quick_qc.py follow the general formatting style - add ty into style extra (pyproject.toml) - Make brainvolstats satisfy ty typing rules
Add en_US.UTF-8 and C.UTF-8 to fix locale warnings. Update Singularity doc (workdir warning). Fix sep=>end argument in build.py's print statements on --print. Fix the default tag of the docker image, if no tag name is given (added v) and the --tag_dev default (<DEVICE>-dev instead of dev<DEVICE>-)
Formatting Cleanup
Fix formatting
609d558 to
807caf4
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
srun_fastsurfer.sh.Overall, this PR does not add a feature, but brings together smaller fixes and cleanups that have piled up over time.