Skip to main content

tests Coverage Status

Ghga Validator

GHGA Validator - A Python library and command line utility to validate metadata

Description

ghga-validator is a Python library and command line utility to validate metadata w.r.t. its compliance to the GHGA Metadata Model. It takes metadata encoded in JSON of YAML format and produces a validation report in JSON format.

Installation

We recommend installing the latest version of ghga-validator using pip:

pip install -U ghga-validator

Usage

Usage: ghga-validator [OPTIONS]

  GHGA Validator

  ghga-validator is a command line utility to validate metadata w.r.t. its
  compliance to the GHGA Metadata Model. It takes metadata encoded in JSON of
  YAML format and produces a validation report in JSON format.

Options:
  -s, --schema PATH               Path to metadata schema (modelled using
                                  LinkML)  [required]
  -i, --input FILE                Path to submission file in JSON format to be
                                  validated  [required]
  -r, --report FILE               Path to resulting validation report
                                  [required]
  --target-class TEXT             The root class name
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.

Development

For setting up the development environment, we rely on the devcontainer feature of vscode in combination with Docker Compose.

To use it, you have to have Docker Compose as well as vscode with its "Remote - Containers" extension (ms-vscode-remote.remote-containers) installed. Then open this repository in vscode and run the command Remote-Containers: Reopen in Container from the vscode "Command Palette".

This will give you a full-fledged, pre-configured development environment including:

  • infrastructural dependencies of the service (databases, etc.)
  • all relevant vscode extensions pre-installed
  • pre-configured linting and auto-formating
  • a pre-configured debugger
  • automatic license-header insertion

Moreover, inside the devcontainer, a convenience commands dev_install is available. It installs the service with all development dependencies, installs pre-commit.

The installation is performed automatically when you build the devcontainer. However, if you update dependencies in the ./setup.cfg or the ./requirements-dev.txt, please run it again.

License

This repository is free to use and modify according to the Apache 2.0 License.

Readme Generation

This readme is autogenerate, please see readme_generation.md for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghga_validator-1.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghga_validator-1.1.0-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file ghga_validator-1.1.0.tar.gz.

File metadata

  • Download URL: ghga_validator-1.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for ghga_validator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 36ef3de73bf2dd74fd05b1e70c772489fd1cd2ab5d34822a2fd7c9695b726f55
MD5 954ebd06f4cbd9b438844cf1a7865456
BLAKE2b-256 6b9a1eaae8d8b22d6afb6475c9579d79dcf4b479f207eee4c2e0af0388cb678a

See more details on using hashes here.

File details

Details for the file ghga_validator-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ghga_validator-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for ghga_validator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d900bd3a0212ed7469e7d43959d9fa5d8ec492602f050d6cb4746179766eb94
MD5 eef4a09bf434fd9715fb96afa5edd37f
BLAKE2b-256 0be6828cacf0f2a69d6567c45d7ece496887a1e1276d9e1f4e211a9f5b2ca8c6

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.2

2 files

1.2.0

2 files

1.1.1

2 files

This release

1.1.0 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page