The Analitiq artifact validator: offline validation of Analitiq documents against the contract models (`analitiq-contract-models`) plus the cross-file and cross-document checks a single-document model cannot express. Today it validates connector-package documents (connector, endpoint, type-map files) and the referential integrity of an assembled pipeline bundle. Import as `analitiq.validator`; CLI `analitiq-validate`.
Project description
analitiq-validator
The Analitiq artifact validator. It validates Analitiq JSON documents against the contract models — the same Pydantic models the published JSON Schemas are generated from — plus the cross-file and cross-document checks a single-document model cannot express, so authoring, the connector-builder plugin, and downstream consumers all enforce one contract with no drift. It is structured so per-kind validators slot in without touching each other.
Today it covers two things:
- connector-package documents — connector, endpoint, and type-map files;
- pipeline bundles — the cross-document referential integrity of an assembled run (pipeline + streams + connections + connectors + endpoints).
Single-document validity (structure and every cross-field rule) is delegated
to TypeAdapter(...).validate_python from analitiq-contract-models
(analitiq.contracts). It runs offline — no schema fetch, no network. On top
of the models it adds only what a single-document model cannot express.
Connector-package cross-file checks:
- cross-file coverage — a connector ships the right sibling type-map files
for its kind, and an API connector's read map covers every
(native_type, arrow_type)its endpoint files declare; - filename ↔ id — an endpoint file is named
{endpoint_id}.json; - advisory warnings the contract tolerates — duplicate type-map rules, dead uppercase-only read patterns, write-map vocabulary gaps.
Pipeline-bundle referential integrity (validate_pipeline_bundle(bundle)) —
a bundle is a mapping of already-parsed {pipeline, streams, connections, connectors, endpoints} documents, checked for internal consistency independent of
any storage or on-disk layout:
- every
pipeline.streams[]ref resolves to exactly one bundled stream document; - every referenced connection is present in the bundle;
- every stream
endpoint_ref.connection_idis one of the pipeline's connections; - every connection's
connector_idis present among the bundled connectors; - every
scope='connection'endpoint_ref resolves to a bundled endpoint document; - the pipeline is runnable (has an id and
status='active').
It does not assume the documents were already contract-validated, so a missing
reference field (a connection naming no connector, a stream slot with no
endpoint_ref) is reported as an unresolved reference — while per-document shape
(field types, lengths, enums) remains each document model's own job. Stream and
connection refs match on their base form, so a {id}_v{n} versioned ref resolves
the document that declares the bare {id} (connector identities match whole).
Install
pip install analitiq-validator
This pulls analitiq-contract-models (and pydantic) transitively.
Use
analitiq-validate --document definition/connector.json
Point --document at definition/connector.json to trigger cross-file coverage:
it discovers the sibling type-map-read.json / type-map-write.json and
endpoints/*.json from the connector's directory. --schema-url,
--semantic-only, --json-only, and --no-cache are accepted but are no-ops
(validation is always model-driven and offline).
Output is a JSON report ({"passed": bool, "findings": [...]}) on stdout; the
process exits non-zero when any finding has severity error.
A pipeline bundle is assembled from many documents, so it is validated as a library call rather than from a single file:
from analitiq.validator import validate_pipeline_bundle
findings = validate_pipeline_bundle({
"pipeline": pipeline_doc,
"streams": stream_docs,
"connections": connection_docs,
"connectors": connector_ids, # the connector identities present
"endpoints": connection_endpoint_docs, # scope='connection', connection_id, endpoint_id
})
if any(f["severity"] == "error" for f in findings):
raise SystemExit(findings)
Source of truth
The canonical source is the analitiq-ai/infrastructure repo, under
validator/ (with the contract models under contract-models/ and the model
layer). That repo owns the models, generates the JSON Schemas from them, and
renders the source package into the public analitiq.validator package on
release. The published package is generated — edit the source in the
infrastructure repo, not the installed copy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file analitiq_validator-1.0.0rc1.tar.gz.
File metadata
- Download URL: analitiq_validator-1.0.0rc1.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa34a2b8376ffe4e596b1cd1f3a834a140b99eb56bcf176cd404adf1de7e80c
|
|
| MD5 |
adf47c29cde0a27385154a3602a8d923
|
|
| BLAKE2b-256 |
7fca42e33616cd5d6671ea37310cbce7248c0af09a26c5766f90769efa3726cb
|
Provenance
The following attestation bundles were made for analitiq_validator-1.0.0rc1.tar.gz:
Publisher:
validator-release.yml on analitiq-ai/infrastructure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
analitiq_validator-1.0.0rc1.tar.gz -
Subject digest:
daa34a2b8376ffe4e596b1cd1f3a834a140b99eb56bcf176cd404adf1de7e80c - Sigstore transparency entry: 2123736100
- Sigstore integration time:
-
Permalink:
analitiq-ai/infrastructure@2c780df55785ce989a5aad4eafc038e19ecc0f25 -
Branch / Tag:
refs/tags/validator-v1.0.0rc1 - Owner: https://github.com/analitiq-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
validator-release.yml@2c780df55785ce989a5aad4eafc038e19ecc0f25 -
Trigger Event:
push
-
Statement type:
File details
Details for the file analitiq_validator-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: analitiq_validator-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb0e4a32bfdcf58ac1f8a5cb5e4052bcb5df0ac81455b0622007bbe6755d2328
|
|
| MD5 |
a30dd0c0aff38ecc62edef6b7d5e5223
|
|
| BLAKE2b-256 |
e360ada484eaef24189b127e9638b0788795383ec97e84e720abd2e0526cc74a
|
Provenance
The following attestation bundles were made for analitiq_validator-1.0.0rc1-py3-none-any.whl:
Publisher:
validator-release.yml on analitiq-ai/infrastructure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
analitiq_validator-1.0.0rc1-py3-none-any.whl -
Subject digest:
eb0e4a32bfdcf58ac1f8a5cb5e4052bcb5df0ac81455b0622007bbe6755d2328 - Sigstore transparency entry: 2123736172
- Sigstore integration time:
-
Permalink:
analitiq-ai/infrastructure@2c780df55785ce989a5aad4eafc038e19ecc0f25 -
Branch / Tag:
refs/tags/validator-v1.0.0rc1 - Owner: https://github.com/analitiq-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
validator-release.yml@2c780df55785ce989a5aad4eafc038e19ecc0f25 -
Trigger Event:
push
-
Statement type: