From 32a8f91febb39fe6c1199c1056ac79d72f8d4bb1 Mon Sep 17 00:00:00 2001 From: am-kaiser Date: Thu, 24 Sep 2020 09:33:16 +0200 Subject: [PATCH 1/2] added checks for optional global attributes (cherry picked from commit 734d857947dddd8c83888c5890c4b5ce568968b2) --- atmodat_standard_checker_optional.yml | 35 +++++++++++++++++++++++++++ run_checks.bash | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 atmodat_standard_checker_optional.yml diff --git a/atmodat_standard_checker_optional.yml b/atmodat_standard_checker_optional.yml new file mode 100644 index 00000000..25ae01b3 --- /dev/null +++ b/atmodat_standard_checker_optional.yml @@ -0,0 +1,35 @@ +suite_name: "atmodat_standard_checker_optional:1.0" +checks: + #1. check global attributes + + - check_id: "comment_attribute_type_check" + parameters: {"attribute": "comment", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "further_info_url_attribute_type_check" + parameters: {"attribute": "further_info_url", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "keywords_vocabulary_attribute_type_check" + parameters: {"attribute": "keywords_vocabulary", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "metadata_link_attribute_type_check" + parameters: {"attribute": "metadata_link", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "processing_level_attribute_type_check" + parameters: {"attribute": "processing_level", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "program_attribute_type_check" + parameters: {"attribute": "program", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "project_attribute_type_check" + parameters: {"attribute": "project", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" + + - check_id: "references_attribute_type_check" + parameters: {"attribute": "references", "type": str, "status": "optional"} + check_name: "atmodat_checklib.register.GlobalAttrTypeCheck" \ No newline at end of file diff --git a/run_checks.bash b/run_checks.bash index 5b10c5db..66dbc0bd 100755 --- a/run_checks.bash +++ b/run_checks.bash @@ -6,4 +6,6 @@ cchecker.py --y atmodat_standard_checker_mandatory.yml --test atmodat_standard_c echo "--------------------------------------------------------------------------------" cchecker.py --y atmodat_standard_checker_recommended.yml --test atmodat_standard_checker_recommended:1.0 ${ifile} echo "--------------------------------------------------------------------------------" +cchecker.py --y atmodat_standard_checker_optional.yml --test atmodat_standard_checker_optional:1.0 ${ifile} +echo "--------------------------------------------------------------------------------" cfchecks -v auto ${ifile} \ No newline at end of file From 61e0e84e39746c58f74ebd46940331ba6b38044a Mon Sep 17 00:00:00 2001 From: am-kaiser Date: Thu, 24 Sep 2020 09:35:51 +0200 Subject: [PATCH 2/2] added checks for optional global attributes (cherry picked from commit a6466b3999cd25ae9227b0de2aa9d0ca94c9007c) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 682fc32f..6aef1aa7 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ pip install cfchecker ``` ## Run tests -This repository contains the `atmodat_standard_checker_mandatory.yml` and `atmodat_standard_checker_recommended.yml` YAML files that contains the necessary checks. For running the mandatory and recommended checks, you can use the `run_checks.bash`. This file also contains the call for the CF checker: +This repository contains the `atmodat_standard_checker_mandatory.yml`, `atmodat_standard_checker_recommended.yml` and `atmodat_standard_checker_optional.yml` YAML files that contain the necessary checks. For running the mandatory, recommended and optional checks, you can use the `run_checks.bash`. This file also contains the call for the CF checker: ``` ./run_checks.bash file_to_check.nc ```