Skip to content

feat: inventory reconciliation – data comparison, quality checks, and test suite#9

Open
shahvarun93 wants to merge 7 commits intocoeverywhere:masterfrom
shahvarun93:feat/inventory-reconciliation
Open

feat: inventory reconciliation – data comparison, quality checks, and test suite#9
shahvarun93 wants to merge 7 commits intocoeverywhere:masterfrom
shahvarun93:feat/inventory-reconciliation

Conversation

@shahvarun93
Copy link
Copy Markdown

Title:

feat: inventory reconciliation – data comparison, quality checks, and test suite

Description:

## Summary
Implements the inventory reconciliation assessment against the two provided CSV snapshots.

## Deliverables
- `reconcile.py` – loads both snapshots, normalises data, reconciles differences, and outputs structured reports
- `tests/test_reconcile.py` – 39 pytest cases covering normalisation helpers, snapshot loading, and reconciliation logic
- `output/` – CSV and JSON reports generated against the actual snapshot data
- `NOTES.md` – approach, data quality findings, and AI tooling usage

## Reconciliation Results
| Status | Count |
|---|---|
| Quantity changed | 71 |
| Added (new) | 5 |
| Removed | 2 |
| Unchanged | 2 |

## Data Quality Issues Found
- Non-standard SKU formats (`SKU005`, `sku-008`) → normalised
- Duplicate SKU-045 in snapshot 2 with conflicting name and negative quantity
- Mismatched column names between snapshots (`qty` vs `quantity`, etc.) → handled via column alias map
- Float quantities (`70.0`, `80.00`) and non-ISO date format (`01/15/2024`) → normalised
- Leading/trailing whitespace in names and locations → stripped

## How to Run
```bash
python reconcile.py
python -m pytest tests/ -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant