Equipment cleaner extracted from the DepEd asset pipeline.
Project description
deped-equipment
deped-equipment cleans equipment CSV exports into a standalone SQLite database. It consumes three upstream artifacts: lookups.db from deped-template, entities.db from deped-entity, and personnel.db from deped-hr.
What This Package Owns
- Equipment row cleaning and normalization
- Canonicalization of equipment dimensions such as brand, model, unit, category, acquisition mode, and DCP year
- Review-driven DCP attribution normalization layered on top of
lookups.db - Review-driven equipment location normalization for classroom, lab, office, and other storage/use contexts
- Review-driven supplier and disposition-status normalization for common vendor and asset-state variants
- Entity import from the upstream entity artifact
- Linking accountable personnel using a personnel snapshot artifact
- Equipment views and dimension issue audits
This package owns the equipment database contract only.
Inputs And Outputs
Required inputs:
- an equipment CSV export
- a lookup database produced by
deped-template - an entity database produced by
deped-entity - a personnel database produced by
deped-hr
Primary outputs:
equipment.dbequipment_dimension_issues.txt
The database stores normalized equipment rows plus canonical dimension tables seeded from the lookup artifact and reviewed dictionaries under src/deped_equipment/dictionaries/.
CLI
Build the equipment database:
uv run equipment build \
--equipment data/equipment.csv \
--lookups artifacts/lookups.db \
--entities-db artifacts/entities.db \
--personnel-db artifacts/personnel.db \
--db artifacts/equipment.db
Run the lightweight audit command:
uv run --package deped-equipment deped-equipment audit \
--db artifacts/equipment.db
Nuances
- Entity loading is artifact-driven. This package imports entities from
entities.dbusing the same upstream contract asdeped-hr. - Personnel matching is artifact-driven. This package reads a snapshot from
personnel.dband reuses shared helpers fromdeped-hranddeped-dcp-templatewhere appropriate. - Link resolution uses multiple signals, including scoped employee counts and name matching. Ambiguous matches are preserved as ambiguous rather than guessed.
- Equipment rows whose natural key is missing from the upstream entity artifact are flagged in
equipment_dimension_issues.txtand skipped rather than aborting the build. - Dimension issues are treated as first-class audit output. Raw values that cannot be canonicalized cleanly are emitted to
equipment_dimension_issues.txt. - DCP attribution is review-driven. Raw
DCP Packagevalues stay indcp_package_raw, while approved canonical values resolve throughequipment_dcp_attributions. - Equipment location is review-driven. Raw
equipment_locationvalues remain intact, while approved canonical groupings resolve throughequipment_locations. - Only equipment-owned SQL assets live here now. Retired monolith views and unrelated tables were intentionally removed.
Tests
Run the package tests from this directory:
uv run pytest -q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deped_equipment-0.1.0.tar.gz.
File metadata
- Download URL: deped_equipment-0.1.0.tar.gz
- Upload date:
- Size: 78.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b75d948255a76de2828b2e40a551791bec80e134352e5d82966804184435f20c
|
|
| MD5 |
f276688a7fabb33954a5668b68003539
|
|
| BLAKE2b-256 |
05ad920fab337954f7c7f6230a2d8bb958f90a36c736c6ae289722a8c7f08259
|
File details
Details for the file deped_equipment-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deped_equipment-0.1.0-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f2b3f93d8c7fa00695664a2678af63ff62041d74a6c87d2e435720aa73bc57d
|
|
| MD5 |
54da3c75007df20ec2af14f75da3bc85
|
|
| BLAKE2b-256 |
5f7cfaf81e7ef8c33e85c3a85e2663cb621f18df6fc2622667f9612ac8444b35
|