Skip to content

[INTERNAL,TEST] Separate filesystem configuration and temporary-file policy - #10098

Merged
timosachsenberg merged 3 commits into
developfrom
claude/openms-pr-10089-rebase-vkw1w9
Sep 9, 2026
Merged

timosachsenberg merged 3 commits into
developfrom
claude/openms-pr-10089-rebase-vkw1w9

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Implements step 5 of #10083. Supersedes #10089, rebased onto develop now that its prerequisite #10088 (filename extraction) is merged.

File.cpp currently combines basic filesystem/shared-data operations with INI settings and temporary-file policy. FileConfig.cpp now contains the settings and user/temp/database path policy. FileTemp.cpp contains both TempDir constructors, the unique-directory implementation, temporary filename allocation, and its registry definition. The definitions retain their existing method bodies and remain in the same OpenMS library.

Basic File.cpp no longer includes Param/ParamXMLFile or references the settings/temp-policy methods. This resolves the two settings-related File.cpp edges recorded in #10083. The File facade still exposes settings-dependent APIs; this does not claim the entire class is independently linkable.

The File class test now covers the explicit-parent TempDir constructor and unique/explicit temporary filename allocation, in addition to the existing default constructor, cleanup, and settings tests.

Rebase notes: the duplicate step-4 commit was dropped, and the commit removing the tools/ci/core_dependencies baseline files became empty because develop already deleted them. Every line removed from File.cpp reappears verbatim in FileConfig.cpp or FileTemp.cpp, and there are no duplicate includes after the include cleanup in #10096.

Validation: all extracted blocks compared verbatim against develop; no configuration/temp-policy references remain in File.cpp; git diff --check passes. The OpenMS library, File_test and FileNameUtils_test were built locally with GCC on Ubuntu 24.04 (system Boost 1.83, Xerces-C 3.2, Arrow 23) with no warnings in the touched files, and both tests pass, including the new explicit-parent TempDir section. Platform compilation and the full test suite are submitted to CI.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GKpQTR4f8sxMUJer1j5YD2

Summary by CodeRabbit

  • Improvements

    • Improved handling of temporary directories and files, including unique naming, automatic cleanup, and configurable temporary locations.
    • Improved discovery of user configuration, system settings, and database files across supported platforms.
    • Preserved the existing File API while making configuration and temporary-file behavior more consistent.
  • Tests

    • Added coverage for temporary-directory cleanup, parent-directory preservation, and unique temporary-file generation.

…policy

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.

Part of #10083, step 5; follows step 4.
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b2c58d56-70da-452a-80cd-4f8d1cfeeec2

📥 Commits

Reviewing files that changed from the base of the PR and between 37a944e and d391d3a.

📒 Files selected for processing (6)
  • CHANGELOG
  • src/openms/source/SYSTEM/File.cpp
  • src/openms/source/SYSTEM/FileConfig.cpp
  • src/openms/source/SYSTEM/FileTemp.cpp
  • src/openms/source/SYSTEM/sources.cmake
  • src/tests/class_tests/openms/source/File_test.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Filesystem configuration and temporary-file implementations move from File.cpp into FileConfig.cpp and FileTemp.cpp. The build includes both files, and tests cover temporary-directory cleanup and temporary-file naming.

Changes

File implementation split

Layer / File(s) Summary
Configuration implementation
src/openms/source/SYSTEM/File.cpp, src/openms/source/SYSTEM/FileConfig.cpp
Configuration, directory resolution, database lookup, and system-parameter loading move into FileConfig.cpp.
Temporary-resource implementation
src/openms/source/SYSTEM/File.cpp, src/openms/source/SYSTEM/FileTemp.cpp, src/tests/class_tests/openms/source/File_test.cpp
Temporary-directory creation and cleanup, temporary-file tracking, and filename selection move into FileTemp.cpp. Tests cover explicit parent directories and temporary-file names.
Build and release integration
src/openms/source/SYSTEM/sources.cmake, CHANGELOG
The new source files are added to the SYSTEM build. The changelog records the split without API changes.

Suggested reviewers: cbielow

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d391d

The filesystem implementation is reorganized without API changes, with build integration and focused temporary-resource tests in place. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 4 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: separating filesystem configuration and temporary-file policy. The prefix identifies internal test context but does not make the title unclear.
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: Docstring Coverage

Explanation

Docstring coverage is 4.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 4 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/openms-pr-10089-rebase-vkw1w9

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 reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@timosachsenberg
timosachsenberg merged commit 13582ba into develop Sep 9, 2026
35 checks passed
@timosachsenberg
timosachsenberg deleted the claude/openms-pr-10089-rebase-vkw1w9 branch September 9, 2026 18:31
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