Repository navigation
[INTERNAL,TEST] Separate filename recognition from file loading - #10088
timosachsenberg merged 4 commits into
Conversation
Keep the established filename rules in FileNameUtils and preserve the FileHandler API as forwarding methods. Share basename handling via PathUtils and remove format-dispatch dependencies from File and ProteinIdentification. Part of OpenMS#10083, step 4.
The baseline is recorded in OpenMS#10083; no scanner or CI check is added. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Maybe worth to consider a registry… but refactoring is fine |
|
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 (11)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesFilename utility extraction
Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Filename handling remains behaviorally consistent while the dependency extraction is covered by targeted tests. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 7 files. (4 skipped: 4 unsupported.)
✨ 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. A rabbit reads each line, Comment |
…policy (#10098) Move settings methods into FileConfig.cpp and temporary-directory/registry implementation into FileTemp.cpp. Keep public definitions and method bodies unchanged, with core File.cpp free of settings and temp-policy references, and point File.cpp readers to the sibling sources. Part of #10083, step 5; follows step 4 (#10088). Supersedes #10089.
Implements step 4 of #10083.
File and ProteinIdentification currently depend on the general format dispatcher for filename-only operations. FileNameUtils now owns the four existing filename methods; FileHandler keeps forwarding entry points. File::basename and FileNameUtils share the separator operation in the existing SYSTEM/PathUtils.h.
The moved method bodies retain their existing rules, including compound/compressed suffixes, fid, unknown extensions, and both slash styles. No content detection is changed. The new class test pins representative outputs, including the existing .pep.xml/.prot.xml stripping behavior, and checks the legacy entry points.
The new helper joins the core file set and this resolves the File.cpp -> FileHandler.h edge recorded in #10083. The helper is independent of step 2's dead-include removals.
Validation: exact method-body comparison after qualifier substitutions; standalone compilation and execution of the actual PathUtils header over 4,096 mixed-separator path cases; the #10083 include check reports nine remaining edges; git diff --check passes. FileNameUtils_test, FileHandler_test and File_test are submitted to CI. No local OpenMS build was run. Kept draft pending C++ CI.
Summary by CodeRabbit
New Features
Bug Fixes
Tests