Skip to content

Coverage#107

Merged
Hendrik-code merged 4 commits into
mainfrom
coverage
May 26, 2026
Merged

Coverage#107
Hendrik-code merged 4 commits into
mainfrom
coverage

Conversation

@Hendrik-code
Copy link
Copy Markdown
Owner

No description provided.

Hendrik-code and others added 3 commits May 26, 2026 17:28
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>
Copilot AI review requested due to automatic review settings May 26, 2026 18:11
@Hendrik-code Hendrik-code self-assigned this May 26, 2026
@Hendrik-code Hendrik-code added bug Something isn't working enhancement New feature or request labels May 26, 2026
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 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 into mkdocs.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.

Comment thread docs/modules/stitching.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Hendrik-code Hendrik-code merged commit 1e24731 into main May 26, 2026
5 checks passed
@Hendrik-code Hendrik-code deleted the coverage branch May 26, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants