Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

The PR introduced abstract base classes (CellMapBaseDataset, CellMapImageBase) and refactored core components, but Codecov reported 53.33% patch coverage with 224 missing lines across key files.

Changes

New test suites (72 tests):

  • test_base_classes.py - Validates ABC contract enforcement: instantiation failures for incomplete implementations, successful instantiation with all abstract methods implemented, type annotation verification

  • test_subdataset.py - Previously untested CellMapSubset class: property delegation to parent dataset, device transfers, transform setters, random sampling with/without replacement, edge cases (empty/single-index subsets)

  • test_dataset_edge_cases.py - Special methods and properties in CellMapDataset: pickling (__reduce__), executor lifecycle (__del__, lazy init, fork handling), property getters (center, bounding boxes, sampling shapes), negative/out-of-bounds index handling

  • test_image_edge_cases.py - Edge cases in CellMapImage: axis/scale/shape mismatch handling, device selection logic, spatial transforms, property getters, pad/interpolation parameters

Coverage targets

Focused on files with most missing coverage from Codecov report:

  • base_dataset.py (6 lines) - ABC contract tests
  • base_image.py (6 lines) - ABC contract tests
  • subdataset.py (untested) - Full coverage
  • dataset.py (91 lines) - Special methods, properties, edge cases
  • image.py (17 lines) - Device handling, transforms, properties

All 255 tests passing.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits November 27, 2025 01:16
Co-authored-by: rhoadesScholar <37990507+rhoadesScholar@users.noreply.github.com>
Co-authored-by: rhoadesScholar <37990507+rhoadesScholar@users.noreply.github.com>
Co-authored-by: rhoadesScholar <37990507+rhoadesScholar@users.noreply.github.com>
Co-authored-by: rhoadesScholar <37990507+rhoadesScholar@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor test suite to use real implementations Add comprehensive test coverage for base classes and refactored components Nov 27, 2025
Copilot AI requested a review from rhoadesScholar November 27, 2025 01:27
@rhoadesScholar rhoadesScholar marked this pull request as ready for review December 1, 2025 20:49
@rhoadesScholar rhoadesScholar merged commit ab15ad7 into feature/base-classes Dec 1, 2025
@rhoadesScholar rhoadesScholar deleted the copilot/sub-pr-51 branch December 1, 2025 20:50
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.

2 participants