2026-10-08 00:24:43 +02:00
|
|
|
"""MAS v0.1 conformance corpus.
|
|
|
|
|
|
|
|
|
|
`addresses.json` is vendored unchanged from the spec bundle
|
2026-10-19 13:35:10 +02:00
|
|
|
(`mas-v0.2-spec/conformance/addresses.json`, a superset of v0.1.1's) and is
|
|
|
|
|
normative.
|
2026-10-08 00:24:43 +02:00
|
|
|
`properties.json` adds implementation-independent property and boundary
|
2026-10-19 09:31:30 +02:00
|
|
|
cases. `statutes/` holds statute validation cases. `statute_aware.json` is
|
|
|
|
|
vendored unchanged from the v0.2 draft bundle
|
|
|
|
|
(`mas-v0.2-spec/conformance/statute-aware.json`). Every language
|
2026-10-08 00:24:43 +02:00
|
|
|
implementation should consume these files unchanged.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
import json
|
|
|
|
|
from importlib import resources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _load(name: str):
|
|
|
|
|
return json.loads(resources.files(__name__).joinpath(name).read_text(encoding="utf-8"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def address_fixtures() -> list[dict]:
|
|
|
|
|
return _load("addresses.json")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def property_fixtures() -> list[dict]:
|
|
|
|
|
return _load("properties.json")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def statute_cases() -> list[dict]:
|
|
|
|
|
"""Each case: {id, file, host, expect: "valid"|"schema"|"semantic", codes?}."""
|
|
|
|
|
return _load("statutes/cases.json")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def statute_document(file: str) -> dict:
|
|
|
|
|
return _load(f"statutes/{file}")
|
2026-10-19 09:31:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def statute_aware_fixtures() -> dict:
|
|
|
|
|
"""v0.2: {statutes, interpretation, equivalence, destination}."""
|
|
|
|
|
return _load("statute_aware.json")
|