Skip to content

Commit

Permalink
Revise README.md (#51)
Browse files Browse the repository at this point in the history
* Changes to README.md

* Add information on binder and fix typos
  • Loading branch information
jkretz authored Aug 25, 2021
1 parent 3416a40 commit a7a4fb1
Showing 1 changed file with 39 additions and 24 deletions.
63 changes: 39 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# AtMoDat Standard Compliance Checks
# ATMODAT Standard Compliance Checker

This is a python library that contains checks to ensure compliance with the AtMoDat Standard.

Its core functionality is based on the [IOOS compliance checker](https://github.com/ioos/compliance-checker). The AtMoDat Standard Compliance Checks library makes use of [cc-yaml](https://github.com/cedadev/cc-yaml), which provides a plugin for the [IOOS compliance checker](https://github.com/ioos/compliance-checker) that generates check suites from YAML descriptions. Furthermore, the [Compliance Check Library](https://github.com/cedadev/compliance-check-lib) is used as the basis to define generic, reusable compliance checks. This repository is an extension of this library as it holds specific checks to ensure compliance with the AtMoDat Standard. Moreover, it contains checks to verify the compliance to the [AtMoDat CVs](https://github.com/AtMoDat/AtMoDat_CVs).
This is a python library that contains checks to ensure compliance with the ATMODAT Standard.

In addition the compliance to the CF Conventions 1.4 or higher is verified with the [CF checker](https://github.com/cedadev/cf-checker).
Its core functionality is based on the [IOOS compliance checker](https://github.com/ioos/compliance-checker). The ATMODAT Standard Compliance Checker library makes use of [cc-yaml](https://github.com/cedadev/cc-yaml), which provides a plugin for the [IOOS compliance checker](https://github.com/ioos/compliance-checker) that generates check suites from YAML descriptions. Furthermore, the [Compliance Check Library](https://github.com/cedadev/compliance-check-lib) is used as the basis to define generic, reusable compliance checks. This repository is an extension of this library as it holds specific checks to ensure compliance with the ATMODAT Standard.

## Installation (tested on a Linux machines and Mac OS)
In addition, the compliance to the CF Conventions 1.4 or higher is verified with the [CF checker](https://github.com/cedadev/cf-checker).

1. Clone this repository and update submodule (AtMoDat_CVs)
We set up a binder where you can try out the functionalities of the ATMODAT Standard Compliance Checker:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/AtMoDat/atmodat_data_checker/HEAD?filepath=notebooks)

## Installation (tested on Linux and macOS)

1. Clone this repository

```bash
git clone https://github.com/AtMoDat/atmodat_data_checker.git
cd atmodat_data_checker
git submodule init
git submodule update
```

2. Install Python 3 via conda if necessary:
Expand All @@ -37,51 +40,62 @@ conda activate atmodat
pip install -U -e .
```

5. Point `pyessv` at the "archive" where AtMoDat controlled vocabulary is stored
5. Initialize and update the [ATMODAT CVs](https://github.com/AtMoDat/AtMoDat_CVs) submodule, which contains the controlled vocabulary for the ATMODAT Standard.

```bash
git submodule init
git submodule update
```

6. Point `pyessv` to the `pyessv-archive` where ATMODAT controlled vocabulary is stored

```bash
export PYESSV_ARCHIVE_HOME=$PWD/AtMoDat_CVs/pyessv-archive
```

7. For regular usage of the ATMODAT Standard Checker, it is recommended to put the line given in 6. into your `.bashrc` or `.bash_profile`. Replace the `$PWD` with the absolute path.

## Run tests

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 in one go, you can use `run_checks.py` python scirpt. The call to the CF checker is also included. The results of the checks will be outputted in the `checker_output` directory.
## How to run the ATMODAT Standard Checker

To run checkers on a single file, use:
The command `run_checks.py` can be executed from any directory from within the `atmodat` conda environment. It will perform checks to evaluate the compliance with the ATMODAT Standard. Compliance with the CF Conventions is checked by a call to the [CF checker](https://github.com/cedadev/cf-checker). The results of the performed checks are provided in the `checker_output` directory.

* To check a single file, use:
```bash
run_checks.py -f file_to_check.nc
```
To run the checker on all *.nc files of a directory (including all sub-directories), use:
* To run the checker on all `*.nc` files of a directory (including all sub-directories), use:
```bash
run_checks.py -p file_path
```
To create summary of checker ouput add the ````-s```` flag, e.g.:
* To create a summary of the checks performed, add the ````-s```` flag, e.g.:
```bash
run_checks.py -s -p file_path
```
To define a custom path where the checker output shall be written, use:
* To define a custom path into which the checker output shall be written, use:
```bash
run_checks.py -op output_path -p file_path
```
To define a CF version against which the file(s) shall be checked, use:
* To define the CF version against which the file(s) shall be checked, use:
```bash
run_checks.py -cfv 1.6 -p file_path
```
Valid are versions from 1.3 to 1.8. Default is ````-cfv auto````.
       Valid are versions from 1.4 to 1.8. Default is ````-cfv auto````.

To define if the file(s) shall be checked only against the ATMODAT Standard (AT) or the CF Conventions (CF), specify either ````-check AT```` or ````-check CF````.
Default is ````-check both````.
* To define whether the file(s) shall be checked only against the ATMODAT Standard (AT) or the CF Conventions (CF), specify either ````-check AT```` or ````-check CF````.
```bash
run_checks.py -check AT -p file_path
```
You can combine different optional arguments, for example:
       Default is ````-check both````.

* You can combine different optional arguments, for example:
```bash
run_checks.py -s -op mychecks -check both -cfv 1.4 -p file_path
```


For more information use `python run_checks.py --help`
* For more information use:
```bash
python run_checks.py --help`
```

## Contributors

Expand All @@ -90,6 +104,7 @@ In alphabetic order:
- [Ag Stephens](https://github.com/agstephens)
- [Amandine Kaiser](https://github.com/am-kaiser), [ORCID: 0000-0002-2756-9964](https://orcid.org/0000-0002-2756-9964)
- [Anette Ganske](https://github.com/anganske), [ORCID: 0000-0003-1043-4964](https://orcid.org/0000-0003-1043-4964)
- [Angelika Heil](https://github.com/atmodatcode), [ORCID: 0000-0002-0131-1404](https://orcid.org/0000-0002-0131-1404)
- Angelina Kraft, [ORCID: 0000-0002-6454-335X](https://orcid.org/0000-0002-6454-335X)
- [Daniel Heydebreck](https://github.com/neumannd), [ORCID: 0000-0001-8574-9093](https://orcid.org/0000-0001-8574-9093)
- [Hugo Ricketts](https://github.com/gapintheclouds)
Expand All @@ -98,4 +113,4 @@ In alphabetic order:

## Acknowledgements

The ATMODAT Standard checker was created within the AtMoDat project (Atmospheric Model Data, <https://www.atmodat.de>). AtMoDat is funded by the German Federal Ministry for Education and Research within the framework of Atmosphären-Modelldaten: Datenqualität, Kurationskriterien und DOI-Branding (FKZ 16QK02A).
The ATMODAT Standard Compliance Checker was created within the AtMoDat project (Atmospheric Model Data, <https://www.atmodat.de>). AtMoDat is funded by the German Federal Ministry for Education and Research within the framework of Atmosphären-Modelldaten: Datenqualität, Kurationskriterien und DOI-Branding (FKZ 16QK02A).

0 comments on commit a7a4fb1

Please sign in to comment.