The opentargets-validator tool in this repository validates JSON files which are submitted to Open Targets by various data sources against the Open Targets JSON schemas.
Installation
pip install --upgrade opentargets-validator
Requirements
Python 3.8.1 or higher
Compatible with Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13
Usage examples
Validating a local gzipped file against the latest schema version from GitHub:
# Install uv and dependencies
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --dev
# Run tests and linting
uv run pytest
uv run ruff check opentargets_validator tests
Open Targets JSON validator
The
opentargets-validatortool in this repository validates JSON files which are submitted to Open Targets by various data sources against the Open Targets JSON schemas.Installation
Requirements
Usage examples
Validating a local gzipped file against the latest schema version from GitHub:
Validating a portion of the local file against a local copy of the schema:
Input files
The validator has to be provided with two inputs:
Either of the input files (data and schema) can be read from:
-)example.json)example.json.gz)Development
Quick start with uv (recommended)
Using pip
CI/CD and Releases
This repository uses GitHub Actions for continuous integration.
Releases are automatically published to PyPI via GitHub Actions when tags are created.
Modern Python Tooling
This project has been modernized with:
uvfor fast dependency management and buildsrufffor lightning-fast linting and formattinghatchlingas the modern build backendimportlib.resourcesinstead of deprecatedpkg_resourcespyproject.tomlfor modern Python project configuration