This is a small Python data-quality exercise for validating synthetic client-delivery CSV files before review.
- Required columns
- Required values
- Unique product IDs
- Allowed categories
- Positive numeric prices
- Allowed statuses
The command-line workflow follows a simple path:
CSV
-> pandas DataFrame
-> validation functions
-> structured ValidationIssue records
-> ValidationResult
-> CLI summary
Each validation function checks one aspect of the delivery. Issues are collected as structured records, and the combined result provides a clear pass-or-review summary.
.
├── data/
│ ├── invalid_delivery.csv
│ └── valid_delivery.csv
├── delivery_validator/
│ ├── __init__.py
│ └── validator.py
├── tests/
│ └── test_validator.py
├── .gitignore
├── README.md
└── requirements.txt
On macOS or Linux with Python 3 installed:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython -m delivery_validator.validator data/valid_delivery.csv
python -m delivery_validator.validator data/invalid_delivery.csvvalid_delivery.csv:
- 20 records
- 0 issues
- PASS
invalid_delivery.csv:
- 20 records
- 9 issues
- REVIEW REQUIRED
python -m pytest -q12 pytest tests cover the core validation rules and regression behaviour.
All included example products, brands, and records are synthetic.
This repository is a bounded engineering exercise rather than a production client-data-delivery system.