Skip to content

docs(pyOpenMS): fix stale/missing MSChromatogram and Mobilogram docstrings - #9812

Merged
timosachsenberg merged 2 commits into
developfrom
claude/inspiring-gates-3piav7
Jul 28, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
claude/inspiring-gates-3piav7

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

MSChromatogram.findNearest() carried a copy-pasted sortByPosition()
docstring instead of describing its own binary-search-nearest-RT
behavior. MSChromatogram.clear()/sortByIntensity() and
Mobilogram.sortByPosition()/sortByIntensity() had no docstring at all,
and Mobilogram.clear() still said "Clear all peaks" even though #9795
made it also clear the parallel data arrays. Bring all of these in
line with the corresponding Doxygen comments in MSChromatogram.h /
Mobilogram.h.

Summary by CodeRabbit

  • Documentation
    • Expanded Python API documentation for chromatogram and mobilogram sorting methods, including sort order and metadata handling.
    • Clarified that nearest-peak searches require retention-time-sorted data and describe behavior for empty chromatograms.
    • Documented the data and metadata removed when clearing chromatograms or mobilograms.

…rings

MSChromatogram.findNearest() carried a copy-pasted sortByPosition()
docstring instead of describing its own binary-search-nearest-RT
behavior. MSChromatogram.clear()/sortByIntensity() and
Mobilogram.sortByPosition()/sortByIntensity() had no docstring at all,
and Mobilogram.clear() still said "Clear all peaks" even though #9795
made it also clear the parallel data arrays. Bring all of these in
line with the corresponding Doxygen comments in MSChromatogram.h /
Mobilogram.h.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Python binding docstrings for MSChromatogram and Mobilogram sorting, searching, and clearing methods are expanded. Binding signatures and underlying method behavior remain unchanged.

Changes

Binding documentation

Layer / File(s) Summary
Method behavior documentation
src/pyOpenMS/bindings/bind_chromatogram.cpp, src/pyOpenMS/bindings/bind_kernel.cpp
Sorting order, parallel metadata-array handling, findNearest preconditions and exception behavior, and clearing semantics are documented for chromatograms and mobilograms.

Possibly related PRs

  • OpenMS/OpenMS#9799: Related behavior fixes for peak and data-array alignment during sorting and clearing.

Suggested reviewers: aditya-sarna

Poem

I’m a rabbit with docs in my nest,
Sorting peaks so they’re explained best.
Arrays hop along,
Clear notes grow strong,
And nearest finds what fits best.

🚥 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 accurately summarizes the docstring-only changes to MSChromatogram and Mobilogram bindings.
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.
✨ 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 claude/inspiring-gates-3piav7

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.

@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: 4

🤖 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/pyOpenMS/bindings/bind_chromatogram.cpp`:
- Around line 93-97: Update the sortByIntensity binding docstring to document
both ordering modes: the default reverse=False sorts peaks by ascending
intensity, while reverse=True sorts them by descending intensity; retain the
existing metadata-ordering description.
- Around line 110-116: Update the documentation string for the MSChromatogram
clear binding to state that peaks, data arrays, and ranges are always cleared,
while descriptive metadata is cleared only when clear_meta_data is true. Keep
the existing conditional details and clear method behavior unchanged.

In `@src/pyOpenMS/bindings/bind_kernel.cpp`:
- Around line 1644-1646: Update the documentation string on the Mobilogram
binding’s clear method to state that clear() also resets the mobility and
intensity ranges, while preserving the existing description of peak and parallel
data array removal.
- Around line 1606-1610: Update the sortByIntensity binding docstring to
document the reverse parameter, state that the default ascending sort becomes
descending when reverse=True, and retain the existing note that metadata arrays
remain aligned.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f99d49ae-5d7d-479a-9b0e-274073e8f46d

📥 Commits

Reviewing files that changed from the base of the PR and between e9ba7c2 and 99f1b46.

📒 Files selected for processing (2)
  • src/pyOpenMS/bindings/bind_chromatogram.cpp
  • src/pyOpenMS/bindings/bind_kernel.cpp

Comment thread src/pyOpenMS/bindings/bind_kernel.cpp Resolved
Comment thread src/pyOpenMS/bindings/bind_kernel.cpp Resolved
@coderabbitai

coderabbitai Bot commented Jul 28, 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 2 file(s) based on 4 unresolved review comments.

Files modified:

  • src/pyOpenMS/bindings/bind_chromatogram.cpp
  • src/pyOpenMS/bindings/bind_kernel.cpp

Commit: 7582b8c9b0da8a65566b85a40b497adc4c0a3bba

The changes have been pushed to the claude/inspiring-gates-3piav7 branch.

Time taken: 2m 38s

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

Co-authored-by: CodeRabbit <[email protected]>
@timosachsenberg
timosachsenberg merged commit 5ff1c93 into develop Jul 28, 2026
39 checks passed
@timosachsenberg
timosachsenberg deleted the claude/inspiring-gates-3piav7 branch July 28, 2026 21:54
timosachsenberg added a commit that referenced this pull request Jul 30, 2026
Audited recently merged develop PRs against CHANGELOG (last backfill
attempt was #9811/#9806, covering up to #9803). Four merged PRs since
then were missing entries: #9824 (IsobaricWorkflow empty-feature
pruning fix), #9523 (new CI build/release workflows), #9812 (pyOpenMS
docstring fixes) and #9798 (Bioconda nightly deploy fix, whose two
prior backfill attempts were closed unmerged). #9821 (internal
TODO-comment correction, no behavior/doc change) and #9805/#9803
(test-only / already covered by the #9792 write-up) were left out,
consistent with this repo's convention of not logging
test-infrastructure-only or already-documented changes.


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

Co-authored-by: Claude <[email protected]>
timosachsenberg added a commit that referenced this pull request Aug 3, 2026
…ioconda CI fix) (#9819)

Routine sweep of recently merged develop PRs for changelog coverage.
Two merged PRs had no entry: #9812 (pyOpenMS MSChromatogram/Mobilogram
docstring fixes) and #9798 (nightly Bioconda deploy rebase->merge fix).
All other merged PRs since the last changelog update were already covered.


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

Co-authored-by: Claude <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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