Skip to content

Qc plots supports split files#553

Merged
rbeucher merged 1 commit into
mainfrom
fix/moppy_qc_plots_support_split_files
Jul 23, 2026
Merged

Qc plots supports split files#553
rbeucher merged 1 commit into
mainfrom
fix/moppy_qc_plots_support_split_files

Conversation

@rbeucher

Copy link
Copy Markdown
Member

This pull request introduces support for generating combined timeseries QC plots from sets of split CMORised NetCDF files, improves CLI and template integration, and adds extensive unit tests for the new functionality. The main changes are grouped below.

Combined Timeseries Plotting for Split Files:

  • Added generate_qc_plots_for_split_files to plots.py, which concatenates multiple time-chunked NetCDF files for the same variable and produces a single timeseries plot spanning the full period. This function is now exported in __init__.py. [1] [2]
  • Implemented logic to group files by their "base key" (stem without time-range token) and detect split-file groups for combined plotting. [1] [2]

CLI and Template Integration:

  • Updated the CLI (main in plots.py) to automatically generate combined timeseries plots for detected split-file groups, including parallel execution support and reporting. [1] [2] [3]
  • Modified the CMOR Python script template to call generate_qc_plots_for_split_files when multiple files are written, ensuring combined plots are generated during workflows.

Testing:

  • Added comprehensive unit tests for split-file handling, the new grouping logic, and combined timeseries plotting, including CLI-level tests and edge cases. [1] [2]

@rbeucher
rbeucher merged commit cebe185 into main Jul 23, 2026
2 checks passed
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.12676% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.3%. Comparing base (fbf9e90) to head (8ac8d59).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/access_moppy/qc/plots.py 20.0% 56 Missing ⚠️

❌ Your patch status has failed because the patch coverage (21.1%) is below the target coverage (90.0%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #553     +/-   ##
=======================================
- Coverage   74.9%   74.3%   -0.5%     
=======================================
  Files         36      36             
  Lines       7204    7274     +70     
  Branches    1344    1354     +10     
=======================================
+ Hits        5394    5408     +14     
- Misses      1525    1581     +56     
  Partials     285     285             
Flag Coverage Δ
unit 74.3% <21.1%> (-0.5%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant