Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align ETS and KPI report formats, add UUID and metadata to reports #122

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

tomkralidis
Copy link
Collaborator

This PR further aligns ETS and KPI report output formats:

  • adds report UUID (id)
  • removes ets-report or kpi-report top level element in lieu of report_type (ets | kpi)
  • snake case property names
  • define / emit KPI URIs

Note: PR #121 should be reviewed/merged first, then I will rebase this PR before final review/merge.

Output report examples below:

ETS:

{
    "id": "ee305ee4-8aa4-41f4-a338-74025d384b5d",
    "report_type": "ets",
    "summary": {
        "PASSED": 12,
        "FAILED": 0,
        "SKIPPED": 0
    },
    "generated_by": "pywcmp 0.10.dev0 (https://github.com/wmo-im/pywcmp)",
    "tests": [
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/conformance",
            "code": "PASSED",
            "message": "Passes given schema is compliant/valid"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/contacts",
            "code": "PASSED"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/record_created_datetime",
            "code": "PASSED"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/data_policy",
            "code": "PASSED"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/description",
            "code": "PASSED",
            "message": "Passes given schema is compliant/valid"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/extent_geospatial",
            "code": "PASSED",
            "message": "Passes given schema is compliant/valid"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/extent_temporal",
            "code": "PASSED",
            "message": "Passes given schema is compliant/valid"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/identifier",
            "code": "PASSED"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/links",
            "code": "PASSED"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/themes",
            "code": "PASSED"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/title",
            "code": "PASSED",
            "message": "Passes given schema is compliant/valid"
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/type",
            "code": "PASSED"
        }
    ],
    "datetime": "2024-08-25T14:56:40Z",
    "metadata_id": "urn:wmo:md:ca-eccc-msc:weather.observations.swob-realtime"
}

KPI:

{
    "id": "6bea2459-1dde-4fd9-b5cc-c6788052d2d3",
    "report_type": "kpi",
    "metadata_id": "urn:wmo:md:ca-eccc-msc:weather.observations.swob-realtime",
    "datetime": "2024-08-25T14:57:12Z",
    "generated_by": "pywcmp 0.10.dev0 (https://github.com/wmo-im/pywcmp)",
    "tests": [
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/contacts",
            "title": "Contacts",
            "total": 3,
            "score": 3,
            "comments": [],
            "percentage": 100.0
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/good_quality_description",
            "title": ": Good quality description",
            "total": 4,
            "score": 4,
            "comments": [],
            "percentage": 100.0
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/graphic_overview_for_metadata_records",
            "title": "Graphic overview for metadata records",
            "total": 0,
            "score": 0,
            "comments": [],
            "percentage": null
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/links_health",
            "title": "Links health",
            "total": 14,
            "score": 14,
            "comments": [],
            "percentage": 100.0
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/persistent_identifiers",
            "title": "Persistent identifiers",
            "total": 0,
            "score": 0,
            "comments": [],
            "percentage": null
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/time_intervals",
            "title": "Time intervals",
            "total": 3,
            "score": 3,
            "comments": [],
            "percentage": 100.0
        },
        {
            "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/good_quality_title",
            "title": "Surface weather observations",
            "total": 8,
            "score": 8,
            "comments": [],
            "percentage": 100.0
        }
    ],
    "summary": {
        "total": 32,
        "score": 32,
        "comments": {},
        "percentage": 100.0,
        "grade": "A"
    }
}

@tomkralidis tomkralidis added enhancement ats Abstract Test Suite kpi ets Executable Test Suite labels Aug 25, 2024
@tomkralidis tomkralidis requested review from josusky and antje-s August 25, 2024 15:01
@tomkralidis tomkralidis force-pushed the add-metadata-id-to-reports branch from 7fe0971 to d4c7baa Compare August 26, 2024 13:37
@tomkralidis tomkralidis merged commit bfd2644 into master Aug 27, 2024
4 checks passed
@tomkralidis tomkralidis deleted the add-metadata-id-to-reports branch August 27, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ats Abstract Test Suite enhancement ets Executable Test Suite kpi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants