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

Uploaded Python 3

File details

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

File metadata

  • Download URL: oaa_validator-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 78b63e130a825a5f3c5e9d3489cb0be36e2858cab40698b6042f368871a097bb
MD5 68f0bc78973c632e3733728540b6210c
BLAKE2b-256 56634310a32ef9ed9c78ebdb7de6a0211deea4e04e949fa983d77e4d96cecbf7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oaa_validator-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bac77815e6527dea3b68cefae7cebd37cb2808728d808e3af8d0203be6f14d8d
MD5 355e7db1ecee6d6b19e306045dad0b13
BLAKE2b-256 f12084cee507a6e3fa67bd7226b6e6796ff71e6fbc538fcbaf087cfcacd56fd0

See more details on using hashes here.

Provenance

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