Metadata-Version: 2.1
Name: esmcol-validator
Version: 2020.1.29
Summary: A package to validate ESM Collection files
Home-page: https://github.com/NCAR/esmcol-validator
Maintainer: Anderson Banihirwe
Maintainer-email: abanihi@ucar.edu
License: Apache 2.0
Keywords: intake,esm,catalog
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests (>=2.19.1)
Requires-Dist: jsonschema (>=3.0.1)
Requires-Dist: click
Requires-Dist: pandas

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/NCAR/esmcol-validator/CI?logo=Github&style=for-the-badge)](https://github.com/NCAR/esmcol-validator/actions)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/NCAR/esmcol-validator/code-style?label=Code%20Style&logo=GitHub&style=for-the-badge)](https://github.com/NCAR/esmcol-validator/actions)
[![PyPI](https://img.shields.io/pypi/v/esmcol-validator?logo=PyPI&style=for-the-badge)](https://pypi.org/project/esmcol-validator)
[![](https://img.shields.io/codecov/c/github/NCAR/esmcol-validator.svg?style=for-the-badge)](https://codecov.io/gh/NCAR/esmcol-validator)

# Earth System Model (ESM)Collection specification Validator

- [Earth System Model (ESM)Collection specification Validator](#earth-system-model-esmcollection-specification-validator)
  - [Installation](#installation)
  - [Usage](#usage)

This utility allows users to validate esm-collection json files against the [esm-collection-spec](https://github.com/NCAR/esm-collection-spec).

## Installation

The validator can be installed in any of the following ways:

Using Pip via PyPI:

```bash
python -m pip install esmcol-validator
```

Using Conda:

```bash
conda install -c conda-forge esmcol-validator
```

Or from the source repository:

```bash
python -m pip install git+https://github.com/NCAR/esmcol-validator.git
```

## Usage

```bash
$ esmcol-validator --help
Usage: esmcol-validator [OPTIONS] ESMCOL_FILE

  A utility that allows users to validate esm-collection json files against
  the esm-collection-spec.

Options:
  --esmcol-spec-dirs TEXT
  --version TEXT           [default: master]
  --verbose                [default: False]
  --timer                  [default: False]
  --log-level TEXT         [default: CRITICAL]
  --help                   Show this message and exit.
```

Example:

```bash
$ esmcol-validator sample-pangeo-cmip6-collection.json
{'collections': {'valid': 1, 'invalid': 0}, 'catalogs': {'valid': 1, 'invalid': 0}, 'unknown': 0}
{
    "collections": {
        "valid": 1,
        "invalid": 0
    },
    "catalogs": {
        "valid": 1,
        "invalid": 0
    },
    "unknown": 0
}
```


