Repository navigation
Fixes stale and missing documentation in ImzMLFile - #9745
Conversation
Document that every load path (in-memory, streaming, index-only) performs an advisory UUID header check between IMS:1000080 in the .imzML XML and the first 16 bytes of the companion .ibd. Mismatches are reported as warnings rather than hard errors so legacy / non-conformant datasets still load; callers requiring strict conformance should inspect the warning log. This behavior was implemented but not surfaced in the Doxygen class docs.
📝 WalkthroughWalkthroughImzMLFile documentation now reflects index-based imaging geometry construction, refined coordinate validation behavior, ChangesImzML documentation
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/openms/include/OpenMS/FORMAT/ImzMLFile.h (1)
84-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFollow Rule-of-0 or Rule-of-6 for constructors and destructors.
As per coding guidelines, classes should follow the Rule-of-0 or Rule-of-6. Because a destructor is explicitly declared (
~ImzMLFile() override = default;), the compiler suppresses the implicit generation of the move constructor and move assignment operator.To restore move semantics and strictly comply with the Rule-of-6, explicitly
= default(or= delete) the copy and move constructors and assignment operators. Alternatively, if the base class's virtual destructor is sufficient and no special cleanup is needed, you can remove the destructor declaration entirely to adhere to the Rule-of-0.♻️ Proposed refactor (Rule-of-6)
/// Default constructor ImzMLFile(); + /// Copy constructor + ImzMLFile(const ImzMLFile&) = default; + /// Move constructor + ImzMLFile(ImzMLFile&&) = default; + /// Copy assignment + ImzMLFile& operator=(const ImzMLFile&) = default; + /// Move assignment + ImzMLFile& operator=(ImzMLFile&&) = default; /// Destructor ~ImzMLFile() override = default;🤖 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/include/OpenMS/FORMAT/ImzMLFile.h` around lines 84 - 88, Update the ImzMLFile special-member declarations around ImzMLFile() and ~ImzMLFile() to follow the Rule-of-0 or Rule-of-6: either remove the redundant destructor if the inherited virtual destructor is sufficient, or explicitly default/delete the copy constructor, copy assignment, move constructor, and move assignment so the intended ownership and move semantics are declared.Source: Coding guidelines
🤖 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.
Nitpick comments:
In `@src/openms/include/OpenMS/FORMAT/ImzMLFile.h`:
- Around line 84-88: Update the ImzMLFile special-member declarations around
ImzMLFile() and ~ImzMLFile() to follow the Rule-of-0 or Rule-of-6: either remove
the redundant destructor if the inherited virtual destructor is sufficient, or
explicitly default/delete the copy constructor, copy assignment, move
constructor, and move assignment so the intended ownership and move semantics
are declared.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1a49bc7c-f685-4383-8926-8f0f2cd5f748
📒 Files selected for processing (1)
src/openms/include/OpenMS/FORMAT/ImzMLFile.h
…erence (#9772) - Add entry for #9745 (corrected stale ImzMLFile documentation on imaging geometry derivation, .ibd integrity check, and narrowed InvalidValue throw conditions). - Point the Arrow APT signing-key self-heal entry at the actual merged PR #9750 instead of only the tracking issue #9729. Claude-Session: https://claude.ai/code/session_01XoLJy9fP8E2m25rggnF6h3 Co-authored-by: Claude <[email protected]>
Summary
Fixes stale and missing documentation in
ImzMLFileto accurately reflect current implementation behaviour.Changes
ImzMLFileclass-level descriptionimzml:x/yMetaValues..ibdagainst theIMS:1000080UUID in the.imzMLXML, and that mismatches are advisory warnings (not hard errors) so legacy/non-conformant datasets still load.load(filename, MSImagingExperiment&)loadSpectraIndex/OnDiscImzMLExperiment).@throws Exception::InvalidValuenarrowed to duplicate pixel coordinates only (out-of-grid and< 1coordinates are warned and skipped, not thrown).buildImagingGeometry(const MSExperiment&, MSImagingGeometry&)< 1coordinates emit a warning and are skipped.@throws Exception::InvalidValuenarrowed to duplicate pixel coordinates only.Scope
Documentation only — no functional code changes.
Files changed
src/openms/include/OpenMS/FORMAT/ImzMLFile.hSummary by CodeRabbit