Skip to content

[TEST] Add OpenSwathParquetExporter_test (feature/transition score Parquet export) - #9571

Closed
timosachsenberg wants to merge 3 commits into
OpenMS:developfrom
timosachsenberg:test/openswath-parquet-exporter
Closed

timosachsenberg wants to merge 3 commits into
OpenMS:developfrom
timosachsenberg:test/openswath-parquet-exporter

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Context

Part of the OpenMS 3.6.0 pre-release testing plan (#9460), §3 (native Parquet I/O) + §4 (OpenSwathWorkflow).

OpenSwathParquetExporter — the 3.6 native-Parquet exporter for OpenSWATH feature- and transition-level score tables — had no test file.

Change

Adds a class test for both write methods. Each builds a small score table, writes it to a Parquet file, reads it back via ParquetFile, and verifies the round-tripped key columns:

  • writeFeatureScores: FEATURE_ID, PROTEIN_ACCESSION, MODIFIED_SEQUENCE, PRECURSOR_MZ and EXP_RT survive the round-trip for two rows;
  • writeTransitionScores: TRANSITION_ID, PRODUCT_MZ, ANNOTATION and the per-row TRANSITION_DECOY flag survive, and an empty table is accepted and produces a valid 0-row (schema-only) file.

Notes

  • New test registered in executables.cmake (swath_executables_list, under NOT DISABLE_OPENSWATH).
  • Tests only — no production code changes.
  • Column names/values were probed against the built library before pinning.
  • Builds and passes locally; both public methods have a section (no untested-method warnings); all assertions execute against real values (verbose-confirmed).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added comprehensive unit tests for OpenSwathParquetExporter, verifying round-trip correctness when exporting feature and transition scores to Parquet files.
    • Tests validate correct data type handling, boolean flags, and empty data scenarios.

…rquet export)

OpenSwathParquetExporter - the 3.6 native-Parquet exporter for OpenSWATH
feature- and transition-level score tables - had no test.

Adds a class test for both write methods that builds a small score table,
writes it to a Parquet file, reads it back via ParquetFile, and verifies the
round-tripped key columns:
- writeFeatureScores: FEATURE_ID, PROTEIN_ACCESSION, MODIFIED_SEQUENCE,
  PRECURSOR_MZ and EXP_RT survive the round-trip for two rows;
- writeTransitionScores: TRANSITION_ID, PRODUCT_MZ, ANNOTATION and the
  per-row TRANSITION_DECOY flag survive, and an empty table is accepted and
  produces a valid 0-row (schema-only) file.

Registered in executables.cmake (swath_executables_list, under
NOT DISABLE_OPENSWATH). Part of the OpenMS 3.6.0 pre-release testing plan
(OpenMS#9460). Tests only; no production code changes.

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

coderabbitai Bot commented Jun 15, 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: 832209fd-40c5-466f-81c2-93dd639bfe80

📥 Commits

Reviewing files that changed from the base of the PR and between 00cd0df and 7c0b330.

📒 Files selected for processing (3)
  • src/tests/class_tests/openms/CMakeLists.txt
  • src/tests/class_tests/openms/executables.cmake
  • src/tests/class_tests/openms/source/OpenSwathParquetExporter_test.cpp

📝 Walkthrough

Walkthrough

Adds a new unit test file OpenSwathParquetExporter_test.cpp covering writeFeatureScores and writeTransitionScores via Parquet round-trips. The test is registered in executables.cmake under the OpenSWATH guard and linked against Arrow/Parquet targets in CMakeLists.txt.

Changes

OpenSwathParquetExporter Test Addition

Layer / File(s) Summary
writeFeatureScores and writeTransitionScores test cases
src/tests/class_tests/openms/source/OpenSwathParquetExporter_test.cpp
New test file with includes and namespace setup, two test sections for writeFeatureScores and writeTransitionScores asserting round-trip correctness of int64/string/double/boolean columns and zero-row output for empty tables.
CMake registration and Arrow/Parquet linking
src/tests/class_tests/openms/executables.cmake, src/tests/class_tests/openms/CMakeLists.txt
Appends OpenSwathParquetExporter_test to swath_executables_list under NOT DISABLE_OPENSWATH, and conditionally links the test target against ${OPENMS_ARROW_TARGET} and ${OPENMS_PARQUET_TARGET}.

Poem

A rabbit hops through Parquet rows,
Checking scores where the data flows,
Feature and transition, round they go,
Arrow and CMake lined up just so,
Zero rows? Still correct — the test shows! 🐇✨

🚥 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 clearly summarizes the main change: adding a test file for OpenSwathParquetExporter with coverage of both feature and transition score Parquet export functionality.
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 unit tests (beta)
  • Create PR with unit tests

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.

@github-actions

Copy link
Copy Markdown
Contributor

@timosachsenberg The following names might be missing from the AUTHORS file:

  • Timo Sachsenberg

Please consider applying the following patch:

--- AUTHORS	2026-06-16 01:47:30.934932520 +0000
+++ AUTHORS.new	2026-06-16 01:47:35.788692925 +0000
@@ -23,8 +23,8 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

Copy link
Copy Markdown
Contributor Author

Adversarial review result:

I did not find a blocking issue in this pass. This is a test-only addition for OpenSwathParquetExporter; the added CMake link block covers Arrow/Parquet and the tests read back the written files. I did not find tracker references in source comments. I did not run the tests locally.

@timosachsenberg
timosachsenberg requested a review from singjc June 18, 2026 07:11
# Conflicts:
#	src/tests/class_tests/openms/CMakeLists.txt

@singjc singjc 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.

LGTM!

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

merged as #9681,

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