Skip to content

Use the TOPP tool macros exported by OpenMS - #9

Merged
timosachsenberg merged 1 commit into
developfrom
use-exported-tool-macros
Dec 6, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
use-exported-tool-macros

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

cmake/topp_tool_macros.cmake was a copy of the TOPP tool macros of OpenMS (openms_reset_topp_tools(), openms_topp_tool(), openms_write_tool_registry()). The OpenMS CMake package ships them with the CLI layer as OpenMSToolMacros.cmake (install component cmake_cli, in the SDK since the 2026-12-03 nightly), and OpenMSConfig.cmake includes them when COMPONENTS CLI is requested. cmake/find_openms.cmake already does that before src/ declares any tool.

  • Remove cmake/topp_tool_macros.cmake and its include() in CMakeLists.txt.
  • cmake/find_openms.cmake: stop at configure time with a clear message if the OpenMS installation does not provide the macros.
  • Update the comment in src/tests/topp/check_tool_registry.cmake and the note in AGENTS.md.

The registry is written the same way: the OpenMS version is a superset of the copy (it adds openms_install_tool_registry(), a .tsv name check and a duplicate check for TOOLS). The output format and ordering are identical. The registry install in src/CMakeLists.txt is unchanged.

This does not depend on OpenMS/OpenMS#11048, so it is a separate PR from #8.


Generated by Claude Code

Summary by CodeRabbit

  • Build and Configuration
    • Build setup now uses the TOPP tool support provided by the installed OpenMS CLI component. Configuration stops with a clear error if that support is unavailable.
  • Documentation
    • Updated build guidance to clarify where TOPP tool support comes from and where tool entries are recorded.

cmake/topp_tool_macros.cmake was a copy of the TOPP tool macros of OpenMS
(openms_reset_topp_tools, openms_topp_tool, openms_write_tool_registry). The
OpenMS CMake package installs them as OpenMSToolMacros.cmake with the CLI
layer and includes them on find_package(OpenMS COMPONENTS CLI), which
cmake/find_openms.cmake already does before src/ declares any tool. Drop the
copy and fail at configure time with a clear message when the OpenMS
installation does not provide the macros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmaLwgm7kqfDpQXyQYf
@timosachsenberg
timosachsenberg marked this pull request as ready for review December 6, 2026 14:35
@coderabbitai

coderabbitai Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The CMake configuration no longer includes the local TOPP macro file. It checks that openms_topp_tool is available from the OpenMS CLI component. Guidance and a test comment now identify the macro source and registry writer.

Changes: OpenMS TOPP Macro Integration

Layer / File(s) Summary
Use TOPP macros from the OpenMS CLI package
cmake/find_openms.cmake, CMakeLists.txt, cmake/topp_tool_macros.cmake, AGENTS.md, src/tests/topp/check_tool_registry.cmake
The OpenMS CLI setup checks for openms_topp_tool and stops configuration with a fatal error if it is unavailable. The project removes its local TOPP macro include and implementation. Guidance identifies the OpenMS package macros, and a test comment attributes registry generation to openms_write_tool_registry().

Change: Refactor

Merge Risk: Minimal · up to 9772e

The change switches the build to the TOPP tool macros exported by OpenMS and stops configuration with a clear message if they are missing. No concrete risk was found in the changes. The only unchecked point is that the exported macros match the removed local copy, which a normal configure and registry test run will exercise.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: the PR stops using the repository's copied TOPP tool macros and uses the versions exported by OpenMS. The changeset matches this. CMakeLists.txt drops the include of …
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.
Full details: Title check

Explanation

The title states the main change: the PR stops using the repository's copied TOPP tool macros and uses the versions exported by OpenMS. The changeset matches this. CMakeLists.txt drops the include of cmake/topp_tool_macros.cmake, cmake/topp_tool_macros.cmake is deleted, and cmake/find_openms.cmake adds a check that openms_topp_tool is available after find_package(OpenMS COMPONENTS CLI).

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 checks the CLI trail,
Where TOPP macros now prevail.
The local file hops away,
A clear check guards the build today.
The registry note is fresh and bright,
Then bunny bounds into the night.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cf042739-06ab-4a3b-bcfc-1cc2b6a7383b
Commits

Reviewing files that changed from the base of the PR and between 5e58195 and 9772e56.

Files selected for processing: 5

  • AGENTS.md
  • CMakeLists.txt
  • cmake/find_openms.cmake
  • cmake/topp_tool_macros.cmake
  • src/tests/topp/check_tool_registry.cmake
Files with no reviewable changes: 2

  • CMakeLists.txt
  • cmake/topp_tool_macros.cmake

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

@timosachsenberg
timosachsenberg merged commit f8783a3 into develop Dec 6, 2026
6 checks passed
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