Skip to content

[TEST] FileHandler: cover Bruker .d / .d.zip type detection (#9460) - #9534

Merged
timosachsenberg merged 1 commit into
OpenMS:developfrom
timosachsenberg:test/9460-dzip-type-detection
Jun 16, 2026
Merged

timosachsenberg merged 1 commit into
OpenMS:developfrom
timosachsenberg:test/9460-dzip-type-detection

Conversation

@timosachsenberg

Copy link
Copy Markdown
Contributor

What

Adds Bruker TimsTOF .d / .d.zip cases to FileHandler_test:

getTypeByFileName (name-only, all builds):

  • sample.d → BRUKER_TDF
  • sample.d.zip → BRUKER_TDF (the .zip compression suffix is stripped, leaving .d)
  • /data/run 1.d.zip → BRUKER_TDF (path + embedded spaces)
  • plain_archive.zip → UNKNOWN (a plain .zip is not a Bruker .d)

getType (existing, non-directory .zip whose name strips to .d):

  • WITH_OPENTIMS: an existing *.d.zip file → BRUKER_TDF
  • otherwise → UNKNOWN (the .d family requires WITH_OPENTIMS)

Why

Closes the §1 (Qt removal: minizip-ng → libzip) [AUTO] task in the OpenMS 3.6.0 pre-release testing plan (#9460):

Test .d.zip type detection (FileHandler::getType → FileTypes::BRUKER_TDF). Pass: a .d.zip name/content resolves to BRUKER_TDF. (SDK-free.)

FileHandler_test covered many formats but never the .d/.d.zip path. Detection works in two steps that this pins: getTypeByFileName strips the .zip compression suffix and recurses on …​.d (→ BRUKER_TDF), and getType additionally requires the file to exist as a non-directory .zip (FileHandler.cpp:224, under WITH_OPENTIMS). It is SDK-free — only the name and the file's existence matter for detection, not the archive contents (a placeholder file is used).

Test plan

Tests only — no production code changed. Verified locally: -fsyntax-only clean, full build green, test runs PASSED, and the new assertions were confirmed via verbose output (BRUKER_TDF = enum 69 for all .d/.d.zip cases; UNKNOWN for the plain .zip).

Part of #9460. Follows #9524, #9525, #9526, #9528, #9530, #9531, #9532, #9533.

🤖 Generated with Claude Code

)

FileHandler_test exercised getTypeByFileName/getType for many formats but never
the Bruker TimsTOF .d directory or its zipped .d.zip form.

getTypeByFileName section (name-only, all builds):
- "sample.d"            -> BRUKER_TDF
- "sample.d.zip"        -> BRUKER_TDF (the ".zip" compression suffix is stripped,
                           leaving ".d")
- "/data/run 1.d.zip"   -> BRUKER_TDF (with a path + spaces)
- "plain_archive.zip"   -> UNKNOWN    (a plain .zip is not a Bruker .d)

getType section (existing non-directory ".zip" whose name strips to ".d"):
- WITH_OPENTIMS: an existing *.d.zip file -> BRUKER_TDF
- otherwise:     -> UNKNOWN (the .d family requires WITH_OPENTIMS)

SDK-free: only the name and the file's existence matter for detection, not the
archive contents.

Verified: builds clean and the test runs PASSED (assertions confirmed via verbose).

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

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@timosachsenberg, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 2 minutes and 19 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9582cca4-7829-4c47-9a95-cf3e517fe9ad

📥 Commits

Reviewing files that changed from the base of the PR and between aacd941 and e284004.

📒 Files selected for processing (1)
  • src/tests/class_tests/openms/source/FileHandler_test.cpp
✨ 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-15 16:09:14.106326493 +0000
+++ AUTHORS.new	2026-06-15 16:09:19.521317701 +0000
@@ -23,8 +23,8 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

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