Add missing files to the documentation#792
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request addresses missing documentation for several Python modules in FastSurfer, improving the Sphinx documentation build and adding comprehensive docstrings to the brainvolstats module. The changes were motivated by issue #790, which highlighted the need to reference functions in brainvolstats from the documentation.
Changes:
- Added missing module references to Sphinx documentation configuration files for
recon_surf,HypVINN.utils,FastSurferCNN.utils,FastSurferCNN,FastSurferCNN.models,CorpusCallosum.shape, andCorpusCallosum.data - Fixed documentation filename references (corrected
CerebNet.dataloadertoCerebNet.data_loader) - Added comprehensive docstrings to
brainvolstats.py, including detailed parameter descriptions, return types, and cross-references - Improved docstrings across multiple modules with better type annotations and formatting consistency
- Renamed
with_headerparameter toreturn_headerinreadITKimagefunction and updated all call sites - Fixed import statement in
generate_fsaverage_centroids.pyto use proper module path
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| doc/api/recon_surf.rst | Added missing modules: image_io, long_compat_segmentHA, spherically_project |
| doc/api/index.rst | Fixed typo: CerebNet.dataloader → CerebNet.data_loader |
| doc/api/HypVINN.utils.rst | Added missing utility modules to documentation |
| doc/api/FastSurferCNN.utils.rst | Added brainvolstats and dataclasses to utils documentation |
| doc/api/FastSurferCNN.rst | Added missing top-level modules (mri_brainvol_stats, mri_segstats, run_model, train) |
| doc/api/FastSurferCNN.models.rst | Added optimizer module |
| doc/api/CorpusCallosum.shape.rst | Reordered and added missing shape module entries |
| doc/api/CorpusCallosum.data.rst | Added generate_fsaverage_centroids module |
| doc/api/CerebNet.data_loader.rst | Fixed header from dataloader to data_loader |
| recon_surf/spherically_project.py | Improved docstring formatting and consistency |
| recon_surf/image_io.py | Enhanced type hints, renamed parameter, improved docstrings |
| recon_surf/align_seg.py | Updated function calls to use renamed parameter |
| recon_surf/N4_bias_correct.py | Updated function calls to use renamed parameter |
| HypVINN/utils/visualization_utils.py | Added update_docstring decorator for dynamic default documentation |
| HypVINN/utils/load_config.py | Minor docstring formatting fix |
| HypVINN/utils/img_processing_utils.py | Minor docstring formatting improvement |
| FastSurferCNN/utils/dataclasses.py | Improved docstring cross-references and formatting |
| FastSurferCNN/utils/brainvolstats.py | Extensive docstring additions for all classes and methods |
| FastSurferCNN/train.py | Clarified return value documentation |
| CorpusCallosum/data/generate_fsaverage_centroids.py | Fixed import statement to use full module path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
in my actions I moved to python 3.13, also in build matrix I now do 3.10 , 3.11, 3.12 and 3.13 (dropping 3.9). And remove |
|
Don't really need to test different versions to build the documentation... But I think we might want to move to UV in actions as well, I'll let copilot work on that tomorrow... |
…invalid docstrings in python 3.10. - Address github copilot review comments.
3781c40 to
aee4d90
Compare
The documentation had a couple of files missing, specifically I became aware of this in #790, when I wanted to point to a function in
brainvolstats. This PR adds missing python files to the sphinx documentation, fixes their docstrings so the documentation builds and finally adds missing or incomplete docstrings inbrainvolstats.