Skip to content

A utility for validating esm-collection json files against the esm-collection-spec: https://github.com/NCAR/esm-collection-spec

License

Notifications You must be signed in to change notification settings

NCAR/esmcol-validator

Repository files navigation

GitHub Workflow Status GitHub Workflow Status PyPI Conda

Earth System Model (ESM)Collection specification Validator

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

Installation

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

Using Pip via PyPI:

python -m pip install esmcol-validator

Using Conda:

conda install -c conda-forge esmcol-validator

Or from the source repository:

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

Usage

$ 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:

$ 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
}

About

A utility for validating esm-collection json files against the esm-collection-spec: https://github.com/NCAR/esm-collection-spec

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages