Skip to content

[FIX] Address review comments and CI test/configure failures for ThermoRawFile - #9235

Closed
jpfeuffer with Copilot wants to merge 22 commits into
developfrom
copilot/fix-ci-tests-and-review-comments
Closed

jpfeuffer with Copilot wants to merge 22 commits into
developfrom
copilot/fix-ci-tests-and-review-comments

Conversation

Copilot AI commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor
  • Fix review comment: Add #include <filesystem> explicitly in ThermoRawFile.cpp
  • Fix review comment: Clear exp at start of load() to avoid accumulating spectra
  • Fix review comment: Set correct CV term names for SourceFile (fileType/nativeIDType)
  • Fix review comment: Set spectrum type (CENTROID/PROFILE) based on centroid detection
  • Fix review comment: Add exp.updateRanges() after sortSpectra(true)
  • Fix review comment: Add exp.updateRanges() after MS-level filtering in FileHandler.cpp
  • Fix review comment: Fix ${openmsthermobridge_SOURCE_DIR} → ${OpenMSThermoBridge_SOURCE_DIR} in cmake
  • Fix review comment: Pin FetchContent GIT_TAG to v0.1.1
  • Fix CI: Update FileTypes_test.cpp count from 44 to 45 (RAW now READABLE)
  • Fix CI: Set WITH_THERMO_RAW and ENABLE_THERMO_RAW_TESTS defaults to ON per @jpfeuffer
  • Fix CI: Correct namespace openms_thermo_bridge:: → openms::thermo_bridge:: (actual namespace in bridge library)
  • Fix CI: Use scoped enum values throughout ThermoRawFile.cpp (SpectrumType, Polarity, ActivationMethod)
  • Fix CI: Force BUILD_SHARED_LIBS=OFF around FetchContent_MakeAvailable(OpenMSThermoBridge) so bridge symbols are absorbed into libOpenMS.so, fixing TOPP tool linker errors
  • Make openms_thermo_bridge fully internal: remove install_library + openms_register_export_target — bridge is private static dep absorbed into libOpenMS.so
  • Fix CI: Set CMAKE_POSITION_INDEPENDENT_CODE=ON + set_target_properties(POSITION_INDEPENDENT_CODE ON) for bridge so it compiles with -fPIC when absorbed into libOpenMS.so
  • Resolve merge conflicts (×3): FileTypes_test.cpp, src/openms/CMakeLists.txt, doc/doxygen/install/common-cmake-parameters.doxygen
  • Docs: Add WITH_THERMO_RAW and ENABLE_THERMO_RAW_TESTS to common-cmake-parameters.doxygen; document .NET runtime requirement (dotnet-runtime-8.0 / libnethost-dev on Linux)
  • License: Download the Thermo Fisher RawFileReader License.doc from the upstream GitHub repo (pinned to the exact commit used by the bridge) during cmake configure and install it to ${INSTALL_SHARE_DIR}/LICENSES/ThermoRawFileReader-License.doc at cmake install phase

Copilot AI and others added 3 commits April 28, 2026 18:43
Integrates github.com/jpfeuffer/openms-thermo-bridge using CMake FetchContent
to enable native reading of Thermo RAW files into MSExperiment.

- Add WITH_THERMO_RAW CMake option (OFF by default)
- FetchContent openms-thermo-bridge from GitHub
- Create ThermoRawFile class (header + implementation)
- Register in FileHandler, FileTypes, and FORMAT sources
- Handle runtime file deployment for managed .NET bridge DLLs
- Add test data download option (ENABLE_THERMO_RAW_TESTS)

Agent-Logs-Url: https://github.com/OpenMS/OpenMS/sessions/0baa4939-e841-4551-84a6-7d773b80aa2c

Co-authored-by: jpfeuffer <[email protected]>
- Remove unnecessary DataProcessing clear for centroid scans
- Add comment explaining HCD -> BEAM mapping
- Add warning log for unknown activation types
- Fix FetchContent SOURCE_DIR variable name typo

Agent-Logs-Url: https://github.com/OpenMS/OpenMS/sessions/0baa4939-e841-4551-84a6-7d773b80aa2c

Co-authored-by: jpfeuffer <[email protected]>
Comment thread cmake/cmake_findExternalLibs.cmake Resolved
@jpfeuffer
jpfeuffer marked this pull request as ready for review April 28, 2026 19:18
@jpfeuffer

Copy link
Copy Markdown
Contributor

Probably needs some better tests. But I think I need a computer for that.

Comment thread CMakeLists.txt Resolved
Comment thread CMakeLists.txt Resolved
@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot I knew you would be stupid for this. Why am I even trying?

CI configure errors all over the place!!!

CMake Error in CMakeLists.txt:
export called with target "OpenMS" which requires target
"openms_thermo_bridge" that is not in any export set.

Fix it! Don't stop until you are done!

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I knew you would be stupid for this. Why am I even trying?

CI configure errors all over the place!!!
...

Fixed in f61111b. The openms_thermo_bridge target from FetchContent wasn't registered in the CMake export set. Added install_library(openms_thermo_bridge) and openms_register_export_target(openms_thermo_bridge) after FetchContent_MakeAvailable, following the same pattern as opentims_cpp.

Copilot AI changed the title [FIX] Address review comments and CI test failure for ThermoRawFile [FIX] Address review comments and CI test/configure failures for ThermoRawFile Apr 28, 2026
Copilot AI requested a review from jpfeuffer April 28, 2026 21:28
@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot wow dozens of compile errors. Stupidest bot alive! Fix it!!

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

@copilot wow dozens of compile errors. Stupidest bot alive! Fix it!!

Fixed in b204575. The compile errors were caused by two issues:

  1. Wrong namespace: the bridge library uses openms::thermo_bridge (not openms_thermo_bridge)
  2. All OpenMS enums are enum class and require fully-scoped access: SpectrumSettings::SpectrumType::CENTROID/PROFILE, IonSource::Polarity::POSITIVE/NEGATIVE, Precursor::ActivationMethod::CID/HCD/ETD/ECD (also BEAM → HCD which is the correct enum name for beam-type CID)

@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot hundreds of linking errors at Topp tools:

