ncasuk / amf-check-writer

Library to write AMF compliance checks
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Explore the content of the JSON output format #75

Open agstephens opened 2 years ago

agstephens commented 2 years ago

The structure of the JSON output format looks like:

{
  "product_mean-winds_land_checks:v2.0": {  # check name:version
    "scored_points": 384,    # total points
    "possible_points": 530,  # out of total
    "high_count": 35,          # number of (high) checks where the score is lower than the possible score
    "medium_count": 0,      # " " (medium) " "
    "low_count": 0,              # " " (low) " "
    "high_priorities": [...],        # sequence of high priority checks
    "medium_priorities": [...],     # sequence of medium priority checks
    "low_priorities": [...],            # sequence of low priority checks
    "all_priorities": [...],             # sequence of ALL (high, medium and low) priority checks
    "testname": "product_mean-winds_land_checks:v2.0",  # check name:version
    "source_name": "../../NCAS-Data-Project-Training-Data/Data/ncas-anemometer-1_ral_29001225_mean-winds_v0.1.nc",
    "scoreheader": {
      "3": "High Priority",
      "2": "Medium Priority",
      "1": "Low Priority"
    },
    "cc_spec_version": "4.3.3",   # Version of compliance checker tool
    "cc_url": ""
  }
}

Inside the sequence of checks, each check looks something like:

# SUCCESSES
      {
        "name": "File name structure",
        "weight": 3,
        "value": [
          1,
          1
        ],
        "msgs": [],
        "children": []
      },
      {
        "name": "File size hard limit 4Gbytes",
        "weight": 3,
        "value": [
          1,
          1
        ],
        "msgs": [],
        "children": []
      },

# FAILURES

      {
        "name": "Global attribute: Conventions",
        "weight": 3,
        "value": [
          1,
          2
        ],
        "msgs": [
          "Required 'Conventions' global attribute value does not match regex 'CF\\-1\\.6,\\ NCAS\\-AMF\\-2\\.0\\.0'."
        ],
        "children": []
      },

Tagging @gapintheclouds @gap736uk for info.