Skip to content

[TEST] Add OpenSwathResultsExporter_test (flat per-feature result export) - #9572

Merged
timosachsenberg merged 5 commits into
OpenMS:developfrom
timosachsenberg:test/openswath-results-exporter
Jul 16, 2026
Merged

timosachsenberg merged 5 commits into
OpenMS:developfrom
timosachsenberg:test/openswath-results-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), §4 (OpenSwathWorkflow). Completes the OpenSWATH exporter test trio alongside #9564 (matrix) and #9571 (parquet score tables).

OpenSwathResultsExporter — the 3.6 flat per-feature OpenSWATH result writer (TSV / Parquet) — had no test file.

Change

Adds a class test for write() exercising both output formats from the same rows:

  • TSV: the header column layout (run_id, feature_id, transition_group_id, Sequence, RT, …) is pinned and the data rows map to the populated fields;
  • Parquet: the file reads back via ParquetFile with the expected row count and the same column names carrying the round-tripped values (feature_id, Sequence, transition_group_id).

Notes

  • New test registered in executables.cmake (swath_executables_list, under NOT DISABLE_OPENSWATH).
  • Tests only — no production code changes.
  • The TSV header and parquet schema were probed against the built library before pinning.
  • Builds and passes locally; the single public method has a section (no untested-method warnings); all assertions execute against real values (verbose-confirmed).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added a new unit test suite for OpenSwath results exporting, validating both TSV and Parquet outputs (including column headers, field mappings, and written Parquet row/values).
    • Ensured the new exporter test is included in the executable test run when OpenSwath is enabled, with the required Arrow/Parquet linkage.

…ort)

OpenSwathResultsExporter - the 3.6 flat per-feature OpenSWATH result writer
(TSV / Parquet) - had no test.

Adds a class test for write() exercising both output formats from the same
rows:
- TSV: the header column layout (run_id, feature_id, transition_group_id,
  Sequence, RT, ...) is pinned and the data rows map to the populated fields;
- Parquet: the file reads back via ParquetFile with the expected row count and
  the same column names carrying the round-tripped values (feature_id,
  Sequence, transition_group_id).

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: d5801398-4c84-4f56-aec7-d193a1dfb81c

📥 Commits

Reviewing files that changed from the base of the PR and between 4213f53 and f256bd1.

📒 Files selected for processing (2)
  • src/tests/class_tests/openms/CMakeLists.txt
  • src/tests/class_tests/openms/executables.cmake
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/tests/class_tests/openms/executables.cmake

📝 Walkthrough

Walkthrough

A new C++ unit test file is added for OpenSwathResultsExporter, covering its write method in both TSV and Parquet output modes using synthetic OpenSwathExportRow data. The test executable is registered in the CMake test registry with conditional Arrow and Parquet library linkage.

Changes

OpenSwathResultsExporter Test Suite

Layer / File(s) Summary
Test helper and write validation (TSV + Parquet)
src/tests/class_tests/openms/source/OpenSwathResultsExporter_test.cpp
Defines a mkRow helper populating OpenSwathExportRow with fixed metadata. The write test section validates TSV output by parsing header and data rows as tab-separated fields (asserting column names, run/feature/sequence/RT values), then validates Parquet output by reading the written file back through ParquetFile and asserting row count and selected column values.
CMake test executable registration and linking
src/tests/class_tests/openms/CMakeLists.txt, src/tests/class_tests/openms/executables.cmake
CMakeLists.txt adds conditional linkage of OpenSwathResultsExporter_test against Arrow and Parquet libraries via ${OPENMS_ARROW_TARGET} and ${OPENMS_PARQUET_TARGET}. executables.cmake registers the test executable in swath_executables_list under the NOT DISABLE_OPENSWATH conditional.

Poem

A rabbit hops through rows of data neat,
TSV and Parquet—two formats to beat!
mkRow conjures fields with a flick of a paw,
Header columns checked without a flaw.
The CMake list grows by one little line—
🐇 Now every test suite hops right on time!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a test file for OpenSwathResultsExporter with focus on flat per-feature result export functionality.
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:44.445306402 +0000
+++ AUTHORS.new	2026-06-16 01:47:49.414033126 +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 OpenSwathResultsExporter; the added CMake link block covers the Arrow/Parquet dependency and the assertions check both TSV and Parquet paths. I did not find tracker references in source comments. I did not run the tests locally.

# Conflicts:
#	src/tests/class_tests/openms/CMakeLists.txt
# Conflicts:
#	src/tests/class_tests/openms/CMakeLists.txt
#	src/tests/class_tests/openms/executables.cmake
@timosachsenberg
timosachsenberg merged commit 63ac90a into OpenMS:develop Jul 16, 2026
38 checks passed
timosachsenberg added a commit that referenced this pull request Jul 17, 2026
* docs(changelog): add entries for #9492, #9752

Backfills two CHANGELOG entries for recently merged PRs that landed
without their own entry:
- #9752: new BUILD_TOPP_TOOLS / INSTALL_OPENMS_EXAMPLES CMake options
  enabling a core-only OpenMS SDK build
- #9492: null-dereference guards in TargetedExperiment::get*ByRef and
  ReactionMonitoringTransition::getPrediction

All other PRs merged since the last CHANGELOG update (#9613, #9750,
#9738) already carried their own entries; #9572 is test-only and
follows the existing convention of not adding a changelog entry for
test-only PRs in this series.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcFv1tmBLzroCNJFjoqhZt

* Update CHANGELOG

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
jcharkow pushed a commit to jcharkow/OpenMS that referenced this pull request Aug 12, 2026
…S#9753)

* docs(changelog): add entries for OpenMS#9492, OpenMS#9752

Backfills two CHANGELOG entries for recently merged PRs that landed
without their own entry:
- OpenMS#9752: new BUILD_TOPP_TOOLS / INSTALL_OPENMS_EXAMPLES CMake options
  enabling a core-only OpenMS SDK build
- OpenMS#9492: null-dereference guards in TargetedExperiment::get*ByRef and
  ReactionMonitoringTransition::getPrediction

All other PRs merged since the last CHANGELOG update (OpenMS#9613, OpenMS#9750,
OpenMS#9738) already carried their own entries; OpenMS#9572 is test-only and
follows the existing convention of not adding a changelog entry for
test-only PRs in this series.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcFv1tmBLzroCNJFjoqhZt

* Update CHANGELOG

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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