wmo-im / pywcmp

pywcmp provides validation and quality assessment capabilities for the WMO WIS Core Metadata Profile (WCMP)
https://community.wmo.int/activity-areas/wis
Other
9 stars 8 forks source link

add initial KPI framework #11

Closed tomkralidis closed 3 years ago

tomkralidis commented 3 years ago

This PR adds a simple KPI framework which can be run via the command line or from a downstream Python application.

The basic idea is that pywcmp/kpi:WMOCoreMetadataProfileKeyPerformanceIndicators will implement all the approved KPIs as functions which return a tuple of total and score. pywcmp/kpi:WMOCoreMetadataProfileKeyPerformanceIndicators.run_kpis() runs all the KPIs and calculates a total raw score as well as total percentage, returned as a dict. This allows for reporting to the CLI on stdout, or in a downstream application.

In addition, a number of small changes (function annotations, etc.) for housekeeping are added.