[](https://badge.fury.io/py/opentargets-validator)
[](https://github.com/opentargets/validator/actions/workflows/ci.yml)
# Open Targets JSON validator
The `opentargets-validator` tool in this repository validates JSON files which are submitted to Open Targets by various [data sources](https://platform-docs.opentargets.org/evidence) against the Open Targets [JSON schemas](https://github.com/opentargets/json_schema).
## Installation
```bash
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:
```bash
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:
```bash
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:
* STDIN (`-`)
* Uncompressed remote file (https://example.com/example.json)
* Uncompressed local file (`example.json`)
* GZIP-compressed local file (`example.json.gz`)
## Development
### Quick start with uv (recommended)
```bash
# 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
```bash
python -m venv env && source env/bin/activate
pip install -e ".[dev]"
python -m pytest
```
## CI/CD and Releases
This repository uses [GitHub Actions](https://github.com/opentargets/validator/actions) for continuous integration.
Releases are automatically published to [PyPI](https://pypi.org/project/opentargets-validator) 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
Raw data
{
"_id": null,
"home_page": null,
"name": "opentargets-validator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8.1",
"maintainer_email": "Open Targets <data@opentargets.org>",
"keywords": "bioinformatics, opentargets, python3",
"author": null,
"author_email": "Open Targets <data@opentargets.org>",
"download_url": "https://files.pythonhosted.org/packages/97/ce/7774066125bf1cd3109d0277f7f93aa552cf34b0c29ee61eaf67efd08b9a/opentargets_validator-1.0.1.tar.gz",
"platform": null,
"description": "[](https://badge.fury.io/py/opentargets-validator)\n[](https://github.com/opentargets/validator/actions/workflows/ci.yml)\n\n# Open Targets JSON validator\nThe `opentargets-validator` tool in this repository validates JSON files which are submitted to Open Targets by various [data sources](https://platform-docs.opentargets.org/evidence) against the Open Targets [JSON schemas](https://github.com/opentargets/json_schema).\n\n## Installation\n```bash\npip install --upgrade opentargets-validator\n```\n\n## Requirements\n- Python 3.8.1 or higher\n- Compatible with Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13\n\n## Usage examples\nValidating a local gzipped file against the latest schema version from GitHub:\n```bash\nopentargets_validator \\\n --schema https://raw.githubusercontent.com/opentargets/json_schema/master/schemas/disease_target_evidence.json \\\n evidence.json.gz\n```\n\nValidating a portion of the local file against a local copy of the schema:\n```bash\nzcat evidence.json.gz | head -n 100 | opentargets_validator --schema evidence_schema.json\n```\n\n## Input files\nThe validator has to be provided with two inputs:\n1. Data to validate. It has to contain exactly one complete JSON object per line.\n2. Schema to validate against. It can be any valid JSON Draft 7 schema.\n\nEither of the input files (data and schema) can be read from:\n* STDIN (`-`)\n* Uncompressed remote file (https://example.com/example.json)\n* Uncompressed local file (`example.json`)\n* GZIP-compressed local file (`example.json.gz`)\n\n## Development\n\n### Quick start with uv (recommended)\n```bash\n# Install uv and dependencies\ncurl -LsSf https://astral.sh/uv/install.sh | sh\nuv sync --dev\n\n# Run tests and linting\nuv run pytest\nuv run ruff check opentargets_validator tests\n```\n\n### Using pip\n```bash\npython -m venv env && source env/bin/activate\npip install -e \".[dev]\"\npython -m pytest\n```\n\n## CI/CD and Releases\n\nThis repository uses [GitHub Actions](https://github.com/opentargets/validator/actions) for continuous integration.\n\nReleases are automatically published to [PyPI](https://pypi.org/project/opentargets-validator) via GitHub Actions when tags are created.\n\n## Modern Python Tooling\n\nThis project has been modernized with:\n- **`uv`** for fast dependency management and builds\n- **`ruff`** for lightning-fast linting and formatting\n- **`hatchling`** as the modern build backend\n- **`importlib.resources`** instead of deprecated `pkg_resources`\n- **GitHub Actions** for CI/CD instead of Travis CI\n- **`pyproject.toml`** for modern Python project configuration\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Schema validation for evidence submitted to Open Targets",
"version": "1.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/opentargets/validator/issues",
"Documentation": "https://github.com/opentargets/validator#readme",
"Homepage": "https://github.com/opentargets/validator",
"Repository": "https://github.com/opentargets/validator"
},
"split_keywords": [
"bioinformatics",
" opentargets",
" python3"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7a37596b35f483d14ce9c7dc2bc31165129e9d905716f0e04d1a7c7cebeffc14",
"md5": "c623aaf5510525af871059fce2885d5f",
"sha256": "5aea06b05cbc350cfd7c22fc19bc290c97f9a0042ef4e9afbd8b86f4f0acb203"
},
"downloads": -1,
"filename": "opentargets_validator-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c623aaf5510525af871059fce2885d5f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1",
"size": 11229,
"upload_time": "2025-09-10T08:48:03",
"upload_time_iso_8601": "2025-09-10T08:48:03.985719Z",
"url": "https://files.pythonhosted.org/packages/7a/37/596b35f483d14ce9c7dc2bc31165129e9d905716f0e04d1a7c7cebeffc14/opentargets_validator-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "97ce7774066125bf1cd3109d0277f7f93aa552cf34b0c29ee61eaf67efd08b9a",
"md5": "cb3561f1193b826687160e889cb4d59d",
"sha256": "1f02b5bbb140fefabf39c4fe77dc81a0a23fd03a487d2d2eb4d081d77995f5cd"
},
"downloads": -1,
"filename": "opentargets_validator-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "cb3561f1193b826687160e889cb4d59d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1",
"size": 13528,
"upload_time": "2025-09-10T08:48:05",
"upload_time_iso_8601": "2025-09-10T08:48:05.007083Z",
"url": "https://files.pythonhosted.org/packages/97/ce/7774066125bf1cd3109d0277f7f93aa552cf34b0c29ee61eaf67efd08b9a/opentargets_validator-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-10 08:48:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "opentargets",
"github_project": "validator",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "opentargets-validator"
}