Skip to main content

PyPI version CI

Open Targets JSON validator

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:

opentargets_validator \
  --schema https://raw.githubusercontent.com/opentargets/json_schema/master/schemas/disease_target_evidence.json \
  evidence.json.gz

Validating a portion of the local file against a local copy of the schema:

zcat evidence.json.gz | head -n 100 | opentargets_validator --schema evidence_schema.json

Input files

The validator has to be provided with two inputs:

  1. Data to validate. It has to contain exactly one complete JSON object per line.
  2. Schema to validate against. It can be any valid JSON Draft 7 schema.

Either of the input files (data and schema) can be read from:

Development

Quick start with uv (recommended)

# 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

Using pip

python -m venv env && source env/bin/activate
pip install -e ".[dev]"
python -m pytest

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:

  • uv for fast dependency management and builds
  • ruff for lightning-fast linting and formatting
  • hatchling as the modern build backend
  • importlib.resources instead of deprecated pkg_resources
  • GitHub Actions for CI/CD instead of Travis CI
  • pyproject.toml for modern Python project configuration

Metadata

Release files for opentargets-validator 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentargets-validator 1.0.1
File Size Uploaded
opentargets_validator-1.0.1.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opentargets-validator 1.0.1
File Interpreter ABI Platform
opentargets_validator-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.8 kB

Release files / opentargets_validator-1.0.1.tar.gz

Download URL opentargets_validator-1.0.1.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1f02b5bbb140fefabf39c4fe77dc81a0a23fd03a487d2d2eb4d081d77995f5cd
BLAKE2b-256 checksum
How to use checksums
97ce7774066125bf1cd3109d0277f7f93aa552cf34b0c29ee61eaf67efd08b9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / opentargets_validator-1.0.1-py3-none-any.whl

Download URL opentargets_validator-1.0.1-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5aea06b05cbc350cfd7c22fc19bc290c97f9a0042ef4e9afbd8b86f4f0acb203
BLAKE2b-256 checksum
How to use checksums
7a37596b35f483d14ce9c7dc2bc31165129e9d905716f0e04d1a7c7cebeffc14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.8.0

2 release files

0.7.0

1 release file

0.6.0

4 release files

0.5.0

4 release files

0.4.0

3 release files

0.3.0

2 release files

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

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