Skip to content

[TEST] Parquet (§3): parquet→parquet idempotency + FeatureLinker bundle round-trip (#9460) - #9604

Merged
timosachsenberg merged 4 commits into
developfrom
9460-tests-section3-parquet
Jul 3, 2026
Merged

timosachsenberg merged 4 commits into
developfrom
9460-tests-section3-parquet

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Context

Closes the remaining §3 (native Parquet I/O) [AUTO] gaps of the OpenMS 3.6.0 pre-release testing plan (#9460). Tests only.

Changes

Item Test Verified
L137 FeatureMapArrowIO_test — a parquet→parquet content-idempotency section. The existing sections check memory→parquet→memory; this re-exports an imported bundle and re-imports it, asserting the two imported maps are field-identical (features, hulls, subordinates, metavalues, PSMs, protein hits/groups). The run identifier is re-synthesized on every load, so identifier consistency is asserted within each map, not the volatile run-id string across maps. ✅ green
L144 TOPP_FeatureLinkerUnlabeled_parquet* — FeatureLinker reads .featureparquet bundles and writes a .consensusparquet bundle (FileHandler directory dispatch beyond FileConverter). Inputs converted from clean (X-free) featureXML fixtures at test time; output converted back to consensusXML and diffed against a committed reference (289 consensus features; deterministic under -test, transient provenance paths whitelisted). ✅ green

Findings while scoping L144

The issue's own note that the cross-serialization dispatch is "aspirational" is partly correct in the current codebase:

  • MapAligner* is not parquet-wired — its valid -in/-out formats are featureXML/mzML only. A MapAligner parquet cell is not yet possible (would need the tool wired first).
  • IDFilter reads/writes .idparquet bundle→bundle, but the idXML → idparquet write path is rejected ("idparquet is not allowed for storing identifications"), so an IDFilter idXML ↔ idparquet diff cell is not yet possible.
  • The PSM-lane store-side duplicate-identifier assert (L142) already landed on develop (fix(parquet IO): FeatureMap MetaValue + ProteinIdentification identifier parity with XML lane #9400) in PSMArrowIO_test — no new test needed.

So §3's closable gaps are L137 + the FeatureLinker bundle dispatch; the MapAligner/IDFilter items are tool-wiring gaps, not test gaps, and are flagged for follow-up.

Test plan

ctest -R '^FeatureMapArrowIO_test$' and ctest -R TOPP_FeatureLinkerUnlabeled_parquet both pass locally.

Part of #9460 (§3).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added comprehensive idempotency tests for Parquet import/export, verifying field-by-field equality across exported content (including feature, metadata, and peptide/protein identification details).
    • Added CTest coverage for FeatureLinkerUnlabeled Parquet bundle round-trips: converting featureXML to parquet, generating consensus parquet, converting back to consensusXML, and diffing against a reference while accounting for non-deterministic fields.

…dle round-trip (#9460)

Close the remaining §3 (native Parquet I/O) [AUTO] gaps of the OpenMS 3.6.0 pre-release testing
plan (#9460). Tests only.

- L137: FeatureMapArrowIO_test -- a parquet->parquet content-idempotency section. The existing
  sections cover memory->parquet->memory; this re-exports an imported bundle and re-imports it,
  asserting the two imported maps are field-identical (features, hulls, subordinates, metavalues,
  PSMs, protein hits/groups). The run identifier is re-synthesized on every load, so identifier
  consistency is asserted *within* each map, not the volatile run-id string across maps.

- L144: TOPP_FeatureLinkerUnlabeled_parquet -- FeatureLinker reads .featureparquet bundles and
  writes a .consensusparquet bundle (FileHandler directory dispatch beyond FileConverter). Inputs
  are converted from clean (X-free) featureXML fixtures at test time; the output is converted back
  to consensusXML and diffed against a committed reference (289 consensus features; deterministic
  under -test, transient provenance paths whitelisted).

Findings while scoping L144 (the issue's own note that the dispatch is "aspirational" is partly
correct):
- MapAligner* tools are NOT parquet-wired (valid -in/-out formats are featureXML/mzML only), so a
  MapAligner parquet cell is not yet possible.
- IDFilter reads/writes .idparquet bundle->bundle, but the idXML->idparquet write path is rejected
  ("idparquet is not allowed for storing identifications"), so an IDFilter idXML<->idparquet diff
  cell is not yet possible.
- The PSM-lane store-side duplicate-identifier assert (L142) already landed on develop (#9400),
  PSMArrowIO_test.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6c3a4564-7f81-4ea8-94ef-934a39d4c3f0

📥 Commits

Reviewing files that changed from the base of the PR and between 6c5ac41 and 646695b.

📒 Files selected for processing (1)
  • src/tests/class_tests/openms/source/FeatureMapArrowIO_test.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/tests/class_tests/openms/source/FeatureMapArrowIO_test.cpp

📝 Walkthrough

Walkthrough

Two test-only additions expand Parquet serialization coverage: a double-round-trip idempotency test for FeatureMap that asserts field-level equality across two export/import cycles with supporting test reorganization, and a CTest pipeline for FeatureLinkerUnlabeled that converts featureXML inputs to parquet bundles, runs the linker, converts back to consensusXML, and diffs against a reference.

Changes

Parquet Round-Trip Test Coverage

Layer / File(s) Summary
FeatureMap Parquet double-round-trip idempotency test and test reorganization
src/tests/class_tests/openms/source/FeatureMapArrowIO_test.cpp
Reorganizes test section labels and includes, then adds an [EXTRA] idempotency test that exports a FeatureMap to Parquet, imports as fm1, re-exports fm1 to Parquet, imports as fm2, and asserts equality of RT/MZ/intensity/charge/unique_id, subordinate and convex hull counts/coordinates, feature meta-values, peptide hit sequence/score/charge, protein hit/group accession/probability, and internal run identifier consistency. Supporting formatting and assertion refactoring applied throughout existing test cases.
FeatureLinkerUnlabeled CTest parquet pipeline
src/tests/topp/CMakeLists.txt
Adds CTest entries to convert three .featureXML inputs to .featureparquet bundles, run FeatureLinkerUnlabeled to produce a .consensusparquet bundle, convert back to consensusXML, diff against a committed reference with non-deterministic field whitelisting, and wire all steps with explicit DEPENDS ordering.

Possibly related issues

  • Release testing #9460: This PR directly implements the Parquet round-trip idempotency coverage and cross-tool serialization validation (FeatureLinkerUnlabeled) outlined in that issue's release testing plan.

Poem

A rabbit hops through fields of data, round and round,
Exporting features, importing what was found.
FM1 then FM2, the idempotent dance,
ConsensusMaps linked with a parquet lance.
Each RT, MZ, charge confirmed anew—
The tests all pass, and the round-trip rings true! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding Parquet round-trip idempotency tests and FeatureLinker bundle round-trip tests, matching the core objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 9460-tests-section3-parquet

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tests/class_tests/openms/source/FeatureMapArrowIO_test.cpp`:
- Around line 798-823: The test loop validates top-level fields between fm1 and
fm2 but does not compare nested structures, and identifier consistency is only
verified for fm2. Add assertions within the existing loop to compare nested
values between fm1 and fm2 including getConvexHulls() hull points,
getSubordinates() RT/MZ/intensity values, and peptide identification scores.
Additionally, add an identifier consistency check for fm1's peptide
identifications similar to the existing fm2 check to ensure both maps maintain
consistent identifiers across rounds, not just fm2.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d488f93-b412-4f46-8098-cbf037283c07

📥 Commits

Reviewing files that changed from the base of the PR and between 9a206aa and 6c5ac41.

📒 Files selected for processing (3)
  • src/tests/class_tests/openms/source/FeatureMapArrowIO_test.cpp
  • src/tests/topp/CMakeLists.txt
  • src/tests/topp/FeatureLinkerUnlabeled_parquet_output.consensusXML

@timosachsenberg timosachsenberg mentioned this pull request Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Adversarial review result: no blocking issue found in this pass.

Required source cleanup before merge: the added CMake/test comments include tracker references. Please remove those references from source comments and keep the text focused on parquet idempotency and bundle round-trip behavior. I did not run the tests locally.

timosachsenberg and others added 2 commits June 18, 2026 16:35
The run identifier is re-synthesized on every importFromParquet via UniqueIdGenerator::getUniqueId() (XML-lane parity with IdXMLFile), so it is intentionally non-deterministic across independent imports. Comparing fm1 vs fm2 identifiers contradicts the test's own stated intent (assert identifier consistency *within* each map). The intra-map pep-id == prot-id checks (and all content assertions) remain.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.

1 participant