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.0.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.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oaa_validator-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f0f38111c859d839d4a8abcee2fa3ffca9f2f857337e3a423e21b2d431a9b37e
MD5 d345f137b9ad11ad1ce8b3a916b88895
BLAKE2b-256 8ca881a5b6356990eb96fbc514752f3c1795092246d5235776f3fe8a56177894

See more details on using hashes here.

Provenance

The following attestation bundles were made for oaa_validator-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: oaa_validator-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8de02355694fe9345a83c44943b3bd6e972266ba019e11cbfaa044a148ea6c77
MD5 0f2f18253f56c26f7acf7e0f925984b5
BLAKE2b-256 4c676e23cc7f6ed5b028f4f329aed29f1f1c85b2cb91252287cd60bdd51257c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for oaa_validator-0.1.0-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