Skip to content

Commit

Permalink
Merge pull request #268 from NASA-IMPACT/dev
Browse files Browse the repository at this point in the history
Minor fixes and additional checks:
- Updated UMM-C schema file
- Added science_keywords_presence_check
- Added DOI authority presence check for echo-c and umm-c
- Adjusted output message for url_check
- Added orbit fields to rule_mapping for spatial_extent_fulfillment_check
- Resolved ISO standard type in check_messages
  • Loading branch information
jenny-m-wood authored Oct 11, 2023
2 parents 88b7ac5 + 3b9c02c commit 6195cea
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 44 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## v1.2.4
- Updated UMM-C schema file
- Added science_keywords_presence_check
- Added DOI authority presence check for echo-c and umm-c
- Adjusted output message for url_check
- Added orbit fields to rule_mapping for spatial_extent_fulfillment_check
- Resolved ISO standard typo in check_messages

## v1.2.3
- Updated schema files
- Added Free And Open Data check
Expand Down
30 changes: 23 additions & 7 deletions pyQuARC/schemas/check_messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
"remediation": "Recommend providing a FreeAndOpenData value of 'true'."
},
"datetime_format_check": {
"failure": "`{}` does not adhere to the ISO 1601 standard.",
"failure": "`{}` does not adhere to the ISO 8601 standard.",
"help": {
"message": "",
"url": "https://www.w3.org/TR/NOTE-datetime"
},
"remediation": "Ensure that the datetime complies with the ISO 1601 standard."
"remediation": "Ensure that the datetime complies with the ISO 8601 standard."
},
"date_or_datetime_format_check": {
"failure": "`{}` does not adhere to the ISO 1601 standard for date or datetime.",
"failure": "`{}` does not adhere to the ISO 8601 standard for date or datetime.",
"help": {
"message": "",
"url": "https://www.w3.org/TR/NOTE-datetime"
},
"remediation": "Ensure that the date or datetime complies with the ISO 1601 standard."
"remediation": "Ensure that the date or datetime complies with the ISO 8601 standard."
},
"data_update_time_logic_check": {
"failure": "The Update/Revision date `{}` comes before the provided Insert/Creation time `{}`.",
Expand All @@ -40,12 +40,12 @@
"remediation": "Recommend updating the Revision date so that it comes chronologically after the Insert/Creation time."
},
"url_check": {
"failure": "Invalid URL/s: `{}`.",
"failure": "A URL with a status code other than 200 has been identified: `{}`.",
"help": {
"message": "",
"url": "https://en.wikipedia.org/wiki/List_of_HTTP_status_codes"
},
"remediation": "Please provide valid URL/s."
"remediation": "This often indicates a broken link. If the URL is broken, recommend revising."
},
"shortname_uniqueness": {
"failure": "The EntryTitle/DataSetId `{}` is identical to the ShortName `{}`.",
Expand Down Expand Up @@ -107,10 +107,18 @@
"failure": "`{}` is not a valid GCMD science keyword.",
"help": {
"message": "",
"url": ""
"url": "https://wiki.earthdata.nasa.gov/display/CMR/Science+Keywords"
},
"remediation": "Provide a valid GCMD keyword or submit a request to [email protected] to have this keyword added to the GCMD KMS."
},
"science_keywords_presence_check": {
"failure": "Science keywords are required.",
"help": {
"message": "",
"url": "https://wiki.earthdata.nasa.gov/display/CMR/Science+Keywords"
},
"remediation": "Recommend providing relevant science keywords from the following list: https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/sciencekeywords?format=csv."
},
"location_gcmd_check": {
"failure": "`{}` is not a valid GCMD location keyword.",
"help": {
Expand All @@ -127,6 +135,14 @@
},
"remediation": "The DOI Authority should be \"https://doi.org\" for all NASA collections."
},
"doi_authority_presence_check": {
"failure": "No DOI authority is provided.",
"help": {
"message": "",
"url": "https://wiki.earthdata.nasa.gov/display/CMR/DOI"
},
"remediation": "Recommend providing \"https://doi.org\" as the DOI authority."
},
"delete_time_check": {
"failure": "The delete date `{}` is in the past.",
"help": {
Expand Down
70 changes: 65 additions & 5 deletions pyQuARC/schemas/rule_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,40 @@
"severity": "error",
"check_id": "science_keywords_gcmd_check"
},
"science_keywords_presence_check": {
"rule_name": "Science keywords presence check",
"fields_to_apply": {
"echo-c": [
{
"fields": [
"Collection/ScienceKeywords/ScienceKeyword/CategoryKeyword",
"Collection/ScienceKeywords/ScienceKeyword/TopicKeyword",
"Collection/ScienceKeywords/ScienceKeyword/TermKeyword"
]
}
],
"dif10": [
{
"fields": [
"DIF/Science_Keywords/Category",
"DIF/Science_Keywords/Topic",
"DIF/Science_Keywords/Term"
]
}
],
"umm-c": [
{
"fields": [
"ScienceKeywords/Category",
"ScienceKeywords/Topic",
"ScienceKeywords/Term"
]
}
]
},
"severity": "error",
"check_id": "one_item_presence_check"
},
"eosdis_doi_authority_check": {
"rule_name": "EOSDIS DOI Authority Check",
"fields_to_apply": {
Expand Down Expand Up @@ -1090,6 +1124,27 @@
"severity": "info",
"check_id": "controlled_keywords_check"
},
"doi_authority_presence_check": {
"rule_name": "DOI Authority Presence Check",
"fields_to_apply": {
"echo-c": [
{
"fields": [
"Collection/DOI/Authority"
]
}
],
"umm-c": [
{
"fields": [
"DOI/Authority"
]
}
]
},
"severity": "info",
"check_id": "one_item_presence_check"
},
"delete_time_check": {
"rule_name": "Delete Time Check",
"fields_to_apply": {
Expand Down Expand Up @@ -3727,7 +3782,8 @@
"Collection/Spatial/HorizontalSpatialDomain/Geometry/Point",
"Collection/Spatial/HorizontalSpatialDomain/Geometry/BoundingRectangle",
"Collection/Spatial/HorizontalSpatialDomain/Geometry/GPolygon",
"Collection/Spatial/HorizontalSpatialDomain/Geometry/Line"
"Collection/Spatial/HorizontalSpatialDomain/Geometry/Line",
"Collection/Spatial/OrbitParameters"
]
}
],
Expand All @@ -3737,7 +3793,8 @@
"Granule/Spatial/HorizontalSpatialDomain/Geometry/Point",
"Granule/Spatial/HorizontalSpatialDomain/Geometry/BoundingRectangle",
"Granule/Spatial/HorizontalSpatialDomain/Geometry/GPolygon",
"Granule/Spatial/HorizontalSpatialDomain/Geometry/Line"
"Granule/Spatial/HorizontalSpatialDomain/Geometry/Line",
"Granule/Spatial/HorizontalSpatialDomain/Orbit"
]
}
],
Expand All @@ -3747,7 +3804,8 @@
"DIF/Spatial_Coverage/Geometry/Bounding_Rectangle",
"DIF/Spatial_Coverage/Geometry/Point",
"DIF/Spatial_Coverage/Geometry/GPolygon",
"DIF/Spatial_Coverage/Geometry/Line"
"DIF/Spatial_Coverage/Geometry/Line",
"DIF/Spatial_Coverage/Orbit_Parameters"
]
}
],
Expand All @@ -3757,7 +3815,8 @@
"SpatialExtent/HorizontalSpatialDomain/Geometry/Point",
"SpatialExtent/HorizontalSpatialDomain/Geometry/BoundingRectangles",
"SpatialExtent/HorizontalSpatialDomain/Geometry/Lines",
"SpatialExtent/HorizontalSpatialDomain/Geometry/GPolygons"
"SpatialExtent/HorizontalSpatialDomain/Geometry/GPolygons",
"SpatialExtent/OrbitParameters"
]
}
],
Expand All @@ -3767,7 +3826,8 @@
"SpatialExtent/HorizontalSpatialDomain/Geometry/Points",
"SpatialExtent/HorizontalSpatialDomain/Geometry/BoundingRectangles",
"SpatialExtent/HorizontalSpatialDomain/Geometry/Lines",
"SpatialExtent/HorizontalSpatialDomain/Geometry/GPolygons"
"SpatialExtent/HorizontalSpatialDomain/Geometry/GPolygons",
"SpatialExtent/HorizontalSpatialDomain/Orbit"
]
}
]
Expand Down
Loading

0 comments on commit 6195cea

Please sign in to comment.