Skip to content

Latest commit

 

History

History
193 lines (155 loc) · 9 KB

INDEX.md

File metadata and controls

193 lines (155 loc) · 9 KB

📚 Complete Index & Navigation Guide

Welcome to the DataPact repository! This file helps you navigate all resources.

🎯 Start Here

For Quick Setup

→ QUICKSTART.md - 5-minute setup guide

For AI Agents (Copilot, Claude, etc.)

→ .github/copilot-instructions.md - Comprehensive AI coding guide

For End Users

→ README.md - Features, usage, examples → FEATURES.md - Functional feature list with examples

For Developers

→ CONTRIBUTING.md - Development workflow and contribution guidelines

📖 Documentation Structure

Getting Started

For Development

For AI Agents & Code Assistants

🏗️ Project Structure

src/datapact/          Core application
├── contracts.py                       YAML parsing & models
├── providers/                          Contract providers (datapact, odcs)
├── odcs_contracts.py                  ODCS parsing & mapping
├── datasource.py                      Data loading (CSV/Parquet/JSON)
├── normalization/                      Normalization scaffold
├── profiling.py                       Contract profiling helpers
├── cli.py                             Command-line interface
├── reporting.py                       Report generation
├── versioning.py                      Contract version management
└── validators/
    ├── schema_validator.py            Structure validation
    ├── quality_validator.py           Content validation
    ├── sla_validator.py               SLA validation
    └── distribution_validator.py      Statistical monitoring

tests/                                 Test suite & fixtures
├── test_validator.py                  Unit tests
├── test_versioning.py                 Version feature tests
├── test_banking_finance.py            Banking/finance scenarios
├── test_concurrency.py                Concurrency validation
├── test_concurrency_mp.py             Multiprocessing concurrency
├── test_chunked_validation.py         Chunked validation tests
├── test_custom_rules.py               Custom rule plugin tests
├── test_profiling.py                  Profiling tests
├── test_odcs_contract.py              ODCS contract tests
├── test_db_source.py                 Database source tests
├── test_contract_providers.py         Provider dispatch tests
├── test_flatten_normalization.py      Normalization scaffold tests
└── fixtures/                          Example data & contracts

.github/                               GitHub-specific files
├── copilot-instructions.md            AI coding guide
└── workflows/tests.yml                CI/CD pipeline

Full tree: PROJECT_STRUCTURE.md

🚀 Common Tasks

I want to...

Use the tool

  1. Read QUICKSTART.md for setup
  2. See examples in README.md
  3. Check tests/fixtures/customer_contract.yaml for contract format

Understand the architecture

  1. Read docs/ARCHITECTURE.md for design overview
  2. Check FILE_REFERENCE.md for file-by-file guide
  3. Review .github/copilot-instructions.md for big picture
  4. See docs/VERSIONING.md for version management details

Work with contract versions

  1. Read docs/VERSIONING.md for version history and migration guide
  2. Check examples in tests/fixtures/customer_contract_v1.yaml and tests/fixtures/customer_contract_v2.yaml
  3. Run versioning tests: pytest tests/test_versioning.py -v

Add a new feature

  1. Read CONTRIBUTING.md
  2. Check FILE_REFERENCE.md
  3. Look at existing validator in src/datapact/validators/

Write a validation rule

  1. See examples in tests/fixtures/customer_contract.yaml
  2. Read README.md#validation-rules for all rule types
  3. Check tests/test_validator.py for test examples

Run tests

  1. Follow QUICKSTART.md#running-tests
  2. See test structure in tests/test_validator.py

Get AI assistance

  1. Share .github/copilot-instructions.md with your AI agent
  2. Reference specific files from FILE_REFERENCE.md

📋 File Legend

Audience Purpose Files
End Users How to use the tool README.md, QUICKSTART.md
Developers How to develop features CONTRIBUTING.md, ARCHITECTURE.md, FILE_REFERENCE.md
AI Agents How to code in this project copilot-instructions.md, ARCHITECTURE.md
Project Leads Project overview & structure SETUP_SUMMARY.md, PROJECT_STRUCTURE.md

🔑 Key Concepts

  • Contract - YAML file defining validation rules for a dataset
  • Contract Version - Semantic version (1.0.0, 1.1.0, 2.0.0) with migration support
  • Contract Provider - Format adapter (DataPact YAML or ODCS)
  • Normalization - Contract-aware preprocessing (flatten metadata)
  • Validator - Python class that checks one aspect (schema, quality, or distribution)
  • ErrorRecord - Individual validation finding with severity (ERROR or WARN)
  • ValidationReport - Complete validation result (JSON + console summary)
  • Exit Code - Non-zero if ERRORs present (for CI/CD integration)
  • Auto-Migration - Automatic upgrade of old contracts to latest version
  • Profiling - Auto-generate rule baselines from data
  • Rule Severity - WARN/ERROR per rule with CLI overrides
  • Schema Drift - Control extra columns via WARN/ERROR policy
  • SLA Checks - Enforce row count and freshness constraints
  • Chunked Validation - Stream large files with optional sampling
  • Custom Rule Plugins - Extend validation with plugin modules
  • Report Sinks - Write reports to files, stdout, or webhooks
  • Policy Packs - Reuse standard rule bundles across contracts
  • Database Sources - Validate Postgres, MySQL, and SQLite tables
  • ODCS Compatibility - Validate ODCS v3.1.0 contracts

✨ Project Statistics

  • 21 Python source files (~1100+ lines including plugins)
  • 18 Documentation files
  • 70 Test fixture files
  • 120+ Test cases (includes provider dispatch and normalization scaffold tests)
  • 1 GitHub Actions workflow
  • 100% Type hints in core modules
  • 66%+ Code coverage achieved

🔗 Cross-References

Architecture

Implementation

Testing

📞 Support & Questions


Last Updated: February 8, 2026
Project Version: 0.2.0
Status: ✅ Ready for development