skillfed

roc-validator

A Python package to validate RO-Crates

roc-validator v0.11.3 111.2K downloads/30d#12,431 on PyPI28
Permissive license Apache-2.0 Active released

What it is and what it does

roc-validator is a Python package that checks whether RO-Crate metadata packages conform to their declared profiles. RO-Crates are structured research data containers that bundle files with machine-readable metadata; this tool validates that metadata against SHACL shapes and Python rules for the base RO-Crate profile and several specialized extensions including Workflow RO-Crate, Workflow Testing, and various run crates. It works with crates stored locally as directories or ZIP files, or accessible remotely via HTTP/HTTPS.

You can use it as a command-line tool or import it into Python code to validate programmatically. The validator reports issues at different severity levels (REQUIRED, RECOMMENDED, OPTIONAL) and provides detailed information about what failed and why. It is designed to be extensible, allowing new profiles to be added by implementing SHACL shapes and Python validation logic.

Use it for:

  • Validate research data packages before publishing to ensure metadata completeness and standards compliance.
  • Integrate validation into a data management pipeline to catch metadata errors early in the workflow.
  • Check workflow RO-Crates submitted to a workflow hub for conformance to the Workflow RO-Crate profile.
  • Validate run crates to verify execution metadata is properly recorded.
  • Programmatically validate RO-Crates in Python applications to enforce data quality gates.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Validates RO-Crate metadata packages against declared profiles using SHACL shapes and Python rules, supporting local directories, ZIP archives, and remote HTTP/HTTPS sources.

Yes. The package is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and fills a specific need for RO-Crate validation. It supports both CLI and programmatic use, handles multiple storage backends, and is extensible for new profiles. No known vulnerabilities. Suitable for research data management and metadata compliance workflows.

Install

roc-validator on PyPI

pip

pip install roc-validator

uv

uv add roc-validator

poetry

poetry add roc-validator

Installing roc-validator

Before you install

Low friction: pure Python wheel with 11 runtime dependencies including click, colorlog, rdflib, pyshacl, requests, and rich—all standard, well-maintained packages. Active maintenance with a release 17 days ago.

License in practice

Apache License 2.0 (permissive): you can use, modify, and distribute this package freely in commercial or private projects, provided you include the license notice and state significant changes.

Quickstart

pip install roc-validator

from rocrate_validator import services, models

settings = services.ValidationSettings(
    rocrate_uri='/path/to/ro-crate',
    profile_identifier='ro-crate-1.1',
    requirement_severity=models.Severity.REQUIRED,
)
result = services.validate(settings)
if result.has_issues():
    for issue in result.get_issues():
        print(f"{issue.severity.name}: {issue.message}")

Requires Python 3.10 or later.

Verify before relying

  • Performance characteristics when validating large RO-Crates or remote archives over slow connections.
  • Whether the extensibility framework for adding new profiles is documented with examples.
  • Coverage of all declared profiles by SHACL shapes versus Python code checks.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 11 — click, colorlog, enum-tools, inquirerpy, pyshacl, rdflib, requests, requests-cache, rich, rich-click, toml
Maintenance actively maintained — 17 days since the last release
Last repo commit
First released
Downloads 111,154/month — #12,431 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: roc_validator-0.11.3-py3-none-any.whl

Keywords: RO-Crate, validation, metadata, research object, data management, scientific data, Python

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities

Tags

RO-Crate validationresearch object metadata validatormetadata compliance checkerworkflow crate validationresearch data validationRO-Crate profile validatorscientific data validation
research-datametadata-validationscientific-computing

More Scientific/Engineering packages