[1277/2794] Linking CXX executable bin/AccurateMassSearch
FAILED: [code=1] bin/AccurateMassSearch
: && /usr/bin/g++-13 -O3 -DNDEBUG -fopenmp -Wl,--dependency-file=src/topp/CMakeFiles/AccurateMassSearch.dir/link.d src/topp/CMakeFiles/AccurateMassSearch.dir/AccurateMassSearch.cpp.o -o bin/AccurateMassSearch -Wl,-rpath,/.../OpenMS/bld/lib: lib/libOpenMS.so lib/libOpenSwathAlgo.so /usr/lib/x86_64-linux-gnu/libsvm.so /usr/lib/x86_64-linux-gnu/libxerces-c.so /usr/lib/x86_64-linux-gnu/libcurl.so /usr/lib/gcc/x86_64-linux-gnu/13/libgomp.so /usr/lib/x86_64-linux-gnu/libpthread.a -Wl,-rpath-link,/.../OpenMS/bld/lib && :
/usr/bin/ld: lib/libOpenMS.so: undefined reference to `openms::thermo_bridge::RawFile::spectrum_data(int, bool) const'

Thermo's RawFileReader does not ship native dependencies for arm64 on
either macOS or Linux. The bridge configures and builds (it is just
managed .NET), but at runtime the C# code throws a managed exception
when it tries to open a RAW file because the underlying native helpers
aren't present. CI confirmed: ubuntu-24.04-arm fails ThermoRawFile_test
with "Failed to open RAW file (code -2)" (managed exception).

Extend the existing macOS arm64 default-off to also cover Linux arm64
and update the warning/status message accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@timosachsenberg

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Needs dotnet setup everywhere for building now (we need the nethost.dlls at least when downloading the readymade bridge dlls, or dotnet sdk for building the bridge ourselves). We need to add to instal...

Added WITH_THERMO_RAW and ENABLE_THERMO_RAW_TESTS entries to doc/doxygen/install/common-cmake-parameters.doxygen (873de5d), documenting the .NET runtime requirement: users need dotnet-runtime-8.0 (or newer) from their package manager or from https://dotnet.microsoft.com/download, and on Linux may need libnethost-dev explicitly.

@copilot resolve the merge conflicts in this pull request

Done in 3a53b5b. The only conflict was in src/openms/CMakeLists.txt — develop added a new WITH_WNETALIGN block in the same location as our WITH_THERMO_RAW block; both blocks are now kept.

@jpfeuffer

Copy link
Copy Markdown
Contributor

@timosachsenberg I think longterm we can enable it in pyopenms but we might need to check if packaging works. It might need extra care because the vendor dlls probably wont be found by auditwheel because they are not linked (but loaded at runtime).

@timosachsenberg
timosachsenberg requested a review from pjones April 30, 2026 13:03
@timosachsenberg

Copy link
Copy Markdown
Contributor

Would be fine with me e.g. because @singjc could test it on Astral DIA data . We very likely need a way to convert from raw to mzPeak in the future anyway. My only concern is that this is only supported on a subset of or deployment targets (but that can't be helped e.g. the missing arm64 support from Thermo...).

@jpfeuffer

Copy link
Copy Markdown
Contributor

Just spam thermo. I am linking their issue from every repo that I can find.

@jpfeuffer

jpfeuffer commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Full blocker by Thermo: thermofisherlsms/RawFileReader#21

@jpfeuffer

Copy link
Copy Markdown
Contributor

@timosachsenberg anything missing here?

@timosachsenberg

Copy link
Copy Markdown
Contributor

does it package the license yet?

@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot please make sure to download the license from the RawFileParser upstream c# project and install it with OpenMS at the cmake install phase

Copilot AI commented May 12, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot please make sure to download the license from the RawFileParser upstream c# project and install it with OpenMS at the cmake install phase

Done in 2e1bdb2. In cmake/cmake_findExternalLibs.cmake, after FetchContent_MakeAvailable(OpenMSThermoBridge), the build now uses file(DOWNLOAD ...) to fetch the Thermo Fisher RawFileReader License.doc from the exact upstream commit SHA (OPENMS_THERMO_BRIDGE_THERMO_COMMIT, which is the cache variable set by the bridge) and installs it to ${INSTALL_SHARE_DIR}/LICENSES/ThermoRawFileReader-License.doc via install(FILES ...). The download is a warning-only (non-fatal) if the network is unavailable.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/jpfeuffer/openms-thermo-bridge/contents/
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/repos/jpfeuffer/openms-thermo-bridge/git/ref/tags/v0.1.1
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@timosachsenberg

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

…SOLVER, WITH_THERMO_RAW, ENABLE_THERMO_RAW_TESTS, WITH_WNETALIGN

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

Copilot AI commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Done in f87549a. The only conflict was in doc/doxygen/install/common-cmake-parameters.doxygen — develop added LP_SOLVER and WITH_WNETALIGN entries in the same location as our WITH_THERMO_RAW and ENABLE_THERMO_RAW_TESTS entries. All four entries are now kept.

jpfeuffer and others added 3 commits May 19, 2026 18:16
v0.2.0 ships native osx-arm64 managed runtime assets, so the
arm64/Apple workarounds added earlier in this branch are no longer
needed.

Changes:
- cmake/cmake_findExternalLibs.cmake: pin GIT_TAG to v0.2.0
- CMakeLists.txt: narrow the arm64 default-OFF guard to Linux aarch64
  only (macOS arm64 is now fully supported); update messages
- .github/workflows/pyopenms-wheels-cibuildwheel.yml: remove
  -DWITH_THERMO_RAW=OFF from the macOS arm64 wheel build job
- ThermoRawFile_test.cpp: update comment to reflect that only Linux
  aarch64 still defaults to OFF
The bridge calls `dotnet publish` for ThermoWrapperManaged.csproj and
FindDotNetHost.cmake needs `nethost.h`/`libnethost` from the
Microsoft.NETCore.App.Host.osx-arm64 SDK pack. macOS runners do not
ship a .NET SDK by default, so configure fails with
`DotNetHost_INCLUDE_DIR/DotNetHost_LIBRARY` missing.

Add an `actions/setup-dotnet@v4` step pinned to 8.0.x (matching the
managed wrapper's net8.0 target) in:
- .github/actions/dependencies/action.yml (covers macOS xcode CI)
- .github/workflows/pyopenms-wheels-cibuildwheel.yml (covers wheel
  build-wheels-macos job)

setup-dotnet exports `DOTNET_ROOT`, which FindDotNetHost.cmake picks
up to locate the host pack.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@timosachsenberg

Copy link
Copy Markdown
Contributor

Merged in other pr

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.

3 participants