Skip to content

Commit

Permalink
Merge pull request #17 from AtMoDat/include_optional_attributes
Browse files Browse the repository at this point in the history
Include optional global attribute checks
  • Loading branch information
jkretz authored Sep 24, 2020
2 parents d523e02 + 61e0e84 commit 0406973
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
35 changes: 35 additions & 0 deletions atmodat_standard_checker_optional.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions run_checks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 0406973

Please sign in to comment.