Repository navigation
[FIX,PYOPENMS] macOS bin/qt.conf for ExecutePipeline; plot_spectrum and get_df(long=True) regressions - #10280
Conversation
…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
|
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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates PyOpenMS spectrum annotation plotting and deprecated DataFrame wrappers. It also changes the macOS pkg configuration to install ChangesPyOpenMS annotation plotting
Deprecated DataFrame keyword compatibility
macOS package Qt configuration
Priority: ➖ Normal Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable merge risk remains in the reviewed changes; the annotation concern applies to values the supported binding does not return. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. A rabbit watched the spectra glow, Comment |
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
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
…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]>
* [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]>
Description
Part of #10260. This PR fixes its items 1–3, which are 3.6.0 release blockers with verified fixes. Item 4 (the
FeatureMapmerge keys) still needs a decision and is not included.1. macOS package:
ExecutePipelinecannot find the Qt platform plugin.pkg, all 7 tests insrc/tests/toppasfail withCould not find the Qt platform plugin "cocoa", so TOPPAS pipelines cannot run from the command line.ExecutePipelinecreates aQApplication(ExecutePipeline.cpp:103), so it needs the plugin even without a window.lib/plugins/platforms/libqcocoa.dylib, and each app bundle'sqt.confpoints there.bin/had noqt.conf.src/openms_gui/CMakeLists.txt).cmake/package_mac_productbuild.cmake, with the note "Not needed unless we need Qt plugins for TOPP again".pkgbuilds now writebin/qt.confwithPlugins = ../lib/plugins(QT_PLUGIN_PATH_REL_TO_BIN).Dependenciescomponent, which already holds the plugin, so the installer gets no new choice.package_mac_productbuild.cmakenow points to the new rule instead.dmgbuilds are unchanged. They keep the plugins inside each app bundle, so there is no shared plugin directory forbin/to point to.2.
plot_spectrum()andmirror_plot_spectrum()fail on annotated spectraplotting.pycalled.decode()on the peak annotations. The bindings now return them asstr, so the call raisedAttributeError: 'str' object has no attribute 'decode'.StringDataArray.__getitem__returns astd::string, which the bindings convert tostr(bindings/type_casters/std_string_bytes_caster.h), so there is nothing to decode.3.
MSExperiment.get_df(long=True)failsget_df(columns, ms_levels, long)andget_df_columns(long)becameto_df(..., long_format)anddf_columns(long_format). The deprecated wrappers forward to the new functions, solong=raisedTypeError.long=on aslong_format=, and raiseTypeErrorif both are given.Tests
tests/unittests/test_plotting.py(new): both plot functions draw thestrannotations of a spectrum.test_deprecated_dataframe_shims.pychecks thatget_df()andget_df_columns()warn, forward to the new functions and acceptlong=by keyword. Forget_df()it also checks the flag by position, and thatlong=together withlong_format=raisesTypeError.Validation
3.6.0.dev20260925nightly wheel. Itsplotting.pyandaddons/msexperiment.pyare byte-identical todevelop.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.ms_data.rst,spectrum_alignment.rstandexport_pandas_dataframe.rstnow get past the lines that failed (204, 49 and 65). They stop later at other changes:DPosition1was removed; the CHANGELOG announces it.getSpectrumAlignment()now returns its result; the CHANGELOG announces it.export_pandas_dataframe.rsthits item 4 of 3.6.0 blockers with verified fixes: macOS ExecutePipeline lacks bin/qt.conf; pyOpenMS plot_spectrum and get_df(long=True) regressions #10260 (KeyError: 'feature_id').qt.conf: I could not build a.pkghere, so this part is checked indirectly.[Paths]\nPlugins = ../lib/plugins\n..pkg(sha256fbf48d25…), every component package installs at/.Dependenciespayload holdsApplications/OpenMS-…/lib/plugins/platforms/libqcocoa.dylib.Applicationspayload holdsApplications/OpenMS-…/bin/ExecutePipelineand nobin/qt.conf.bin/inDependenciestherefore lands next toExecutePipeline..pkgon macOS arm64. All 2,169 registered tests then passed, all 7 TOPPAS tests among them (run).Not in this PR
FeatureMap.get_assigned_peptide_identifications()merge keys), which needs a decision.fragment_spectrum_generation.rst:32in the user guide calls.decode()in its own example code. That needs a user-guide fix, not a package fix.offscreenplatform plugin, so pipelines need a logged-in session.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
Summary by CodeRabbit
longkeyword for compatibility with older calls. Supplying it alongsidelong_formatreports an error.