dppvalidator is a Python library for validating Digital Product Passports (DPP) according to EU ESPR regulations and CIRPASS/UNECE ontologies.
- Python 3.10+ with type hints
- Pydantic v2 for validation models
- uv for package management and versioning
- ruff for linting and formatting
- ty (Astral) for type checking
- pytest for testing
- GitHub Actions for CI/CD
src/dppvalidator/ # Main package
├── models/ # Pydantic models for DPP entities
├── validators/ # Validation logic
├── verifier/ # Signature and credential verification
├── exporters/ # JSON-LD and other export formats
├── schemas/ # JSON Schema loading and caching
├── vocabularies/ # Controlled vocabulary loading
├── cli/ # Command-line interface
├── plugins/ # Plugin system
└── __init__.py
tests/ # Test suite
├── unit/ # Unit tests
├── integration/ # Integration tests
├── property/ # Property-based tests (Hypothesis)
├── fuzz/ # Fuzz tests
└── fixtures/ # Test data
- Use gitflow:
develop→feature/*→ PR →develop→release/*→main - Run
/lintbefore committing - Run
/testto verify changes - Use conventional commits
- Follow SOLID and DRY principles
- Validate at boundaries with Pydantic
- Type hint all public APIs
- Document public functions with docstrings