Skip to main content

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

Project description

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.

Project 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.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

ghga_validator-1.1.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ghga_validator-1.1.1.tar.gz
  • Upload date:
  • Size: 17.8 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.1.tar.gz
Algorithm Hash digest
SHA256 c98752966b8e46685d0e8d024be5d6eea018b2e2c22845d99062d4ffe6ed79af
MD5 afd5a0ff5e645ff2887497a428d7e231
BLAKE2b-256 f57e5d0876eebd59e0b2e6d1b9c983e4b84519ab7ee4f9d63a7e744d5dd1fc4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ghga_validator-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98cbae147edadfba4c3f29f64d3ae86315451b17f39a67f89a8a5e0bda79af16
MD5 b6e497331290a000625e7d8524776e99
BLAKE2b-256 360dc5ed88a45136f664387440d37f4dea1164b8264aab979990d0a55dc6979d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page