Skip to main content

V&V-grade specifications for engineered systems — AI, optimization, simulation, and physics.

Project description

vnvspec

V&V-grade specifications for engineered systems — AI, optimization, simulation, and physics.

CI Docs codecov V&Ved PyPI License Python

Overview

vnvspec lets you write machine-readable V&V specifications for any engineered system and automatically assess models against them. It produces traceable evidence reports that map to international standards (ISO/PAS 8800, ISO 21448, UL 4600, EU AI Act, and more).

Key features

  • Typed spec language — Pydantic-based Spec, Requirement, IOContract, ODD, Hazard, Evidence models
  • INCOSE GtWR quality checker — catch vague, ambiguous, or unverifiable requirements early, with configurable profiles (formal, web-app, embedded)
  • Traceability graphs — link requirements ↔ hazards ↔ evidence ↔ standards clauses, plus auto-trace scanning
  • Standards registries — built-in clause databases for ISO/PAS 8800, ISO 21448, UL 4600, EU AI Act, NIST AI RMF
  • Compliance matrix — auditor-grade XLSX/CSV/HTML exports with gap analysis against any standard
  • Best-practices catalogs — pre-written requirements for PyTorch, HuggingFace, FastAPI, SQLAlchemy, Pyomo; composable via Spec.extend()
  • Pluggable adapters — wrap any model (PyTorch, HuggingFace, scikit-learn, ONNX, Pyomo, FMI)
  • EvidenceCollector — ergonomic context manager for building evidence from assertions and JUnit XML
  • pytest pluginpytest-vnvspec captures evidence directly from test results
  • Multi-format specs — define specs in Python, YAML, or TOML; lossless round-trips
  • CI integrations — GitHub Actions composite action, V&V badge SVG, report diff for regression detection
  • Rich exports — HTML reports, Markdown, GSN assurance cases (Mermaid), EU AI Act Annex IV tech docs

Installation

pip install vnvspec

With PyTorch adapter:

pip install vnvspec[torch]

Quick start

from vnvspec import Requirement, Spec

req = Requirement(
    id="REQ-001",
    statement="The classifier shall produce probabilities in [0, 1].",
    rationale="Probability outputs must be valid for downstream calibration.",
    verification_method="test",
    acceptance_criteria=["All output probabilities are between 0.0 and 1.0 inclusive."],
)

spec = Spec(name="image-classifier-v1", requirements=[req])
violations = req.check_quality()
print(f"Quality issues: {len(violations)}")

Development

# Install all dev dependencies
just install

# Run all checks (lint, typecheck, test with coverage)
just check

License

Apache-2.0. See LICENSE.

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

vnvspec-0.3.1.tar.gz (573.0 kB view details)

Uploaded Source

Built Distribution

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

vnvspec-0.3.1-py3-none-any.whl (131.6 kB view details)

Uploaded Python 3

File details

Details for the file vnvspec-0.3.1.tar.gz.

File metadata

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

File hashes

Hashes for vnvspec-0.3.1.tar.gz
Algorithm Hash digest
SHA256 276694976769537a58624fcdf734b8ccd08d65581cbef162248e81f58f9e5530
MD5 34d01e67f5412f65b55da1bf0e4b48b6
BLAKE2b-256 ed5e27c390a9830cce09826e7ab9b9016d74a8c7a8c5745f467936e079656cb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vnvspec-0.3.1.tar.gz:

Publisher: workflow.yml on ai-vnv/vnvspec

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

File details

Details for the file vnvspec-0.3.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for vnvspec-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efa8e371d2735a1bc3c2f516fc514f71ecd76fd70da1d0c6d194bde921173879
MD5 34f12dd16f8b0801c4b0adaf405f3f19
BLAKE2b-256 1f46eacd49e8f4ae971f85f3e05c6f179f65099b352fa8d32e0f964fb7b5847b

See more details on using hashes here.

Provenance

The following attestation bundles were made for vnvspec-0.3.1-py3-none-any.whl:

Publisher: workflow.yml on ai-vnv/vnvspec

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