Skip to content

[FORMAT] Add library-level FileInfo helper usable from pyOpenMS (#9596) - #9602

Merged
timosachsenberg merged 5 commits into
developfrom
feature/fileinfo-library-9596
Jun 18, 2026
Merged

timosachsenberg merged 5 commits into
developfrom
feature/fileinfo-library-9596

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #9596.

Creates a library-level OpenMS::FileInfo helper (in FORMAT/) that performs the same file inspection as the FileInfo TOPP tool, but is callable from C++ and pyOpenMS and returns a structured result:

import pyopenms as oms
r = oms.FileInfo().runAll("data.consensusXML")
r.meta.file_type_name          # 'consensusXML'
r.feature.num_features         # typed int
r.ranges.combined.mz.min       # typed float
print(oms.FileInfo.toText(r))  # the exact FileInfo CLI text

What changed

  • New OpenMS::FileInfo (FORMAT/FileInfo.{h,cpp}): a typed Result (file meta, ranges, per-file-type info for peaks/features/consensus/IDs/FASTA/mzTab/trafoXML/PQP, statistics, validation, ...) plus run()/runAll() and static toText()/toTSV() renderers. No std::ostream& in the public API.
  • TOPPFileInfo now delegates to the library — outputTo_ collapses to a thin wrapper, so the library is the single implementation (the tool drops from ~2300 to ~195 lines).
  • pyOpenMS bindings (bind_format.cpp): Result/Options/run/runAll/toText/toTSV + Math::SummaryStatistics; adds the nanobind/stl/tuple.h caster.
  • Tests: a C++ class test (FileInfo_test) and a pyOpenMS test (test_FileInfo.py).

Implementation note

The rendering code is moved verbatim into the library and the produced human-readable/TSV strings are cached on the Result. This guarantees the CLI output is byte-for-byte unchanged — the ~20 TOPP_FileInfo_* golden tests are the regression gate. Typed structured fields are populated alongside for programmatic/pyOpenMS use.

Testing

  • TOPP_FileInfo_* golden CLI tests: 35/35 pass (byte-identical).
  • New FileInfo_test class test: pass.
  • New test_FileInfo.py pyOpenMS test: 6/6 pass.

Known follow-ups (info already available via .text/.tsv)

  • ValidationInfo::schema_version/detail are bound but not yet populated.
  • The -m/-s/-c/-d blocks are typed-struct-declared but only partially populated (full data is in .text/.tsv).
  • FAIMSHelper::getCompensationVoltages is computed twice in the peaks path (minor).

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a shared FileInfo API to inspect mass-spectrometry files (e.g., mzML, featureXML/consensusXML, idXML, FASTA, mzTab) with structured metadata/statistics, optional validation/corruption checks, and cached rendering.
    • Exposed the same capabilities in Python via pyOpenMS.FileInfo, including text/TSV output helpers.
  • Refactor
    • Updated the FileInfo CLI tool to delegate reporting to the shared library, including consistent option handling (e.g., index validation behavior).
  • Tests
    • Added Python and C++ unit tests for parsing, options/renderers, and forced-type behavior.

Extracts the inspection logic of the FileInfo TOPP tool into a reusable
OpenMS::FileInfo library class (FORMAT/) so it can be called from C++ and
pyOpenMS, e.g. FileInfo().runAll("data.consensusXML").

- New OpenMS::FileInfo with a structured Result (ranges, counts, per-file-type
  info, statistics, validation, ...) plus toText()/toTSV() renderers.
- TOPPFileInfo now delegates to the library: outputTo_ shrinks to a ~30-line
  wrapper, so the library is the single implementation. The ~20 TOPP_FileInfo_*
  golden CLI tests stay byte-for-byte identical (regression gate).
- nanobind bindings in bind_format.cpp (Result/Options/run/runAll/toText/toTSV
  + Math::SummaryStatistics); adds the stl/tuple caster.
- New class test (FileInfo_test) and pyOpenMS test (test_FileInfo.py).

Implementation detail: the rendering code is moved verbatim into the library
and the produced human-readable/TSV strings are cached on the Result, which
guarantees the CLI output is unchanged. Structured typed fields are populated
alongside for programmatic/pyOpenMS use.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@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-17 09:50:45.827754296 +0000
+++ AUTHORS.new	2026-06-17 09:50:51.216103508 +0000
@@ -22,8 +22,8 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

@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: d371adfa-57f2-4da3-ab34-7837edba36af

📥 Commits

Reviewing files that changed from the base of the PR and between 555cf4a and 80c348d.

📒 Files selected for processing (2)
  • src/pyOpenMS/tests/unittests/test_FileInfo.py
  • src/tests/class_tests/openms/source/FileInfo_test.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/pyOpenMS/tests/unittests/test_FileInfo.py
  • src/tests/class_tests/openms/source/FileInfo_test.cpp

📝 Walkthrough

Walkthrough

Extracts the TOPPFileInfo CLI logic into a reusable OpenMS::FileInfo library class with structured result types covering ranges, metadata, per-format statistics, validation, and corruption checks. The CLI tool becomes a thin wrapper. New nanobind Python bindings expose the full API to pyOpenMS, and C++ and Python unit tests are added.

Changes

OpenMS::FileInfo library, Python bindings, and CLI refactor

Layer / File(s) Summary
FileInfo API contract and nested data structures
src/openms/include/OpenMS/FORMAT/FileInfo.h, src/openms/include/OpenMS/FORMAT/sources.cmake, src/openms/source/FORMAT/sources.cmake
Declares OpenMS::FileInfo with all nested bindable value types (Range, RangeSet, Ranges, FileMeta, ExperimentMeta, ProcessingStep, NamedStats, PeakInfo, FeatureInfo, IdentInfo, FastaInfo, MzTabInfo, ValidationInfo, CorruptionInfo, DetailInfo, Result, Options), public run/runAll/toText/toTSV entry points, and the private report_ helper. Registers FileInfo.h and FileInfo.cpp in CMake source lists.
Implementation helpers and public entry-point routing
src/openms/source/FORMAT/FileInfo.cpp (lines 1–661)
File-local range serialization helpers (human-readable and TSV), statistical stream formatting, and RangeSet/Ranges extraction for generic maps and MSExperiment. Implements run, runAll, toText, toTSV routing through report_, and PeakInfo::activationMethodsFlat().
report_: validation, FASTA, feature, identification, and peak content handlers
src/openms/source/FORMAT/FileInfo.cpp (lines 662–1870)
Schema and optional semantic validation across all supported file types with mzIdentML version detection and optional mzML index validation; FASTA duplicate/ambiguity analysis and FastaInfo; featureXML/consensusXML charge/TIC/peptide-ID distributions and FeatureInfo; idXML/mzIdentML aggregation and IdentInfo; mzTab/transformationXML/PQP summaries; full peak-data path covering MSExperiment loading, range summaries, activation methods, peak types, FAIMS CVs, and spectrum/chromatogram listings.
report_: corruption checks, meta-information, processing, and statistics
src/openms/source/FORMAT/FileInfo.cpp (lines 1871–2445)
Optional RT ordering/duplicate RT/m/z sorting/negative intensity/duplicate array-name corruption checks; instrument/sample/document meta output; DataProcessing step extraction into ProcessingStep; per-file-type statistics (feature intensity/quality/FWHM, consensus deltas/ratios, MS1 intensity, per-array distributions).
CLI thin wrapper refactor
src/topp/FileInfo.cpp
Removes ~2154 lines of inlined CLI logic; TOPPFileInfo::outputTo_ now resolves file type via FileTypes::nameToType with fallback, enforces mzML-only -i constraint, maps flags to FileInfo::Options, delegates to FileInfo::run, and writes output via toText/toTSV.
Python bindings for FileInfo and SummaryStatistics
src/pyOpenMS/bindings/bind_format.cpp, src/pyOpenMS/bindings/type_casters/all_casters.h
Nanobind bindings for all FileInfo nested types, SummaryStatistics<vector<double>>, Options, and the run/runAll/toText/toTSV entry points. Adds the nanobind tuple STL caster required for activationMethodsFlat().
Tests and build system registration
src/tests/class_tests/openms/executables.cmake, src/tests/class_tests/openms/source/FileInfo_test.cpp, src/pyOpenMS/tests/unittests/test_FileInfo.py
Registers FileInfo_test in the test executables list. C++ test suite covers construction, runAll for featureXML/consensusXML/mzML/FASTA, toText/toTSV caching, Options.statistics gating, and forced_type override. Python pytest mirrors the same plus idXML, activationMethodsFlat tuple type checks, and Options rendering toggling.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as TOPPFileInfo::outputTo_
    participant Lib as OpenMS::FileInfo
    participant Report as report_()
    participant Parser as Format Parsers
    participant Result as FileInfo::Result

    CLI->>Lib: run(filename, options)
    Lib->>Report: report_(filename, type, options, os, os_tsv, result)
    Report->>Parser: load file (MSExperiment / FeatureMap / FastaFile / ...)
    Parser-->>Report: parsed data
    Report->>Result: populate peaks/features/ident/fasta/ranges/validation
    Report-->>Result: write text + tsv streams into Result.text / Result.tsv
    Report-->>Lib: return
    Lib-->>CLI: Result
    CLI->>Lib: toText(result) / toTSV(result)
    Lib-->>CLI: Result.text / Result.tsv
    CLI-->>CLI: write to file
Loading

Poem

🐇 A tool once tangled in one long file,
Now hops as a library with style!
FileInfo.run() — structured and clean,
Python can call it, C++ convene.
The CLI shrinks to a thin little wrap,
While Result holds data neatly on tap. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 49.02% 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 references the main objective: adding a library-level FileInfo helper usable from pyOpenMS, which aligns with the primary change of extracting file inspection logic into a reusable library component.
Linked Issues check ✅ Passed The PR successfully implements issue #9596's requirement for a library-level FileInfo helper accessible from pyOpenMS with file-level information equivalent to the CLI tool, providing structured typed results and rendering methods.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the FileInfo library helper: new header/source files, CMake additions, TOPP refactoring to use the library, pyOpenMS bindings, and related tests.

✏️ 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 feature/fileinfo-library-9596

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: 6

🧹 Nitpick comments (4)
src/openms/source/FORMAT/FileInfo.cpp (3)

2385-2385: 💤 Low value

Potentially redundant updateRanges() call.

exp.updateRanges() was already called at line 1535 and exp hasn't been modified since. This call is redundant but harmless.

🤖 Prompt for 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.

In `@src/openms/source/FORMAT/FileInfo.cpp` at line 2385, The `exp.updateRanges()`
call at line 2385 is redundant because this method was already invoked earlier
at line 1535 and the `exp` object has not been modified since that earlier call.
Remove this duplicate `exp.updateRanges()` invocation to eliminate the
unnecessary repeated computation.

830-830: 💤 Low value

Prefer '\n' over std::endl for performance.

Per coding guidelines, std::endl forces a stream flush which is unnecessary here.

♻️ Proposed fix
-      os << "Checking mzML file for valid indices ... " << std::endl;
+      os << "Checking mzML file for valid indices ... \n";
🤖 Prompt for 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.

In `@src/openms/source/FORMAT/FileInfo.cpp` at line 830, In the output stream
operation that logs "Checking mzML file for valid indices", replace the
`std::endl` at the end of the statement with a newline character `'\n'` instead.
This avoids the unnecessary stream flush that `std::endl` performs and improves
performance in accordance with the coding guidelines.

Source: Coding guidelines


1703-1703: 💤 Low value

Use const reference for read-only iteration.

The loop body only reads from pm; using a non-const reference is misleading.

♻️ Proposed fix
-      for (MSSpectrum& pm : exp)
+      for (const MSSpectrum& pm : exp)
🤖 Prompt for 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.

In `@src/openms/source/FORMAT/FileInfo.cpp` at line 1703, The loop iteration at
the for statement using MSSpectrum& pm is using a non-const reference even
though the loop body only reads from pm without modifying it. Change the loop to
use a const reference by updating MSSpectrum& to const MSSpectrum& to accurately
reflect that pm is not being modified within the loop body.
src/pyOpenMS/bindings/bind_format.cpp (1)

2884-2889: ⚡ Quick win

Release the GIL while inspecting files.

run() / runAll() can perform blocking file I/O, validation, and statistics. Holding the GIL blocks unrelated Python threads; copy Options first, then release the GIL for the actual C++ work.

⚡ Proposed update
-        .def("run", [](FileInfo& self, const std::string& filename, const FileInfo::Options& options){ return self.run(filename, options); },
+        .def("run", [](FileInfo& self, const std::string& filename, const FileInfo::Options& options){
+             FileInfo::Options local_options = options;
+             nb::gil_scoped_release release;
+             return self.run(filename, local_options);
+           },
              "filename"_a, "options"_a, "Load the file (type auto-detected unless options.forced_type) and compute all requested information")
-        .def("run", [](FileInfo& self, const std::string& filename){ return self.run(filename); },
+        .def("run", [](FileInfo& self, const std::string& filename){
+             nb::gil_scoped_release release;
+             return self.run(filename);
+           },
              "filename"_a, "Load the file with default options")
-        .def("runAll", [](FileInfo& self, const std::string& filename){ return self.runAll(filename); },
+        .def("runAll", [](FileInfo& self, const std::string& filename){
+             nb::gil_scoped_release release;
+             return self.runAll(filename);
+           },
              "filename"_a, "Compute all content metrics (meta/processing/statistics on; no validation/index/detail/corrupt)")
🤖 Prompt for 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.

In `@src/pyOpenMS/bindings/bind_format.cpp` around lines 2884 - 2889, The three
method bindings for FileInfo (the two overloads of run() and runAll()) perform
blocking file I/O operations while holding Python's Global Interpreter Lock,
which prevents other Python threads from executing. Modify each lambda function
to release the GIL before performing the actual C++ work: for the run() method
with Options parameter, create a copy of the options object first, then use
pybind11's GIL release mechanism (such as py::gil_scoped_release) to wrap the
actual self.run() or self.runAll() call, allowing other Python threads to
proceed during the file inspection.
🤖 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/openms/source/FORMAT/FileInfo.cpp`:
- Line 103: The string literal in the output statement contains extraneous
single quote characters surrounding the newline escape sequence, causing the
output format to include literal quote marks in the printed text. Remove the
single quote characters that wrap around the `\n` escape in the "Ranges:" string
so that the newline escape is interpreted as a whitespace character rather than
appearing as literal text in the output. The corrected format should match the
pattern used in the subsequent output statements for retention time ranges.

In `@src/pyOpenMS/bindings/bind_format.cpp`:
- Around line 2760-2761: The method binding in the FileInfo::PeakInfo class uses
camelCase naming which violates Python conventions. Rename the method from
activationMethodsFlat to activation_methods_flat to follow snake_case
conventions for Python-facing API names. Additionally, check for and rename any
other newly added method bindings mentioned in the review (such as runAll to
run_all, toText to to_text, and toTsv to to_tsv) to ensure consistent snake_case
naming throughout the bindings, and remove any duplicate camelCase aliases to
avoid introducing hard-to-change naming inconsistencies.
- Around line 2664-2883: The binding classes for SummaryStatistics,
FileInfo::Range, FileInfo::RangeSet, FileInfo::Ranges, FileInfo::FileMeta,
FileInfo::ExperimentMeta::Contact, FileInfo::ExperimentMeta,
FileInfo::ProcessingStep, FileInfo::NamedStats, FileInfo::PeakInfo,
FileInfo::FeatureInfo::MapColumn, FileInfo::FeatureInfo, FileInfo::IdentInfo,
FileInfo::FastaInfo, FileInfo::MzTabInfo, FileInfo::ValidationInfo,
FileInfo::CorruptionInfo, and FileInfo::DetailInfo are missing copy constructor
and copy hook definitions. For each of these classes that currently only has
.def(nb::init<>()), add a copy constructor with .def(nb::init<const
ClassName&>()), followed by __copy__ and __deepcopy__ method definitions using
lambda functions that return a new instance, following the same pattern already
implemented for FileInfo::Options and FileInfo classes at the end of the binding
section.

In `@src/pyOpenMS/tests/unittests/test_FileInfo.py`:
- Around line 81-87: The test_fileinfo_forced_type function uses an input file
that already has the .featureXML extension, so the test passes regardless of
whether forced_type is actually being honored. To properly test that forced_type
bypasses auto-detection, copy the test fixture to a temporary file with a
neutral extension like .tmp, then verify that calling run() with the forced_type
option set to FEATUREXML succeeds in parsing it, while calling run() without the
option fails to recognize it as featureXML. This ensures the test actually
validates that forced_type overrides auto-detection behavior.

In `@src/tests/class_tests/openms/source/FileInfo_test.cpp`:
- Around line 119-127: The test in START_SECTION((forced type bypasses
auto-detection)) currently uses a file with the correct .featureXML extension
while forcing the type to FEATUREXML, so it cannot verify that forced_type
actually bypasses auto-detection since auto-detection would work anyway. Replace
the test input file with a valid featureXML file that has an incorrect or
unknown file extension, then verify that fi.run() with opt.forced_type set to
FEATUREXML still successfully parses it and produces the expected result,
ensuring the test truly validates the forced_type bypass behavior.

In `@src/topp/FileInfo.cpp`:
- Around line 120-130: The `opt.meta` assignment is incorrectly allowing the
`-out_tsv` option to enable metadata computation. Currently, the line sets
`opt.meta = getFlag_("m") || !getStringOption_("out_tsv").empty();` which means
metadata gets enabled whenever an output TSV file is specified, even without the
`-m` flag. Since `Options::meta` is documented as the mirror of the CLI `-m`
flag, change the assignment to only check the `-m` flag by removing the OR
condition that checks the TSV output option. The corrected line should simply
set `opt.meta = getFlag_("m");` to keep TSV output selection separate from
metadata computation.

---

Nitpick comments:
In `@src/openms/source/FORMAT/FileInfo.cpp`:
- Line 2385: The `exp.updateRanges()` call at line 2385 is redundant because
this method was already invoked earlier at line 1535 and the `exp` object has
not been modified since that earlier call. Remove this duplicate
`exp.updateRanges()` invocation to eliminate the unnecessary repeated
computation.
- Line 830: In the output stream operation that logs "Checking mzML file for
valid indices", replace the `std::endl` at the end of the statement with a
newline character `'\n'` instead. This avoids the unnecessary stream flush that
`std::endl` performs and improves performance in accordance with the coding
guidelines.
- Line 1703: The loop iteration at the for statement using MSSpectrum& pm is
using a non-const reference even though the loop body only reads from pm without
modifying it. Change the loop to use a const reference by updating MSSpectrum&
to const MSSpectrum& to accurately reflect that pm is not being modified within
the loop body.

In `@src/pyOpenMS/bindings/bind_format.cpp`:
- Around line 2884-2889: The three method bindings for FileInfo (the two
overloads of run() and runAll()) perform blocking file I/O operations while
holding Python's Global Interpreter Lock, which prevents other Python threads
from executing. Modify each lambda function to release the GIL before performing
the actual C++ work: for the run() method with Options parameter, create a copy
of the options object first, then use pybind11's GIL release mechanism (such as
py::gil_scoped_release) to wrap the actual self.run() or self.runAll() call,
allowing other Python threads to proceed during the file inspection.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 920d9114-c4c2-4e4d-b923-5a7622797e6e

📥 Commits

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

📒 Files selected for processing (10)
  • src/openms/include/OpenMS/FORMAT/FileInfo.h
  • src/openms/include/OpenMS/FORMAT/sources.cmake
  • src/openms/source/FORMAT/FileInfo.cpp
  • src/openms/source/FORMAT/sources.cmake
  • src/pyOpenMS/bindings/bind_format.cpp
  • src/pyOpenMS/bindings/type_casters/all_casters.h
  • src/pyOpenMS/tests/unittests/test_FileInfo.py
  • src/tests/class_tests/openms/executables.cmake
  • src/tests/class_tests/openms/source/FileInfo_test.cpp
  • src/topp/FileInfo.cpp

Comment thread src/openms/source/FORMAT/FileInfo.cpp Resolved
Comment thread src/pyOpenMS/bindings/bind_format.cpp Resolved
Comment thread src/pyOpenMS/bindings/bind_format.cpp Resolved
Comment thread src/topp/FileInfo.cpp Resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 4 file(s) based on 5 unresolved review comments.

Files modified:

  • src/pyOpenMS/bindings/bind_format.cpp
  • src/pyOpenMS/tests/unittests/test_FileInfo.py
  • src/tests/class_tests/openms/source/FileInfo_test.cpp
  • src/topp/FileInfo.cpp

Commit: 555cf4a6b7ec8c7cba9029e36ef73d668bf47425

The changes have been pushed to the feature/fileinfo-library-9596 branch.

Time taken: 6m 5s

Fixed 4 file(s) based on 5 unresolved review comments.

Co-authored-by: CodeRabbit <[email protected]>

Copy link
Copy Markdown
Contributor Author

Adversarial review result:

  • Cleanup required: the new Python FileInfo test module docstring contains a tracker reference. Please remove tracker/issue references from source and test comments before merge.
  • Test robustness: src/tests/class_tests/openms/source/FileInfo_test.cpp writes the forced-type copy to a fixed file name in the global temp directory. OpenMS tests normally use NEW_TMP_FILE; the fixed path can collide with parallel/repeated test runs or a stale file from an interrupted run. Please switch this to a per-test temporary file.

I did not find a blocking behavior regression in the FileInfo extraction itself in this pass. I did not run the tests locally.

timosachsenberg and others added 2 commits June 18, 2026 12:34
- FileInfo_test.cpp: use std::string instead of OpenMS::String (the
  String header was not included, breaking the build on all platforms).
- Rework the forced_type test (C++ and pyOpenMS): forced_type selects the
  parse branch and restricts allowed types but does not make the loader
  ignore the file (loadFeatures/loadExperiment still re-detect, falling
  back to content sniffing). The previous test forced FEATUREXML on a
  .tmp copy and then asserted plain detection yields UNKNOWN, but content
  sniffing recognizes the featureXML, so that assertion failed. Use a
  neutral .tmp extension, force FEATUREXML, and assert the feature map
  parses; document why a wrong-but-known extension cannot demonstrate a
  bypass here.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Doxygen parsed '#IDs'/'#elements' in the ids_per_element doc comment as
explicit link requests, failing Doxygen_Warning_test. Rephrase to plain
text.

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

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@timosachsenberg
timosachsenberg merged commit 1422397 into develop Jun 18, 2026
13 checks passed
@timosachsenberg
timosachsenberg deleted the feature/fileinfo-library-9596 branch June 18, 2026 12:32
timosachsenberg added a commit that referenced this pull request Jun 19, 2026
Add entries for all substantive non-test PRs merged since the last
changelog update:

- #9623 ThermoRawFile full mzML metadata extraction + polarity fix
- #9602 New FileInfo library class usable from C++ and pyOpenMS
- #9521 IMAGING multi-region support (add missing PR reference)
- #9620 Deisotoper::isToleranceSupported + ProSE/SSE crash fix on low-res data
- #9610 DistanceMatrix::setValue cached-minimum guard fix
- #9497 DistanceMatrix::operator==, ClusteringGrid, File path guard fixes
- #9583 LogStreamBuf thread-safety fix
- #9514 CI Windows migration to Visual Studio 2026


Claude-Session: https://claude.ai/code/session_01YLg6pWyjyTxpWAU6mgrDzC

Co-authored-by: Claude <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Jul 3, 2026
5 tasks
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.

create library level helper similar to FileInfo that can be used from pyopenms

1 participant