Metadata-Version: 2.4
Name: ghga_validator
Version: 1.2.2
Summary: GHGA Validator - A Python library and command line utility to validate metadata
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
License: Apache 2.0
Project-URL: Repository, https://github.com/ghga-de/ghga
Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases
Project-URL: Issue Tracker, https://github.com/ghga-de/ghga/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Environment :: Console
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Utilities
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9.0
Requires-Dist: pydantic<3,>=2
Requires-Dist: linkml>=1.8
Requires-Dist: linkml-runtime>=1.8
Requires-Dist: linkml-validator>=0.4.5
Dynamic: license-file

[![PyPI version shields.io](https://img.shields.io/pypi/v/ghga-validator.svg)](https://pypi.org/project/ghga-validator/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ghga-validator.svg)](https://pypi.org/project/ghga-validator/)

# Ghga Validator

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

## Description

<!-- Please provide a short overview of the features of this service.-->

ghga-validator is a Python library and command line utility to validate metadata
w.r.t. its compliance to the [GHGA Metadata
Model](https://github.com/ghga-de/ghga-metadata-schema). 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

This package is a member of the [GHGA monorepo](https://github.com/ghga-de/ghga) and is
developed from the repository root rather than on its own. The repository ships a
devcontainer with the whole toolchain: open it in VS Code and run
`Remote-Containers: Reopen in Container`, or set the environment up directly with
`just sync`.

The usual tasks, run from the repository root (see
[ADR-0015](https://github.com/ghga-de/ghga/blob/main/docs/adr/0015-task-runner.md) for the
full recipe list):

```bash
just sync                        # install every member plus the shared dev toolchain
just test tools/ghga-validator   # this member's test suite
just lint                        # ruff check + format check across the workspace
```

## License
This repository is free to use and modify according to the
[Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/tools/ghga-validator/LICENSE).
