Skip to content

Minor maintenance fixes to FastSurfer#804

Open
dkuegler wants to merge 15 commits intoDeep-MI:devfrom
dkuegler:fix/formatting-print
Open

Minor maintenance fixes to FastSurfer#804
dkuegler wants to merge 15 commits intoDeep-MI:devfrom
dkuegler:fix/formatting-print

Conversation

@dkuegler
Copy link
Copy Markdown
Member

  • Move FreeSurfer license autodetection into a separate function, so it can also be used in srun_fastsurfer.sh.
  • Cleanup and fix of redundant and leftover logging
  • Cleanup of ignorefiles: dockerignore and gitignore
  • Fix of Formatting
  • Fix various ty typing errors

Overall, this PR does not add a feature, but brings together smaller fixes and cleanups that have piled up over time.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh and 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.

Comment thread stools.sh
Comment thread FastSurferCNN/version.py Outdated
Comment thread recon_surf/functions.sh Outdated
Comment thread CerebNet/data_loader/dataset.py
Comment thread FastSurferCNN/utils/common.py Outdated
Comment thread FastSurferCNN/utils/common.py Outdated
Comment thread FastSurferCNN/utils/common.py Outdated
Comment thread FastSurferCNN/utils/common.py Outdated
Comment thread tools/Docker/build.py Outdated
Comment thread tools/Docker/build.py Outdated
@dkuegler dkuegler force-pushed the fix/formatting-print branch from f87d4f7 to 609d558 Compare April 24, 2026 11:19
- 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
@dkuegler dkuegler force-pushed the fix/formatting-print branch from 609d558 to 807caf4 Compare April 24, 2026 11:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants