Skip to content

chore(tests): bump he-tme to 2.0.0 and refresh expected results - #722

Merged
blanca-pablos merged 5 commits into
mainfrom
chore/he-tme-2.0.0-bump
Sep 24, 2026
Merged

blanca-pablos merged 5 commits into
mainfrom
chore/he-tme-2.0.0-bump

Conversation

@ari-nz

@ari-nz ari-nz commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Points the e2e test constants at he-tme 2.0.0 and refreshes the expected run output.

Changes

  • HETA_APPLICATION_VERSION 1.3.0 -> 2.0.0 in both the production and staging arms.
  • Both SPOT_*_EXPECTED_RESULT_FILES lists rebuilt from real 2.0.0 output: 13 artifacts, up from 12. The csv_class_information CSVs and the cell_readouts/slide_readouts CSVs are gone; whole_tumor_region_*, tumor_cellularity_* and readout_generation_readouts_bundle.zip are new. The readouts CSVs now travel inside that ZIP.
  • SPOT_0_EXPECTED_CELLS_CLASSIFIED 39798 -> 11447.
  • mime_type_to_file_ending learns application/zip. Without it, downloading the new bundle raises ValueError: Unknown mime type: application/zip.

Watch out

  • The cell count for SPOT_0 falls by two thirds. Confirmed twice against the same run — polygon count in cell_classification_geojson_polygons.json and row count in the bundle's cell_stats.csv. Worth a second opinion on whether 2.0.0 is meant to classify that many fewer cells.
  • These tests are e2e + long_running/very_long_running, so they are deselected unless invoked with an explicit -m. The comment block above the constants now spells out the full command.
  • Sizes keep the existing 10% tolerance. tumor_cellularity_geojson_polygons.json is only a few hundred bytes for SPOT_0, so that one is tight in absolute terms.

@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
src/aignostics/platform/_utils.py 64.58% <100.00%> (+0.75%) ⬆️

... and 7 files with indirect coverage changes

@ari-nz ari-nz changed the title chore(tests): bump he-tme to 2.0.0 chore(tests): bump he-tme to 2.0.0 and refresh expected results Sep 22, 2026
@blanca-pablos
blanca-pablos marked this pull request as ready for review September 24, 2026 12:29
@blanca-pablos
blanca-pablos requested a review from a team as a code owner September 24, 2026 12:29
@claude

claude Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

PR Review Complete ✅

Reviewing PR #722: chore(tests): bump he-tme to 2.0.0 and refresh expected results


Review Summary

This PR updates e2e test constants to track the he-tme application version 2.0.0 release, refreshes expected output artifacts, and adds support for the new application/zip mime type. All critical checks pass.

✅ Critical Checks — All Passing

  • Test Markers: New test properly marked with @pytest.mark.unit ✅
  • Linting: All checks pass (ruff, pyright, mypy) ✅
  • Commit Messages: All follow conventional commit format ✅
  • Test Coverage: Initially 0% (test added 2 days after fix), now covered ✅
  • Architecture Compliance: Changes follow existing patterns ✅

Detailed Findings

1. Mime Type Support (GOOD ✅)

File: src/aignostics/platform/_utils.py (lines 84-85)

if mime_type == "application/zip":
    return ".zip"

Test: tests/aignostics/platform/utils_test.py (lines 232-240)

  • Properly marked with @pytest.mark.unit ✅
  • Follows existing test pattern ✅
  • Has record_property("tested-item-id", "SPEC-PLATFORM-SERVICE") for traceability ✅
  • Test passes locally ✅

Coverage Note: The codecov comment (2026-09-22 09:20) predates the test commit (2026-09-24 14:28). The coverage issue was real at the time but has since been resolved. This is not a blocker.

2. Version Bump (GOOD ✅)

Changes: tests/constants_test.py

  • HETA_APPLICATION_VERSION: 1.3.0 → 2.0.0 (lines 117, 132)
  • Applied consistently to both production and staging environments ✅

3. Expected Results Update (GOOD ✅)

Artifacts: 12 → 13 files

Removed (old 1.3.0 outputs):

  • tissue_qc_csv_class_information.csv
  • tissue_segmentation_csv_class_information.csv
  • readout_generation_cell_readouts.csv
  • readout_generation_slide_readouts.csv

Added (new 2.0.0 outputs):

  • whole_tumor_region_geojson_polygons.json
  • whole_tumor_region_parquet_polygons.parquet
  • tumor_cellularity_geojson_polygons.json
  • tumor_cellularity_parquet_polygons.parquet
  • readout_generation_readouts_bundle.zip ← New bundle consolidates readout CSVs

Cell Count Change: SPOT_0_EXPECTED_CELLS_CLASSIFIED drops from 39798 → 11447 (71% decrease)

  • PR description acknowledges this and states it was "confirmed twice"
  • Matches polygon count in cell_classification_geojson_polygons.json
  • Matches row count in bundle's cell_stats.csv
  • ⚠️ Worth confirming this is expected he-tme 2.0.0 behavior (PR author already flagged this)

File Size Tolerance: 10% maintained for all files ✅

4. Test Documentation (EXCELLENT ✅)

File: tests/constants_test.py (lines 67-71)

Improved comments now include:

  • Clear explanation that these are e2e tests
  • Full command with correct markers: -m "e2e and long_running"
  • Note about silent skipping without markers

This addresses a common pitfall where tests appear to pass but actually didn't run.

5. Commit Quality (EXCELLENT ✅)

All commits follow conventional commit format:

a05dddc chore(tests): bump he-tme to 2.0.0
cd6f5f4 fix(platform): map application/zip to .zip for downloaded artifacts
c3fe66e chore(tests): refresh expected he-tme results for 2.0.0
16be5ba test(platform): cover application/zip mime type mapping

Logical progression: version bump → fix → refresh results → add test coverage.


Security & Medical Device Compliance

✅ No sensitive data: Constants reference public test slides in GCS
✅ No breaking changes: Only test constants and mime type mapping
✅ Medical data handling: Changes only affect test validation, not production data processing
✅ No authentication changes: All auth patterns remain unchanged


CI/CD Impact

Test Selection: These changes affect tests marked:

  • e2e + long_running (SPOT_0 test)
  • e2e + very_long_running (SPOT_1 test)

PR CI Behavior:

  • Long-running tests are skipped by default in PR CI
  • Add label skip:test:long_running to explicitly skip (recommended per CLAUDE.md)
  • Very long running only runs when explicitly enabled

Recommendation: Add the skip:test:long_running label to this PR to avoid unnecessary CI wait time, since this is test maintenance and the local validation has been done.


Suggestions (Non-blocking)

1. Consider Adding a Note About he-tme 2.0.0 Changes

If there's a changelog or release notes for he-tme 2.0.0, consider linking it in the PR description so future readers understand why the output structure changed so significantly.

2. Cell Count Validation

Since the cell count drop is flagged in the PR description as "worth a second opinion", consider:

  • Running one more validation against a different slide to confirm the behavior
  • Checking with the he-tme team if this is documented in their 2.0.0 release notes

3. PR Label

Add skip:test:long_running label to optimize CI runtime (per .github/CLAUDE.md):

gh pr edit 722 --add-label "skip:test:long_running"

Verdict

All critical checks pass. This is clean test maintenance following an application version upgrade. The mime type addition is properly tested and the expected results have been refreshed from real runs.

The cell count drop is significant but has been acknowledged and validated by the PR author. If there's any doubt about whether this is expected behavior, I recommend confirming with the he-tme team before merging.

Verdict: ✅ claude:review:passed


View job run

@claude claude Bot added the claude:review:passed Automated Claude PR review found no blocking issues on the current head commit label Sep 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@blanca-pablos
blanca-pablos merged commit 761205f into main Sep 24, 2026
31 of 32 checks passed
@blanca-pablos
blanca-pablos deleted the chore/he-tme-2.0.0-bump branch September 24, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude:review:passed Automated Claude PR review found no blocking issues on the current head commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants