[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107967":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},107967,"mapverity","skavuri143\u002Fmapverity","skavuri143","Field-level assurance for data pipelines: mapping-driven source-to-target validation, fault-injection test scoring and explainable risk-adaptive test prioritization.",null,"Python",118,63,6,0,1,46.33,"Apache License 2.0",false,"main",true,[],"2026-11-21 23:33:54","2026-11-21 06:54:28","\u003Cdiv align=\"center\">\n\n# MapVerity\n\n**Field-level assurance for data pipelines.**\n\nProve that every field was transformed correctly from source to target, measure how strong your\ntests really are, and run the riskiest checks first.\n\n[![CI](https:\u002F\u002Fgithub.com\u002FYOUR-GITHUB-USER\u002Fmapverity\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FYOUR-GITHUB-USER\u002Fmapverity\u002Factions\u002Fworkflows\u002Fci.yml)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmapverity.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmapverity\u002F)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fmapverity.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmapverity\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache--2.0-blue.svg)](LICENSE)\n\n\u003C\u002Fdiv>\n\n---\n\nHealthcare, insurance, government and financial data platforms move records through long chains\nof files, transformation jobs and databases: mainframe extracts and partner flat files land in\nS3, a Glue\u002FSpark\u002FETL job reshapes them according to a data model, and the result lands in a\ndocument store, warehouse or API. Most defects in those chains produce output that still *looks*\nfine: well-typed, non-null, in-domain, and wrong.\n\nMapVerity turns the **source-to-target mapping sheet** your analysts already maintain into an\nexecutable test suite. For every mapped field, it re-derives the expected value from the source\nrecord and compares it with what the pipeline actually wrote.\n\n```\n sources                         your pipeline                     target\n COBOL \u002F EBCDIC (copybook) ─┐\n fixed-width (layout)        ├──► S3 ──► Glue \u002F Spark \u002F ETL ──► DocumentDB \u002F MongoDB\n CSV \u002F PSV \u002F JSON \u002F Parquet  │                                     SQL warehouse\n SQL tables, REST APIs ──────┘                                     REST API\n                │                                                      │\n                └──────────────► MapVerity (independent oracle) ◄──────┘\n                                 mapping sheet ─► executable checks\n```\n\n## What it does\n\n| | |\n|---|---|\n| **Mapping-driven validation** | Compiles a CSV\u002FExcel mapping sheet into checks: field values (direct, trim, case, code lookups, date formats, concatenation, constants, expressions), record completeness under the job's selection filter, nested arrays matched by composite key, array cardinality, foreign keys, patterns, required fields and domains. |\n| **Readers for real-world sources** | COBOL copybooks (EBCDIC, COMP-3, binary, zoned decimal, OCCURS, REDEFINES), multi-record fixed-width layouts with control totals, delimited\u002FJSON\u002FParquet, S3 objects and prefixes, DocumentDB\u002FMongoDB, any SQLAlchemy database, paginated REST APIs. |\n| **Coverage you can report** | Which data-model fields are value-validated, constraint-only, not validated, unmapped or missing. |\n| **Mutation testing for data** | Injects 15 classes of realistic ETL faults into the output and reports the share your suite catches, plus the exact blind spots. |\n| **Explainable risk (AI)** | A defect-risk model trained on public defect data scores your transformation functions from their code metrics, with SHAP explanations. Inferred checks are mined from known-good data; optional LLM rule proposals are executed and kept only if the data supports them. |\n| **ERAD-QA prioritization (AI)** | Runs the checks most likely to fail first, per unit of cost, from history, code change, predicted risk and observed data drift, and explains every position. |\n| **Deterministic quality gates** | PASS \u002F WARN \u002F BLOCK \u002F INCOMPLETE from evidence. Proven integrity failures always block; predicted risk is advisory unless your policy says otherwise. |\n| **Fits your CI** | CLI, pytest plugin, Python API; JUnit, HTML, JSON, Markdown and Allure output; GitHub Actions and AWS CodePipeline templates; Docker image. |\n\n## Quickstart (15 minutes, no cloud account)\n\n```bash\npip install \"mapverity[all]\"\ngit clone https:\u002F\u002Fgithub.com\u002FYOUR-GITHUB-USER\u002Fmapverity && cd mapverity\u002Fexamples\u002Fmember_eligibility\n\npython generate_data.py          # synthetic EBCDIC member master + eligibility segments\npython transform.py              # the pipeline under test: writes member JSON documents\n\nmapverity from-mapping mapping\u002Fmember_data_model_mapping.csv --datasets datasets.yaml -o member.mapverity.yaml\nmapverity validate member.mapverity.yaml --html report.html\n#   49 passed · 0 failed · 0 errors\n\npython transform.py --defect D07_comp3_scale_lost     # break the pipeline on purpose\nmapverity validate member.mapverity.yaml\n#   | map:members:monthlyIncome | failed | 1668 | 1668 row(s) where 'monthlyIncome' != col(\"mbr_monthly_income\") |\n```\n\nThen measure the suite and gate a release:\n\n```bash\npython transform.py\nmapverity mutate member.mapverity.yaml --dataset members --json mutation.json   # 98.6% of injected faults caught\nmapverity validate member.mapverity.yaml --mapping mapping\u002Fmember_data_model_mapping.csv \\\n    --mutation-report mutation.json --gates gates.yaml --html report.html --junit results.xml\n#   Quality gate: PASS\n```\n\nA second example, [`examples\u002Finsurance_claims`](examples\u002Finsurance_claims), validates a\nmulti-record fixed-width claims file (header, claims, service lines, trailer control totals)\nagainst claim documents with nested lines.\n\n## The mapping sheet\n\nOne row per target field; column names are flexible (`transformation` = `rule`, and so on).\n\n| target_table | target_field | source_dataset | source_field | rule | data_type | required | key | allowed_values | pattern | references |\n|---|---|---|---|---|---|---|---|---|---|---|\n| members | memberId | member_master | mbr_id | trim | string | Y | Y | | | |\n| members | gender | member_master | mbr_gender_cd | `lookup: M=MALE, F=FEMALE, *=UNKNOWN` | string | Y | | MALE\\|FEMALE\\|UNKNOWN | | |\n| members | birthDate | member_master | mbr_dob | `date: %Y%m%d` | date | Y | | | | |\n| claims | policyNumber | claims_file.CLM | policy_no | trim | string | Y | | | | policies.policy_no |\n| claims.lines | lineNo | claims_file.LIN | line_no | direct | integer | Y | Y | | | |\n\nRules: `direct`, `trim`, `upper`, `lower`, `title`, `upper_trim`, `lookup:`, `date:`, `concat:`,\n`constant:`, `count`, `ref:`, `none`, and `expr:` for anything else. See the\n[mapping sheet reference](docs\u002Fmapping-sheet.md).\n\n## AI-assisted prioritization and risk\n\n```bash\nmapverity risk train --out defect-risk.pkl                     # public NASA MDP data, checksum-verified\nmapverity risk score transform.py --model defect-risk.pkl --ownership ownership.yaml -o risk.json\n#   | transform:compute_fpl_percent | 0.41 | CYCLOMATIC_COMPLEXITY +0.32, ... |\nmapverity diff-mapping old_mapping.csv new_mapping.csv          # which fields changed\nmapverity plan member.mapverity.yaml --history .mapverity\u002Fhistory.json --risk risk.json --changed members.gender\nmapverity validate member.mapverity.yaml --prioritize --history .mapverity\u002Fhistory.json --fail-fast\n```\n\nRisk scores and ordering never replace a check: blocking checks always run, and a run cut short\nby a time budget is `INCOMPLETE`, not `PASS`. Read the [model card](docs\u002Fmodel-card.md) before\nrelying on risk scores; its limitations section matters.\n\n## Evidence\n\nEvery number below is reproduced by scripts in [`experiments\u002F`](experiments\u002F), with confidence\nintervals, ablations and negative findings. All data is synthetic or public.\n\n| Study | Result |\n|---|---|\n| 20 realistic Glue-job defects (member pipeline) | mapping-derived checks caught **20\u002F20**; data-model constraints caught 5\u002F20; profiled inference 15\u002F20 |\n| 10 realistic defects (insurance claims pipeline) | mapping-derived checks caught **10\u002F10** |\n| Data mutation testing | **99.0%** of mutants killed (member), **100%** (claims) |\n| False alarms on 20 independent clean runs | **0** for mapping-derived checks |\n| Runtime | 100,000 member documents (163,107 nested segments) validated with 49 checks in 8.7 s on 2 vCPUs |\n| ERAD-QA prioritization (300 simulated releases) | APFDc **0.962** vs 0.918 for change-based ordering and 0.604 random; 95.6% of defects found within the first 10% of test cost |\n| Defect-risk model (12 NASA MDP projects) | cross-project AUC about 0.72; no significant gain from XGBoost over logistic regression or from SMOTE; **the risk signal did not improve prioritization** in our study, so it stays advisory |\n\n## Install options\n\n```bash\npip install mapverity                 # core: pandas, numpy, pyyaml, typer\npip install \"mapverity[aws]\"          # S3 (boto3) and DocumentDB\u002FMongoDB (pymongo)\npip install \"mapverity[sql]\"          # any SQLAlchemy database (add your driver)\npip install \"mapverity[api]\"          # REST sources (httpx)\npip install \"mapverity[ai]\"           # risk model and prioritization (scikit-learn, xgboost, shap, imbalanced-learn)\npip install \"mapverity[all]\"\ndocker run --rm -v \"$PWD:\u002Fwork\" ghcr.io\u002FYOUR-GITHUB-USER\u002Fmapverity validate spec.mapverity.yaml\n```\n\n## Documentation\n\n[Getting started](docs\u002Fgetting-started.md) ·\n[Mapping sheet](docs\u002Fmapping-sheet.md) ·\n[Sources and targets](docs\u002Fsources-and-targets.md) ·\n[Checks reference](docs\u002Fchecks.md) ·\n[Mutation testing](docs\u002Fmutation-testing.md) ·\n[Risk and ERAD-QA](docs\u002Ferad-qa.md) ·\n[Quality gates](docs\u002Fquality-gates.md) ·\n[CI\u002FCD](docs\u002Fci-cd.md) ·\n[Model card](docs\u002Fmodel-card.md) ·\n[Architecture decisions](docs\u002Fadr\u002F)\n\n## Project\n\n- **License:** Apache-2.0. **Status:** alpha; the spec format may change before 1.0 (see [CHANGELOG](CHANGELOG.md)).\n- **Contributing:** see [CONTRIBUTING](CONTRIBUTING.md); please follow the [Code of Conduct](CODE_OF_CONDUCT.md).\n- **Security:** report vulnerabilities privately as described in [SECURITY](SECURITY.md).\n- **Support:** see [SUPPORT](SUPPORT.md). **Governance:** see [GOVERNANCE](GOVERNANCE.md).\n- **Using MapVerity?** We would like to hear how; see [ADOPTERS](ADOPTERS.md).\n- **Citing:** see [CITATION.cff](CITATION.cff).\n\nMapVerity never needs real personal, member, patient or policyholder data to be tested or\ndemonstrated: every example and test runs on generated data. Do not attach real records to\nissues.\n","MapVerity 是一个面向数据管道的字段级验证工具，用于保障源系统到目标系统的字段映射准确性。它将业务人员维护的映射表（CSV\u002FExcel）自动编译为可执行校验逻辑，支持复杂转换（如COBOL copybook解析、嵌套数组匹配、日期格式、表达式计算等），并提供基于变异测试的数据质量健壮性评估与风险感知的测试优先级排序。项目内置多源适配器（S3、MongoDB、SQLAlchemy数据库、REST API等），强调可解释性与审计就绪性。适用于金融、医疗、政务等对数据合规性与溯源性要求严格的ETL\u002F数据集成场景。",2,"2026-11-24 04:33:06","CREATED_QUERY"]