Repository navigation
Create placeholder documentation for missing tools - #8207
Conversation
WalkthroughAdds a conditional CMake post-build step for Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as CMake/Build
participant Doc as doc_param_internal
participant FS as File System
Dev->>Doc: Build doc_param_internal
alt WITH_PARQUET=OFF (new)
Doc->>FS: Create TOPP_QuantmsIOConverter.html (placeholder)
Note right of FS: Minimal HTML explains tool disabled
else WITH_PARQUET=ON
Note over Doc: No placeholder generated
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing touches🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
doc/CMakeLists.txt (1)
231-237: Optional: generalize for multiple disabled toolsIf more tools are gated by other options, consider a small list and loop to emit placeholders to avoid future one-offs.
Example (apply near the same block):
set(DISABLED_TOPP_TOOLS) if(NOT WITH_PARQUET) list(APPEND DISABLED_TOPP_TOOLS "QuantmsIOConverter") endif() foreach(_tool IN LISTS DISABLED_TOPP_TOOLS) file(WRITE "${PROJECT_BINARY_DIR}/doxygen/parameters/output/TOPP_${_tool}.html" [=[ <html><body><h2>Tool not available</h2><p>This tool is disabled due to missing optional dependencies in this build.</p></body></html> ]=]) endforeach()
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
doc/CMakeLists.txt(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: build-and-test (ubuntu-22.04, g++, 11)
- GitHub Check: build-and-test (macos-14, xcode, 15.0.1)
- GitHub Check: build-and-test (ubuntu-22.04, clang++, 15)
- GitHub Check: build-and-test (windows-2022, cl.exe, 14.36)
- GitHub Check: build-and-test (macos-13, xcode, 14.2)
- GitHub Check: cppcheck-test
🔇 Additional comments (1)
doc/CMakeLists.txt (1)
231-237: Confirmed exact TOPP tool name and output filenameTool ID is "QuantmsIOConverter" and the placeholder file is "TOPP_QuantmsIOConverter.html" — matches project references.
Locations: src/topp/QuantmsIOConverter.cpp (@page / @htmlinclude), src/topp/executables.cmake (listed), src/openms/source/APPLICATIONS/ToolHandler.cpp (tools_map), doc/CMakeLists.txt (placeholder generation).
| if(NOT WITH_PARQUET) | ||
| add_custom_command(TARGET doc_param_internal POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E echo "Creating placeholder documentation for tools disabled due to missing dependencies..." | ||
| COMMAND ${CMAKE_COMMAND} -E echo "<html><body><h2>Tool not available</h2><p>QuantmsIOConverter requires Parquet support which was disabled during compilation (WITH_PARQUET=OFF).</p></body></html>" > ${CMAKE_CURRENT_BINARY_DIR}/doxygen/parameters/output/TOPP_QuantmsIOConverter.html | ||
| COMMENT "Generate placeholder HTML for disabled tools" | ||
| VERBATIM) | ||
| endif() |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Shell redirection in add_custom_command won’t work; placeholder file won’t be created
CMake runs COMMAND tokens without a shell, so > is treated as a literal argument to echo. The file will not be written on any platform. Create the file at configure/generate time with file(MAKE_DIRECTORY) and file(WRITE) instead (cross‑platform, no shell needed).
Apply this diff:
- if(NOT WITH_PARQUET)
- add_custom_command(TARGET doc_param_internal POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E echo "Creating placeholder documentation for tools disabled due to missing dependencies..."
- COMMAND ${CMAKE_COMMAND} -E echo "<html><body><h2>Tool not available</h2><p>QuantmsIOConverter requires Parquet support which was disabled during compilation (WITH_PARQUET=OFF).</p></body></html>" > ${CMAKE_CURRENT_BINARY_DIR}/doxygen/parameters/output/TOPP_QuantmsIOConverter.html
- COMMENT "Generate placeholder HTML for disabled tools"
- VERBATIM)
- endif()
+ if(NOT WITH_PARQUET)
+ message(STATUS "Creating placeholder documentation for tools disabled due to missing dependencies...")
+ file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doxygen/parameters/output")
+ file(WRITE "${PROJECT_BINARY_DIR}/doxygen/parameters/output/TOPP_QuantmsIOConverter.html" [=[
+<html><body><h2>Tool not available</h2><p>QuantmsIOConverter requires Parquet support which was disabled during compilation (WITH_PARQUET=OFF).</p></body></html>
+]=])
+ endif()📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if(NOT WITH_PARQUET) | |
| add_custom_command(TARGET doc_param_internal POST_BUILD | |
| COMMAND ${CMAKE_COMMAND} -E echo "Creating placeholder documentation for tools disabled due to missing dependencies..." | |
| COMMAND ${CMAKE_COMMAND} -E echo "<html><body><h2>Tool not available</h2><p>QuantmsIOConverter requires Parquet support which was disabled during compilation (WITH_PARQUET=OFF).</p></body></html>" > ${CMAKE_CURRENT_BINARY_DIR}/doxygen/parameters/output/TOPP_QuantmsIOConverter.html | |
| COMMENT "Generate placeholder HTML for disabled tools" | |
| VERBATIM) | |
| endif() | |
| if(NOT WITH_PARQUET) | |
| message(STATUS "Creating placeholder documentation for tools disabled due to missing dependencies...") | |
| file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doxygen/parameters/output") | |
| file(WRITE "${PROJECT_BINARY_DIR}/doxygen/parameters/output/TOPP_QuantmsIOConverter.html" [=[ | |
| <html><body><h2>Tool not available</h2><p>QuantmsIOConverter requires Parquet support which was disabled during compilation (WITH_PARQUET=OFF).</p></body></html> | |
| ]=]) | |
| endif() |
🤖 Prompt for AI Agents
In doc/CMakeLists.txt around lines 231-237, the current add_custom_command uses
shell redirection (">") which won't create the placeholder file; replace this
build-time custom command with configure-time CMake calls: inside the existing
IF(NOT WITH_PARQUET) guard call file(MAKE_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/doxygen/parameters/output") and then file(WRITE
"${CMAKE_CURRENT_BINARY_DIR}/doxygen/parameters/output/TOPP_QuantmsIOConverter.html"
"<html>...Tool not available...</html>") to create the placeholder HTML directly
and cross-platform without invoking a shell.
|
Interesting. Do you prefer this over omitting the tool completely? |
|
I have to admit I struggled finding out how to omit it ;) |
|
WTF? Error: Unexpected internal error (Adding [14307814153891871341,0] failed. FeatureHandle exists twice in ConsensusMap!) QualityControl failed! why does this show up now? |
|
I think I will merge this for now as it fixes the doc build errors. If you have some hints where to change it I can do an update. |
|
Wasn't it working with an ifdef in Toolhandler? |
|
@jpfeuffer was not sufficient: https://github.com/OpenMS/OpenMS/blob/develop/src/openms/source/APPLICATIONS/ToolHandler.cpp#L159-L161 is already in there. |
|
@Avni2000 I merge this. If you come across a smarter solution feel free to try |
Description
fixes doxygen warning when parquet is disabled
Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI buildsSummary by CodeRabbit