Skip to main content

Reference validator for the Original Art Archive (OAA) Format

Project description

Original Art Archive logo

Original Art Archive Validator

This repository contains the reference validator for the Original Art Archive (OAA) Format.

The validator checks whether an OAA archive is valid according to OAA 0.1 Draft archive/content requirements: package structure, required manifest fields, manifest shape, archive path safety, manifest-local-path rejection, reference integrity, extension block shape, external link shape, and resource limits.

The validator uses schema/oaa-manifest.schema.json through jsonschema for manifest-local JSON Schema validation, then applies custom checks for package structure, archive paths, cross-manifest references, embedded file resolution, resource limits, and other rules that cannot be validated from one manifest document alone.

It does not certify reader or writer implementation behavior. A writer can run its emitted archive through this validator to check whether the archive is valid, and a reader can use the validator as a preflight check before reading an archive. The validator does not extract archive contents to disk and does not open or render embedded media files.

The normative format specification is maintained in Original-Art-Archive/oaa-spec.

Installation

Install from PyPI:

python -m pip install oaa-validator

Install development dependencies from a source checkout:

python -m pip install -r requirements\dev-requirements.txt
python -m pip install -e .

Usage

Validate an .oaa archive:

oaa-validator validate path\to\archive.oaa

Validate an unpacked OAA directory layout before packaging:

oaa-validator validate-dir examples\minimal

Emit machine-readable output:

oaa-validator validate-dir examples\minimal --json --show-info

Exit codes:

Code Meaning
0 No fatal or error findings.
1 Fatal or error findings were reported, or warnings were promoted with --warnings-as-errors.
2 CLI usage error.

Closed Base Value Checks

The validator rejects unknown values in OAA closed base value sets:

  • Reject files[].file_kind values other than raw, derivative, and supporting.
  • Reject files[].image_role values other than raw_scan, raw_photo, corrected_scan, detail, verso, and reference when the field is present and not null.
  • Reject base public_metadata.publication_status values other than published_art and unpublished_art when the field is present and not null.

Display-oriented strings such as public_metadata.media, public_metadata.artwork_type, artist_credits[].role, public_metadata.for_sale_status, and files[].format are not treated as controlled OAA values.

Traceability

Validator findings include both rule_id and requirement_ids.

Requirement IDs are not embedded in the public specification. They live in requirements/oaa-0.1.yaml, and requirements/traceability.md is generated from the catalog, rule metadata, and fixture metadata.

Only archive-validity requirements may have automated validator rules. Reader, writer, round-trip, public-display, and implementation-behavior statements are excluded from automated validator scope unless they define a concrete archive/content condition.

Refresh the traceability matrix:

python requirements/generate_traceability.py

Check that it is current:

python requirements/generate_traceability.py --check

Publishing

This repository publishes the oaa-validator package to PyPI from .github/workflows/publish.yml.

Publishing uses PyPI Trusted Publishing through the pypi GitHub environment. No PyPI API token is stored in this repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oaa_validator-0.1.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oaa_validator-0.1.1-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file oaa_validator-0.1.1.tar.gz.

File metadata

  • Download URL: oaa_validator-0.1.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oaa_validator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8084d4c96b7f177bef7bfec1257b6e8c4d734b30fd91140e84c9701fd0120614
MD5 c93164d4c6aaa314cd24ff068b7d2c48
BLAKE2b-256 0c0dbff228ca2eb435ccf5860f0a09316fa9158cb8a550b8800fdfa28fda0212

See more details on using hashes here.

Provenance

The following attestation bundles were made for oaa_validator-0.1.1.tar.gz:

Publisher: publish.yml on Original-Art-Archive/oaa-validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oaa_validator-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: oaa_validator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oaa_validator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ab84a30c2963a51823d7c67fdec103bea13b95edca3de509f5faf8e1b4786dc
MD5 fb36ecd975b556be5dc38ad62944f8e6
BLAKE2b-256 798946d88619c918b25a5f5b20016fbb2c9f0748fbdf7d6d5c67b4dc7a37a3ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for oaa_validator-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Original-Art-Archive/oaa-validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page