Coverage#107
Merged
Merged
Conversation
Link to the new ReadTheDocs site (https://tptbox.readthedocs.io) from the badge row and a short Documentation section so users landing on GitHub know the full API reference exists. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds three new test files increasing coverage of previously untested code paths in the NII wrapper, numpy utilities, and POI set operations: - test_nii_extended.py: 52 tests covering properties, dtype/copy ops, label manipulation, spatial transforms, smoothing, Euclidean morphology, reorientation, and rescaling. - test_nputils_extended.py: 36 tests covering np_is_empty, np_count_nonzero, np_unique*, np_bounding_boxes, np_contacts, np_region_graph, np_translate_arr, np_compute_surface, np_normalize_to_range, Euclidean erode/dilate, and label overlap. - test_poi_ops.py: 40 tests covering __len__/__contains__/__getitem__/ __setitem__, keys_region/subregion, items_2D/flatten, join_left/right, intersect, subtract, extract_subregion/region, remove, round, apply_all, calculate_distances_cord, and filter_points_inside_shape. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
README.md: insert a Modules table between the Documentation and Install sections linking each sub-package to its own README file. mkdocs.yml: add a Modules nav section (10 pages) and configure pymdownx.snippets base_path so wrappers can include source files from the repo root. docs/modules/: create thin wrapper pages for core, poi_fun, logger, mesh3d, registration, segmentation, spine, snapshot2d, spinestats, and stitching. Nine of them pull content via --8<-- snippets directly from the existing sub-package READMEs; the stitching wrapper is inlined to fix the relative image path to a GitHub raw URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves project quality and discoverability by expanding unit test coverage for key core APIs (POI, np_utils, NII) and by adding a structured “Modules” section to the MkDocs documentation (plus a README documentation badge/link).
Changes:
- Added extended unit tests covering POI accessors/set operations, NumPy utility helpers, and NII label/spatial/morphology workflows.
- Expanded documentation: added ReadTheDocs badge + documentation section in
README.md, and added MkDocs “Modules” pages wired intomkdocs.yml. - Enabled MkDocs snippet includes from repository root via
pymdownx.snippets.base_path.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| unit_tests/test_poi_ops.py | Adds unit tests for POI accessors, set-ops, filtering, and helpers. |
| unit_tests/test_nputils_extended.py | Adds unit tests for TPTBox.core.np_utils utilities (contacts, translate, surface, normalize, morphology). |
| unit_tests/test_nii_extended.py | Adds unit tests for NII properties, label ops, spatial ops, smoothing, and Euclidean morphology. |
| README.md | Adds documentation badge + new “Documentation” and “Modules” sections; small markdown cleanup. |
| mkdocs.yml | Adds Modules navigation section and configures pymdownx.snippets base path. |
| docs/modules/core.md | Includes TPTBox/core/README.md into MkDocs. |
| docs/modules/poi_fun.md | Includes TPTBox/core/poi_fun/README.md into MkDocs. |
| docs/modules/spine.md | Adds a spine module overview page with quick example and links to submodules. |
| docs/modules/snapshot2d.md | Includes TPTBox/spine/snapshot2D/README.md into MkDocs. |
| docs/modules/spinestats.md | Includes TPTBox/spine/spinestats/README.md into MkDocs. |
| docs/modules/registration.md | Includes TPTBox/registration/README.md into MkDocs. |
| docs/modules/segmentation.md | Includes TPTBox/segmentation/README.md into MkDocs. |
| docs/modules/mesh3d.md | Includes TPTBox/mesh3D/README.md into MkDocs. |
| docs/modules/stitching.md | Adds a MkDocs page documenting stitching usage and CLI/API. |
| docs/modules/logger.md | Includes TPTBox/logger/README.md into MkDocs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <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.
No description provided.