NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Amend offline_check_fortran_vs_metadata.py to log what it has checked #592

Open peverwhee opened 1 month ago

peverwhee commented 1 month ago

Description

The offline_check_fortran_vs_metadata.py checker currently exercises this function:

def compare_fortran_and_metadata(scheme_directory, run_env):
    ## Check for files
    metadata_files = find_files_to_compare(scheme_directory)
    # Perform checks
    parse_scheme_files(metadata_files, run_env, skip_ddt_check=True)

If you pass the checker a directory that contains no .meta files, it will check nothing and return "All checks pass!", which implies it checked something when it really didn't.

Solution

Either:

  1. Log something like "No metadata files found in directory tree provided" if find_files_to_compare returns [], AND/OR
  2. Log each metadata file checked.