Skip to content

[FIX,PYOPENMS] macOS bin/qt.conf for ExecutePipeline; plot_spectrum and get_df(long=True) regressions - #10280

Merged
timosachsenberg merged 2 commits into
developfrom
claude/confident-lovelace-muuw2w-issue10260
Sep 26, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
claude/confident-lovelace-muuw2w-issue10260

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of #10260. This PR fixes its items 1–3, which are 3.6.0 release blockers with verified fixes. Item 4 (the FeatureMap merge keys) still needs a decision and is not included.

1. macOS package: ExecutePipeline cannot find the Qt platform plugin

  • With the macOS .pkg, all 7 tests in src/tests/toppas fail with Could not find the Qt platform plugin "cocoa", so TOPPAS pipelines cannot run from the command line.
    • ExecutePipeline creates a QApplication (ExecutePipeline.cpp:103), so it needs the plugin even without a window.
  • The package ships the plugin as lib/plugins/platforms/libqcocoa.dylib, and each app bundle's qt.conf points there. bin/ had no qt.conf.
    • Windows already installs one (src/openms_gui/CMakeLists.txt).
    • On macOS the install was commented out in cmake/package_mac_productbuild.cmake, with the note "Not needed unless we need Qt plugins for TOPP again".
  • pkg builds now write bin/qt.conf with Plugins = ../lib/plugins (QT_PLUGIN_PATH_REL_TO_BIN).
    • The file goes into the Dependencies component, which already holds the plugin, so the installer gets no new choice.
    • The commented-out block in package_mac_productbuild.cmake now points to the new rule instead.
  • dmg builds are unchanged. They keep the plugins inside each app bundle, so there is no shared plugin directory for bin/ to point to.

2. plot_spectrum() and mirror_plot_spectrum() fail on annotated spectra

  • plotting.py called .decode() on the peak annotations. The bindings now return them as str, so the call raised AttributeError: 'str' object has no attribute 'decode'.
  • It now uses the annotations as they are. StringDataArray.__getitem__ returns a std::string, which the bindings convert to str (bindings/type_casters/std_string_bytes_caster.h), so there is nothing to decode.

3. MSExperiment.get_df(long=True) fails

  • 3.5.0's get_df(columns, ms_levels, long) and get_df_columns(long) became to_df(..., long_format) and df_columns(long_format). The deprecated wrappers forward to the new functions, so long= raised TypeError.
  • The wrappers now pass long= on as long_format=, and raise TypeError if both are given.
  • Positional calls already worked, because the parameter order did not change.

Tests

  • tests/unittests/test_plotting.py (new): both plot functions draw the str annotations of a spectrum.
  • test_deprecated_dataframe_shims.py checks that get_df() and get_df_columns() warn, forward to the new functions and accept long= by keyword. For get_df() it also checks the flag by position, and that long= together with long_format= raises TypeError.

Validation

  • Python fixes, tested in a venv with the 3.6.0.dev20260925 nightly wheel. Its plotting.py and addons/msexperiment.py are byte-identical to develop.
    • Without the fix, the 4 new tests fail with the reported errors. With the fix, they pass.
    • Together with the other tests that touch these functions (test_000.py, test_dataframe_columns.py, test_psm_dataframe.py, test_api_missing_methods.py): 369 passed with the fix. Without it, 365 passed and the 4 new tests failed. In both runs, 27 were skipped, 5 xfailed and 7 xpassed.
    • User guide: ms_data.rst, spectrum_alignment.rst and export_pandas_dataframe.rst now get past the lines that failed (204, 49 and 65). They stop later at other changes:
  • qt.conf: I could not build a .pkg here, so this part is checked indirectly.
    • With the macOS install directories, CMake writes [Paths]\nPlugins = ../lib/plugins\n.
    • In the 2026-09-24 nightly .pkg (sha256 fbf48d25…), every component package installs at /.
      • The Dependencies payload holds Applications/OpenMS-…/lib/plugins/platforms/libqcocoa.dylib.
      • The Applications payload holds Applications/OpenMS-…/bin/ExecutePipeline and no bin/qt.conf.
      • A file installed to bin/ in Dependencies therefore lands next to ExecutePipeline.
    • 3.6.0 blockers with verified fixes: macOS ExecutePipeline lacks bin/qt.conf; pyOpenMS plot_spectrum and get_df(long=True) regressions #10260 wrote exactly this file into the installed nightly .pkg on macOS arm64. All 2,169 registered tests then passed, all 7 TOPPAS tests among them (run).
    • The first nightly after the merge will show whether the built package contains the file.

Not in this PR

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes (pyOpenMS tests against the nightly wheel with the changed files; the CMake change could not be built here, see Validation)
  • Updated or added python bindings for changed or new classes (no binding change)

🤖 Generated with Claude Code

https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

Summary by CodeRabbit

  • Bug Fixes
    • Annotated-spectrum plots now support annotations supplied as strings, including mirrored spectrum plots.
    • Deprecated DataFrame methods once again accept the legacy long keyword for compatibility with older calls. Supplying it alongside long_format reports an error.
    • macOS packages now include the Qt configuration needed for ExecutePipeline to locate its platform plugin and run TOPPAS pipelines from the command line.

…nd get_df(long=True) regressions

Fixes items 1-3 of #10260.

1. The macOS .pkg installs bin/qt.conf ("Plugins = ../lib/plugins"). ExecutePipeline
   creates a QApplication, and without the file it could not find the cocoa platform
   plugin, so every TOPPAS pipeline failed on the command line. The app bundles already
   point to the shared plugin dir in their own qt.conf; the file goes into the same
   Dependencies component as the plugin.
2. plot_spectrum() and mirror_plot_spectrum() called .decode() on the peak annotations,
   which the bindings now return as str. bytes are still decoded.
3. The deprecated MSExperiment.get_df() and get_df_columns() map 3.5.0's long= to
   long_format=.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 58d16848-0f60-43e3-8dc3-47eb279f4c31

📥 Commits

Reviewing files that changed from the base of the PR and between a2cbaf9 and 7f260c6.

📒 Files selected for processing (1)
  • src/pyOpenMS/pyopenms/plotting.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates PyOpenMS spectrum annotation plotting and deprecated DataFrame wrappers. It also changes the macOS pkg configuration to install bin/qt.conf.

Changes

PyOpenMS annotation plotting

Layer / File(s) Summary
String annotations in spectrum plots
src/pyOpenMS/pyopenms/plotting.py, src/pyOpenMS/tests/unittests/test_plotting.py, CHANGELOG
plot_spectrum retains annotation strings without decoding them when the annotation count matches the peak count. Tests check labels in plot_spectrum and mirror_plot_spectrum. The changelog records the plotting and DataFrame compatibility notes.

Deprecated DataFrame keyword compatibility

Layer / File(s) Summary
Legacy long keyword forwarding
src/pyOpenMS/pyopenms/addons/msexperiment.py, src/pyOpenMS/tests/unittests/test_deprecated_dataframe_shims.py, CHANGELOG
The deprecated wrappers accept long as an alias for long_format and raise TypeError if both are supplied. Tests cover deprecation warnings, forwarding results, and supported calls.

macOS package Qt configuration

Layer / File(s) Summary
Install qt.conf for Apple pkg packages
src/openms_gui/CMakeLists.txt, cmake/package_mac_productbuild.cmake, CHANGELOG
The Apple pkg configuration writes and installs qt.conf in the binary directory as part of Dependencies. Comments identify the installation location and describe the ExecutePipeline plugin requirement.

Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 7f260

No actionable merge risk remains in the reviewed changes; the annotation concern applies to values the supported binding does not return.

Architecture Summary

Architecture risk: 🔵 Low · up to 7f260

The change affects 3 systems.

Changed systems: src, CHANGELOG, cmake

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 5 changed files map to changed impact.
  • observed — CHANGELOG (service) was modified; 1 changed file maps to changed impact.
  • observed — cmake (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CHANGELOG: The changelog adds PyOpenMS entries stating that plot_spectrum() and mirror_plot_spectrum() no longer call .decode() on peak annotations, which are returned as str, and that deprecated MSExperiment.get_df() and get_df_columns() accept the legacy long keyword again.
  • observed — Modified behavior in CHANGELOG: The changelog adds that the macOS package installs bin/qt.conf, allowing ExecutePipeline to load the Qt platform plugin for command-line TOPPAS pipelines.
  • observed — Modified behavior in cmake/package_mac_productbuild.cmake: Removed the commented-out rules that generated qt.conf and installed it into the bin directory for the Applications component. The replacement comments identify src/openms_gui/CMakeLists.txt as the location that installs the file used by ExecutePipeline to find the Qt platform plugin.
  • observed — Modified behavior in src/openms_gui/CMakeLists.txt: The comments now state that ExecutePipeline needs the platform plugin because it creates a QApplication, and that Mac app bundles handle plugin installation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: the macOS qt.conf fix and the PyOpenMS plotting and get_df(long=True) regressions. It is specific and related to the changeset.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

A rabbit watched the spectra glow,
With strings for peaks in tidy rows.
The old long name finds its way,
While qt.conf helps pipelines play.
Three small changes hop along,
And leave their notes in changelog song.

Comment @coderabbitai help to get the list of available commands.

The bindings return every String as str (type_casters/openms_string_caster.h),
so the bytes branch added in the previous commit could never run. 3.6.0's
CHANGELOG already tells users to drop such .decode() calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
@timosachsenberg
timosachsenberg merged commit a28498a into develop Sep 26, 2026
32 checks passed
@timosachsenberg
timosachsenberg deleted the claude/confident-lovelace-muuw2w-issue10260 branch September 26, 2026 13:46
timosachsenberg pushed a commit that referenced this pull request Sep 26, 2026
3.5.0's package_mac_productbuild.cmake already had the qt.conf install
commented out, so its package most likely could not load the Qt platform
plugin in ExecutePipeline either. Drop "again" and cite #10280, which
added the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
timosachsenberg added a commit that referenced this pull request Sep 26, 2026
…5 minimum (#10285)

* [DOC,PYOPENMS] Update the user guide to the 3.6 API; macOS 15 minimum

The user-guide examples still used the 3.5.0 API. Replayed against a
3.6 wheel built from develop (with the plot_spectrum fix of #10280),
20 of the 46 pages failed, 14 of which had passed on 3.5.0. Now 36
pass. Three still fail, two on bindings that are missing in 3.6 and
one on #10260 item 4. Two need optional packages (datashader, massql).

- Output arguments are return values: pickExperiment, getAllNames,
  digest, align, getDecompositions, getTag, ProtXMLFile.load,
  applyVariableModifications, getSpectrumAlignment,
  MassTraceDetection.run, ElutionPeakDetection.detectPeaks and
  filterByPeakWidth, and SimpleSearchEngineAlgorithm.search.
- Strings are str: no .decode(), str keys and arguments instead of
  b"...", and element compositions print with str keys. char arguments
  such as PeptideEvidence.setAABefore take "R" and reject b"R".
- Removed API: pyopenms.String, DPosition1 and the LogConfigHandler
  constructor.
- Deprecated API: get_df() is now to_df(), and
  peptide_identifications_to_df() is now PeptideIdentificationList.to_df().
  The dataframe page documents the to_df() signatures and the columns
  3.6 returns. The merge example is left for #10260 item 4.
- Examples that could not run anywhere: the FAQ snippet used an
  undefined exp, and memory_management and the detailed peptide search
  read files that exist only in a source checkout. They download their
  input now, like the other pages.
- The stand-alone mass decomposition script imports pyopenms again,
  which also makes the prose's "line 8 and 9" right. The SpectrumLookup
  regex in ms_data is a raw string, which removes the invalid escape
  sequence warning.

CHANGELOG: the minimum macOS version is 15, not 14. The wheels are
built with MACOSX_DEPLOYMENT_TARGET 15.0. In the 2026-09-24 installer,
libOpenMS links a bundled libzstd whose minimum OS is 15.0, so every
TOPP tool needs macOS 15, not only the GUI, whose Qt dependencies are
built for 15 as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [DOC] CHANGELOG: cite the PRs behind the macOS minimum; state the C++23 requirement

The macOS line cited #8486, #8494 and #8527, which are notarization PRs;
the references came along from a neighbouring bullet when the changelog
was condensed. The minimum came from #8450 (14, with the Intel builds
dropped), #9037 (15, together with C++23 and the macos-15 runners) and
#10202 (15 for the wheels).

The 3.6.0 changelog never said that OpenMS now needs C++23 (#9037). It
now names the minimum compilers from cmake/min_compiler_versions.cmake.

The dataframe page shows default_missing_values=None, the actual default
of PeptideIdentificationList.to_df(), and what None stands for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [DOC] peptide_search: call removeDanglingProteinReferences, not its 3.5 name

updateProteinReferences is the pyOpenMS 3.5 name. The bindings PR brings
it back only as a deprecated alias, and the page replay reports an
example that teaches a deprecated call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

---------

Co-authored-by: Claude <[email protected]>
timosachsenberg added a commit that referenced this pull request Sep 27, 2026
* [BUILD] Make the macOS package declare the macOS it needs

The package build targeted macOS 14, but it runs on macos-15, and the
Homebrew libraries the package bundles (Qt's dependencies, ICU, zstd)
are built for 15. The 3.6.0 installer therefore installed on macOS 14,
where the tools then failed to load. The minimum has been 15 since
#9037, which moved the runners to macos-15.

- .github/actions/build/action.yml: macosx_deployment_target defaults to
  15.0, with the reason it has to match the runner. This answers the
  FIXME that asked whether it is needed.
- The installer refuses an older macOS. cmake/Modules/
  CPack.distribution.dist.in is CMake's productbuild Distribution
  template, unchanged from CMake 3.24 to 4.1, plus an
  <allowed-os-versions> element with the deployment target. CPack finds
  it through CMAKE_MODULE_PATH. CPACK_APPLE_PKG_INSTALLER_CONTENT cannot
  carry the element, because CPack generates that variable. The
  attribute is single-quoted because CPack copies CPACK_* values into
  CPackConfig.cmake without escaping them.
- TOPPView, TOPPAS and INIFileEditor declare the deployment target as
  LSMinimumSystemVersion instead of a hardcoded 12.0. Builds without a
  target keep 12.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [BUILD] Put the installer's macOS minimum inside <volume-check>

Apple's Distribution XML reference allows <allowed-os-versions> only
inside <volume-check>; it is not a valid child of <installer-gui-script>.
<volume-check> requires a script attribute, so it gets script='true': the
volume passes the script, and the allowed-os-versions child adds the OS
check. The value stays single-quoted for CPackConfig.cmake.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [DOC] CHANGELOG: bin/qt.conf is new in the macOS package, not restored

3.5.0's package_mac_productbuild.cmake already had the qt.conf install
commented out, so its package most likely could not load the Qt platform
plugin in ExecutePipeline either. Drop "again" and cite #10280, which
added the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

---------

Co-authored-by: Claude <[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