NCAR / NCAR/ccpp-framework

Amend offline_check_fortran_vs_metadata.py to log what it has checked

Open
#592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
25
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in offline_check_fortran_vs_metadata.py at compare_fortran_and_metadata, then trace find_files_to_compare and the checker’s logging. Run it against a directory with no .meta files and confirm the output no longer implies that checks ran; if file-level logging is added, verify each metadata file checked is reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.