Skip to content

Repair fix_file#2993

Draft
bouweandela wants to merge 3 commits intomainfrom
fix-fix-file
Draft

Repair fix_file#2993
bouweandela wants to merge 3 commits intomainfrom
fix-fix-file

Conversation

@bouweandela
Copy link
Member

@bouweandela bouweandela commented Feb 19, 2026

Description

The preprocessor function fix_file is currently broken if it actually fixes a file, it works fine if no fix is implemented. This pull request:

  • Changes the preprocessor function fix_file so its return type is compatible with what is expected by the function esmvalcore.preprocessor.preprocess. In practice, the 4 currently implemented fix_file methods all return paths.
  • Updated the code to set the attributes property on the original input file for recording provenance if fixes have been applied.
  • Tested with recipe ref/recipe_ref_scatterplot.yml.

Link to documentation:


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.65%. Comparing base (e311187) to head (41d59cd).

Files with missing lines Patch % Lines
esmvalcore/cmor/fix.py 64.70% 6 Missing ⚠️

❌ Your patch check has failed because the patch coverage (64.70%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2993      +/-   ##
==========================================
- Coverage   95.68%   95.65%   -0.04%     
==========================================
  Files         267      267              
  Lines       15726    15741      +15     
==========================================
+ Hits        15048    15057       +9     
- Misses        678      684       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bouweandela bouweandela added the bug Something isn't working label Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments