Repository navigation
refactor: remove Qt dependency from TOPP tools - #9041
Conversation
Covers two-phase approach: replace Qt6::Core usage with std/OpenMS utilities in 11 tools, then move 3 GUI-entangled tools to openms_gui. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
13 tasks covering Phase 1 (replace Qt6::Core in 11 tools) and Phase 2 (move 3 GUI tools to openms_gui, clean up CMake). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove unused #include <OpenMS/VISUAL/MultiGradient.h> from Resampler.cpp, move Resampler from TOPP_executables_with_GUIlib to TOPP_executables, remove it from the ToolHandler GUI_tools exclusion list, and drop the WITH_GUI guard around its TOPP test definitions. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ile_size() Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…FileHandler::stripExtension() Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… Base64 Remove Qt includes (QByteArray, QFile, QString, QFileInfo) and replace with OpenMS FileHandler/Base64 and std::ifstream/ostringstream for file reading and base64 encoding. Use FileHandler::stripExtension + File::basename for compound-extension-aware basename extraction. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ile::absolutePath() Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…filesystem::directory_iterator Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Replace QDir::absolutePath() and QFileInfo::baseName() usage in OpenSwathFileSplitter and OpenSwathWorkflow with OpenMS-native File::absolutePath() and FileHandler::stripExtension(File::basename()), removing the Qt dependency from both TOPP tools. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Remove Qt dependency on QRegularExpression, replacing it with std::regex and std::remove for space stripping as part of Qt removal from TOPP tools. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…s and File utilities Replace all Qt dependencies in MetaProSIP.cpp: - Remove QtCore includes (QStringList, QFile, QDir, QFileInfo, QProcess) - Add ExternalProcess, filesystem includes - Add runRScript() helper to consolidate 5 near-identical QProcess blocks - Replace QProcess R execution with ExternalProcess::run() calls - Replace QFile::copy/remove with File::copy/remove - Replace QDir with File::absolutePath and std::filesystem::create_directories - Replace QFileInfo::baseName with FileHandler::stripExtension(File::basename()) - Change QString function parameters to const String& Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…-free Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Move 3 TOPP tools that depend on OpenMS_GUI into the GUI library directory, making src/topp/ 100% Qt-free. Update CMake registration so the tools are built as part of the GUI executables, remain in the TOPP_TOOLS list for CWL/INI generation, and are dependencies of the TOPP collection target. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Qt is no longer needed by any non-GUI component. Guard KNIME packaging against missing Qt targets. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Base64::encode is designed for floating-point arrays, not raw bytes. Use encodeStrings instead which handles arbitrary binary data correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…le_size OpenMS::String does not implicitly convert to std::filesystem::path. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Adds stemName(), extension(), listDirectories() to OpenMS::File and replaces awkward patterns in TOPP tools. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughGate Qt discovery/use to GUI builds; add File::stemName/extension/listDirectories; replace Qt types/APIs across many TOPP tools with std::filesystem/OpenMS utilities and ExternalProcess; move select GUI executables into GUI wiring; update tests and CMake ordering to support Qt‑free TOPP builds. Changes
Sequence Diagram(s)sequenceDiagram
participant MetaProSIP as MetaProSIP
participant ExternalProcess as ExternalProcess
participant R as R (interpreter)
participant FileSys as File (OpenMS)
MetaProSIP->>ExternalProcess: build R cmd (--vanilla, --file=script.R, env R_LIBS=tmp_path)
ExternalProcess->>R: spawn R process, capture stdout+stderr
R-->>ExternalProcess: stdout/stderr (merged)
ExternalProcess-->>MetaProSIP: return state + merged output
MetaProSIP->>FileSys: copy generated plot files tmp_path -> output_dir
MetaProSIP->>FileSys: remove temp files (if debug_level<1)
Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/topp/CometAdapter.cpp (1)
306-306: Use OpenMS primitive type forcomet_year.Please switch
inttoIntin this newly added line to stay consistent with project type conventions.♻️ Proposed fix
- const int comet_year = std::stoi(match[1].str()); + const Int comet_year = static_cast<Int>(std::stoi(match[1].str()));As per coding guidelines, "Use OpenMS primitive types from
OpenMS/CONCEPT/Types.hinstead of standard C++ types".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/topp/CometAdapter.cpp` at line 306, The declaration uses a standard C++ type for comet_year; change its type from int to OpenMS primitive Int to follow project conventions (replace the line declaring comet_year: "const int comet_year = std::stoi(match[1].str());" with a declaration using Int and assign using std::stoi or equivalent). Update the symbol comet_year in CometAdapter.cpp so it uses OpenMS/CONCEPT/Types.h's Int type and ensure any includes already provide that typedef.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/superpowers/plans/2026-03-30-remove-qt-from-topp-tools.md`:
- Around line 1064-1067: The cmake reconfigure step in "Step 8: Build with
WITH_GUI=OFF" is using positional args and treats OpenMS-build as the source;
change the command to use explicit -S (source) and -B (build) flags so the
source root and build directory are unambiguous when running from the repo root;
update the text that references the cmake invocation (the line that currently
shows `cmake -DWITH_GUI=OFF OpenMS-build && cmake --build OpenMS-build
-j$(nproc)`) to use -S and -B respectively and keep the subsequent build
invocation targeting the same build directory name.
In `@src/openms_gui/CMakeLists.txt`:
- Around line 98-101: The current CMake logic appends GUI_TOPP_TOOLS
(ExecutePipeline, ImageCreator, INIUpdater) into the cached TOPP_TOOLS before
TOPP_TOOLS is initialized by topp, causing the topp write to overwrite the GUI
entries; fix by either moving add_subdirectory(topp) to execute before
add_subdirectory(openms_gui) in src/CMakeLists.txt so topp initializes
TOPP_TOOLS first, or change the GUI append in src/openms_gui/CMakeLists.txt to
update TOPP_TOOLS after topp runs (or append without CACHE FORCE so it preserves
existing cached values) — target the symbols add_subdirectory(openms_gui),
add_subdirectory(topp), GUI_TOPP_TOOLS and TOPP_TOOLS when making the change.
In `@src/topp/MetaProSIP.cpp`:
- Around line 476-485: The startup diagnostic string error_msg produced by
ExternalProcess::run (used in runRScript via variables proc, error_msg,
r_executable, args) is never surfaced; update the failure handling after
proc.run so that when state != 0 or error_msg is non-empty you include error_msg
in the logged/returned failure details (e.g., append it to
merged_output/captured_output or include it in the error log message) instead of
only the generic “process returned with non 0 status” message; ensure the same
change touches all new failure paths so missing R, permission or launch errors
are visible.
---
Nitpick comments:
In `@src/topp/CometAdapter.cpp`:
- Line 306: The declaration uses a standard C++ type for comet_year; change its
type from int to OpenMS primitive Int to follow project conventions (replace the
line declaring comet_year: "const int comet_year = std::stoi(match[1].str());"
with a declaration using Int and assign using std::stoi or equivalent). Update
the symbol comet_year in CometAdapter.cpp so it uses OpenMS/CONCEPT/Types.h's
Int type and ensure any includes already provide that typedef.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 48632921-47a5-4df9-adc9-96cda9c0ffa1
📒 Files selected for processing (27)
cmake/cmake_findExternalLibs.cmakecmake/knime_package_support.cmakedocs/superpowers/plans/2026-03-30-remove-qt-from-topp-tools.mddocs/superpowers/specs/2026-03-30-remove-qt-from-topp-tools-design.mdsrc/openms/source/APPLICATIONS/ToolHandler.cppsrc/openms_gui/CMakeLists.txtsrc/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/ExecutePipeline.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/INIUpdater.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/ImageCreator.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/executables.cmakesrc/tests/topp/CMakeLists.txtsrc/topp/AssayGeneratorMetaboSirius.cppsrc/topp/CMakeLists.txtsrc/topp/CometAdapter.cppsrc/topp/IDRipper.cppsrc/topp/MetaProSIP.cppsrc/topp/MzMLSplitter.cppsrc/topp/OpenSwathFileSplitter.cppsrc/topp/OpenSwathWorkflow.cppsrc/topp/QCEmbedder.cppsrc/topp/QCExporter.cppsrc/topp/QCExtractor.cppsrc/topp/QCImporter.cppsrc/topp/QCMerger.cppsrc/topp/QCShrinker.cppsrc/topp/Resampler.cppsrc/topp/executables.cmake
💤 Files with no reviewable changes (6)
- src/topp/QCImporter.cpp
- src/topp/Resampler.cpp
- src/topp/QCExporter.cpp
- src/openms/source/APPLICATIONS/ToolHandler.cpp
- src/topp/QCMerger.cpp
- src/topp/CMakeLists.txt
Adds File::stemName(path) as a convenience wrapper around FileHandler::stripExtension(File::basename(path)), covering the pattern that appears 32 times across the codebase. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Adds File::listDirectories() static method that returns a sorted StringList of subdirectory paths (non-recursive) using std::filesystem, with no-throw semantics via std::error_code. Includes unit tests. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…makeDir() Replace FileHandler::stripExtension(File::basename(...)) with File::stemName(...) across 17 call sites in 10 TOPP tools. Replace raw std::filesystem calls with File API methods in AssayGeneratorMetaboSirius, MzMLSplitter, and MetaProSIP. Remove unnecessary #include <filesystem> and #include <FileHandler.h> where they are no longer needed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Swap add_subdirectory order in src/CMakeLists.txt: topp before openms_gui so TOPP_TOOLS cache is initialized before GUI appends. Fixes CWL/CTD generation for moved GUI tools. - Surface ExternalProcess error_msg in MetaProSIP's runRScript helper so startup failures (missing R, permissions) are visible in logs. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Re: CodeRabbit TOPP_TOOLS ordering issue — Fixed in dd02038. Swapped Re: MetaProSIP error_msg — Fixed in dd02038. Re: Plan docs cmake command — This is in plan documentation (already executed), not production code. No action needed. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/topp/ProteinQuantifier.cpp (1)
630-635:⚠️ Potential issue | 🟠 MajorDon’t strip an already-normalized stem again.
design_group_fraction_filenameis already filled withFile::stemName(f.path)at Lines 571-572. ReapplyingFile::stemName()here turns names likesample.v1.mzMLintosample, so thechannel_level_abundanceslookup can silently miss and detailedfile_and_channel_level_outputrows collapse to zeroes.Suggested fix
for (auto [fraction, design_filename] : fraction_to_filename_map) { - // Process each filename within the fraction group - // important: strip file extension and path to find the entry - design_filename = File::stemName(design_filename); + // `design_filename` was already normalized when the map was built.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/topp/ProteinQuantifier.cpp` around lines 630 - 635, The loop over fraction_to_filename_map currently reassigns design_filename using File::stemName(design_filename) which double-normalizes names (File::stemName was already applied when populating design_group_fraction_filename), causing channel_level_abundances lookups and file_and_channel_level_output to miss entries; remove the extra File::stemName call in the loop and use the incoming design_filename as-is so lookups against channel_level_abundances and the logic that writes file_and_channel_level_output use the correct stem-preserved keys.
🧹 Nitpick comments (2)
src/openms/include/OpenMS/SYSTEM/File.h (1)
140-156: Document these new public APIs with full Doxygen tags.The new
Filemethods are exported from a public header, but the added docs still omit@brief,@param[in], and@return. Please switch these to full Doxygen blocks so the generated API docs stay complete and consistent.As per coding guidelines, "
src/openms/include/OpenMS/**/*.h: Add Doxygen comments for new public methods and classes" and "Document all method parameters with@param[in],@param[out], or@param[in,out]tags; use@briefas required first line; document return values with@return."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/include/OpenMS/SYSTEM/File.h` around lines 140 - 156, Add full Doxygen blocks for the three new public methods File::stemName, File::extension, and File::listDirectories: prepend each comment with an `@brief` one-line summary, add `@param`[in] file (or dir) describing the expected input (e.g., absolute/relative path and behavior for non-existent paths), and add an `@return` that explains the returned value (e.g., basename without extensions, extension including leading dot or empty string, sorted list of absolute-style directory paths). Ensure tags use `@param`[in] for inputs and document edge cases mentioned in the prose (compound extensions, directories with dots, non-directory returns empty list). Make these changes in the public header so generated API docs include complete parameter and return documentation.src/tests/class_tests/openms/source/File_test.cpp (1)
188-191: Assert the empty-string branch directly.The new API contract says
listDirectories("")returns an empty list, but this section currently only checks that the call does not crash. Please add an explicit assertion so that edge case stays covered.Suggested test tweak
// empty string returns empty list (not a directory) StringList from_empty = File::listDirectories(""); - // just verify it doesn't crash - result depends on cwd + TEST_EQUAL(from_empty.size(), 0);Based on learnings, "Write unit tests for new functionality and ensure existing tests pass before suggesting changes".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/tests/class_tests/openms/source/File_test.cpp` around lines 188 - 191, The test currently calls File::listDirectories("") into variable from_empty but only verifies it doesn't crash; change the test to explicitly assert the new API contract by adding an assertion that from_empty is empty (e.g., check from_empty.empty() or size()==0) so the empty-string branch is directly validated; locate the assertion near the existing variable from_empty in the File_test.cpp test section that uses File::listDirectories("") and add the empty-list check for from_empty.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/SYSTEM/File.cpp`:
- Around line 351-366: In File::listDirectories, ensure returned paths are
absolute and that no exceptions are thrown: when iterating entries from
fs::directory_iterator(dir_path, ec) call entry.is_directory(entry_ec) (the
error-code overload) and skip entries that set entry_ec or return false; for
entries that are directories, compute an absolute path using
fs::absolute(entry.path(), abs_ec) and push abs_path.generic_string() only if
abs_ec is clear; reset/declare fresh std::error_code variables (e.g., entry_ec
and abs_ec) for each check so OS errors are handled silently and the function
preserves the documented no-throw and absolute-path contracts.
---
Outside diff comments:
In `@src/topp/ProteinQuantifier.cpp`:
- Around line 630-635: The loop over fraction_to_filename_map currently
reassigns design_filename using File::stemName(design_filename) which
double-normalizes names (File::stemName was already applied when populating
design_group_fraction_filename), causing channel_level_abundances lookups and
file_and_channel_level_output to miss entries; remove the extra File::stemName
call in the loop and use the incoming design_filename as-is so lookups against
channel_level_abundances and the logic that writes file_and_channel_level_output
use the correct stem-preserved keys.
---
Nitpick comments:
In `@src/openms/include/OpenMS/SYSTEM/File.h`:
- Around line 140-156: Add full Doxygen blocks for the three new public methods
File::stemName, File::extension, and File::listDirectories: prepend each comment
with an `@brief` one-line summary, add `@param`[in] file (or dir) describing the
expected input (e.g., absolute/relative path and behavior for non-existent
paths), and add an `@return` that explains the returned value (e.g., basename
without extensions, extension including leading dot or empty string, sorted list
of absolute-style directory paths). Ensure tags use `@param`[in] for inputs and
document edge cases mentioned in the prose (compound extensions, directories
with dots, non-directory returns empty list). Make these changes in the public
header so generated API docs include complete parameter and return
documentation.
In `@src/tests/class_tests/openms/source/File_test.cpp`:
- Around line 188-191: The test currently calls File::listDirectories("") into
variable from_empty but only verifies it doesn't crash; change the test to
explicitly assert the new API contract by adding an assertion that from_empty is
empty (e.g., check from_empty.empty() or size()==0) so the empty-string branch
is directly validated; locate the assertion near the existing variable
from_empty in the File_test.cpp test section that uses File::listDirectories("")
and add the empty-list check for from_empty.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 54e2dedc-4f84-4815-9ddd-30efa6311a24
📒 Files selected for processing (16)
docs/superpowers/plans/2026-03-30-file-api-improvements.mdsrc/openms/include/OpenMS/SYSTEM/File.hsrc/openms/source/SYSTEM/File.cppsrc/tests/class_tests/openms/source/File_test.cppsrc/topp/AssayGeneratorMetaboSirius.cppsrc/topp/ConsensusID.cppsrc/topp/MascotAdapterOnline.cppsrc/topp/MetaProSIP.cppsrc/topp/MzMLSplitter.cppsrc/topp/OpenSwathFileSplitter.cppsrc/topp/ProteinQuantifier.cppsrc/topp/ProteomicsLFQ.cppsrc/topp/QCEmbedder.cppsrc/topp/QCExtractor.cppsrc/topp/QCShrinker.cppsrc/topp/SpectraSTSearchAdapter.cpp
✅ Files skipped from review due to trivial changes (4)
- src/topp/QCShrinker.cpp
- src/topp/AssayGeneratorMetaboSirius.cpp
- src/topp/MascotAdapterOnline.cpp
- src/topp/OpenSwathFileSplitter.cpp
🚧 Files skipped from review as they are similar to previous changes (3)
- src/topp/QCExtractor.cpp
- src/topp/QCEmbedder.cpp
- src/topp/MzMLSplitter.cpp
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/topp/MetaProSIP.cpp (1)
566-570:⚠️ Potential issue | 🟡 MinorSurface
runRScript()output in the remaining failure paths.The dependency-install branch is fixed now, but these branches still discard the merged stdout/stderr and only emit generic failures. That leaves plot-script errors, bad
Rpaths, and startup diagnostics opaque again. In the two plot helpers, please also pass the localdebug_levelinstead of hardcoding0.🛠️ Suggested change
- auto state = runRScript(executable, script_filename, tmp_path, 0); + String captured_output; + auto state = runRScript(executable, script_filename, tmp_path, 0, &captured_output); if (state != ExternalProcess::RETURNSTATE::SUCCESS) { OPENMS_LOG_INFO << " failed" << std::endl; - OPENMS_LOG_ERROR << "Can't execute R. Do you have R installed? Check if the path to R is in your system path variable." << std::endl; + OPENMS_LOG_ERROR << "Can't execute R. Do you have R installed? Check if the path to R is in your system path variable.\n" + << captured_output << std::endl; return false; }- auto state = runRScript(executable, tmp_path + "/" + script_filename, tmp_path, 0); + String captured_output; + auto state = runRScript(executable, tmp_path + "/" + script_filename, tmp_path, debug_level, &captured_output); if (state != ExternalProcess::RETURNSTATE::SUCCESS) { - std::cerr << "Error: Process returned with non 0 status." << std::endl; + OPENMS_LOG_ERROR << "R plot generation failed:\n" << captured_output << '\n'; }As per coding guidelines, "Use OpenMS logging macros and
OpenMS::LogStream; avoidstd::cout/std::errdirectly".Also applies to: 633-637, 844-848, 2047-2052
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/topp/MetaProSIP.cpp` around lines 566 - 570, Replace direct std::cerr/std::cout uses in the runRScript failure branches with OpenMS logging (e.g. OPENMS_LOG_ERROR or OpenMS::LogStream) and include the merged stdout/stderr returned by runRScript when ExternalProcess::RETURNSTATE::SUCCESS is not returned (use the variable that holds the merged output alongside state and script_filename/tmp_path for context). Also update the two plot helper calls that currently pass 0 to instead forward the local debug_level variable so their R invocations receive proper verbosity. Apply the same replacement (use OpenMS logging and surface merged stdout/stderr) for the other occurrences noted (the similar failure branches around the other runRScript calls).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@src/topp/MetaProSIP.cpp`:
- Around line 566-570: Replace direct std::cerr/std::cout uses in the runRScript
failure branches with OpenMS logging (e.g. OPENMS_LOG_ERROR or
OpenMS::LogStream) and include the merged stdout/stderr returned by runRScript
when ExternalProcess::RETURNSTATE::SUCCESS is not returned (use the variable
that holds the merged output alongside state and script_filename/tmp_path for
context). Also update the two plot helper calls that currently pass 0 to instead
forward the local debug_level variable so their R invocations receive proper
verbosity. Apply the same replacement (use OpenMS logging and surface merged
stdout/stderr) for the other occurrences noted (the similar failure branches
around the other runRScript calls).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8702dd51-8939-4349-85b7-dfd757da9d8e
📒 Files selected for processing (2)
src/CMakeLists.txtsrc/topp/MetaProSIP.cpp
…lute paths Use is_directory(ec) and fs::absolute() to honor the documented no-throw and absolute-path contracts. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
std::filesystem::path(std::string) uses the current code page on Windows, not UTF-8. Use OpenMS::to_path() from PathUtils.h instead. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace all 15 remaining FileHandler::stripExtension(File::basename()) call sites in src/openms/ and src/openms_gui/ with File::stemName(). Remove FileHandler.h includes where no longer needed. Remove superpowers spec and plan documents. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add missing entry for #9041 (remove Qt dependency from TOPP tools): - Qt6::Core removed from all non-GUI TOPP tools in Dependencies section - Qt6 find_package guarded by WITH_GUI in Build System section Co-authored-by: Copilot <[email protected]>
Add missing entry for #9041 (remove Qt dependency from TOPP tools): - Qt6::Core removed from all non-GUI TOPP tools in Dependencies section - Qt6 find_package guarded by WITH_GUI in Build System section Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
The Qt refactoring in #9041 removed all Qt dependencies from TOPP tools by replacing QFile, QDir, QFileInfo, QByteArray etc. with std::filesystem, OpenMS File utilities, and Base64. Qt6 is now only required for the GUI library (openms_gui / WITH_GUI), not for the command-line TOPP tools. Co-authored-by: Copilot <[email protected]>
…9060) The Qt refactoring in #9041 removed all Qt dependencies from TOPP tools by replacing QFile, QDir, QFileInfo, QByteArray etc. with std::filesystem, OpenMS File utilities, and Base64. Qt6 is now only required for the GUI library (openms_gui / WITH_GUI), not for the command-line TOPP tools. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Summary
Make
src/topp/100% Qt-free and improve theFileAPI.Phase 1: Remove Qt6::Core from 11 TOPP tools
Replace Qt usage with
std::filesystem,std::regex, and existing OpenMS utilities (File,ExternalProcess,Base64::encodeStrings):WITH_GUI)QFile::size()File::fileSize()QFileInfo::baseName()File::stemName()QFile::readAll(),QByteArray::toBase64()std::ifstream,Base64::encodeStrings()QFileInfo,QDirstd::filesystem::path,File::absolutePath()QDir,QFileInfo::baseName()File::absolutePath(),File::stemName()QDirFile::absolutePath()QDirIteratorFile::listDirectories()QRegularExpressionstd::regexQProcess,QFile,QDir,QStringExternalProcess,File,File::makeDir()Phase 2: Move 3 GUI tools to
src/openms_gui/src/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/TOPP_executables_with_GUIlibconcept entirelyTOPP_TOOLSfor CWL/INI generationCMake cleanup
find_package(Qt6 Core)insideWITH_GUIblockQt6::qmakeusage withif(TARGET Qt6::qmake)add_subdirectoryorder:toppbeforeopenms_guisoTOPP_TOOLScache initializes correctlyNew File API methods
File::stemName(path)— basename without known extensions (sample.mzML.gz->sample). Replaces theFileHandler::stripExtension(File::basename())pattern (17 TOPP sites, 32 codebase-wide).File::extension(path)— compound-aware extension extraction (.mzML.gz). SatisfiesstemName(f) + extension(f) == basename(f).File::listDirectories(dir)— sorted list of subdirectory absolute paths, no-throw, followsfileList()pattern. All 3 have unit tests.Test plan
WITH_GUI=ON(100%)ctestpasses (2495/2505, all 10 failures pre-existing)WITH_GUIgate (4/4)src/topp/WITH_GUI=OFFbuild (CI)Summary by CodeRabbit
Release Notes
New Features
Refactoring
Tests