fre.cmor: improved and comprehensive omission tracking#833
fre.cmor: improved and comprehensive omission tracking#833
fre.cmor: improved and comprehensive omission tracking#833Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #833 +/- ##
==========================================
+ Coverage 84.12% 84.31% +0.19%
==========================================
Files 71 71
Lines 4944 4954 +10
==========================================
+ Hits 4159 4177 +18
+ Misses 785 777 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@copilot we want filepaths with the omission logging |
Done in 9fc5417. Each omission entry in the log now lists the expected file paths for that variable: The paths are constructed from |
fre.cmor: improved and comprehensive omission tracking
Done in c462371. Added
|
fre.cmor: improved and comprehensive omission tracking fre.cmor: improved and comprehensive omission tracking
Track variables that fail during CMORization in cmorize_all_variables_in_dir and log a summary omission report at the end of processing. Also improve the file-not-found warning in cmorize_target_var_files to include the specific file path. Closes #651 Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/e68efcb9-2912-425f-a49a-e478376f2c49 Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/e68efcb9-2912-425f-a49a-e478376f2c49 Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
…t comment Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/e68efcb9-2912-425f-a49a-e478376f2c49 Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/bcdc9feb-7f1f-4fb5-afb5-31bda357371c Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/bcdc9feb-7f1f-4fb5-afb5-31bda357371c Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/455a6c3d-9e51-414f-9051-fabfe918d6be Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/455a6c3d-9e51-414f-9051-fabfe918d6be Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
c462371 to
6260745
Compare
@copilot add another unit test, very similar, call it |
Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/95cdf5d2-ff17-494c-bbaf-9db2129e4106 Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
…ailure Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/95cdf5d2-ff17-494c-bbaf-9db2129e4106 Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Added in cd06f44. The new test
|
|
ilaflott/FREmorizer#75 solved this for |
Describe your changes
When
fre cmor runprocesses multiple variables and some fail, failures were logged individually but never summarized. The existing code even had a placeholder comment# log an omitted variable here....Changes:
cmor_mixer.py/cmorize_all_variables_in_dir: Collect failed variables in anomissionslist during the processing loop. After the loop, emit a structured summary viafre_logger.warningthat includes the variable names, failure reason, and the expected input file paths for each omitted variable:fre/cmor/tests/test_cmor_mixer_omission_tracking.py: Unit tests for omission tracking covering single failure, multiple failures, all-success (no log emitted), and mixed success/failure cases — including assertions that expected file paths appear in the omission log output.fre/tests/test_fre_cmor_cli.py/test_cli_fre_cmor_run_with_logfile: CLI integration test that runsfre -vv -l LOGFILE cmor run --run_one ...against existing test data and verifies the resulting log file contains log lines from bothfre.py(the CLI entry point) andfre.cmor.cmor_mixer(the CMOR processing module).fre/tests/test_fre_cmor_cli.py/test_cli_fre_cmor_run_with_logfile_omission_case: CLI integration test that uses a varlist wheresos->sossucceeds andsosV2->tobfails (tob is a valid CMIP6_Omon variable but the sosV2 file contains sos data, not tob). Runs without--run_oneso both variables are attempted, then checks the log file for theOMISSION LOGsummary, theOMITTED local_var=sosV2 / target_var=tobentry, the expected.sosV2.ncfile path, andcmor_mixer.pymodule log lines.Issue ticket number and link (if applicable)
Checklist before requesting a review