Skip to main content

Shared runtime helpers for DepEd DCP data-cleaning packages.

Project description

deped-dcp-template

deped-dcp-template is the shared template and normalization layer extracted from the older DepEd DCP monolith pipeline.

That earlier pipeline ingested three operational CSV sources, personnel, equipment, and connectivity, into one combined SQLite database. To make that work, it had to repair the messy freeform values submitted by schools, divisions, and regions: entity extraction, position normalization, equipment dimension canonicalization, person-link resolution, connectivity staging/promotion, and audit outputs such as unmapped_positions.txt and equipment_dimension_issues.txt.

The root cause lives in the Excel collection workbooks that DepEd distributed. This repository ships those three canonical v1.16 templates in templates/. They define the official value universe through sheets such as List of Positions, Referential Data, Regions, and SDOs, plus a Read Me sheet with fill instructions. In practice, many submitters typed freeform values instead of using the provided dropdowns, so downstream systems still need a shared cleanup layer anchored to the template catalogs.

Why This Package Exists

Downstream apps should not each:

  • copy the same template files
  • parse the same workbook sheets independently
  • carry slightly different position and equipment normalization rules
  • drift on what counts as the canonical DepEd value set

This package provides one reusable base layer so consumer packages can share the same template-derived lookups and baseline cleaning behavior.

What Happens Here

This repository currently does four things:

  • ships the canonical school, division, and region Excel templates
  • extracts their canonical lists into a SQLite lookup database
  • exposes shared normalization helpers for identifiers, dates, phone numbers, emails, positions, and selected equipment dimensions
  • exposes shared CSV/entity/personnel helper code used by downstream loaders

Running the extractor on the bundled v1.16 templates currently yields a lookup database with:

  • 314 canonical positions
  • 65 equipment items
  • 76 equipment brands
  • 18 regions
  • 222 unique region-division pairs

What Downstream Packages Still Own

This package is not the full monolith rebuild. Consumer packages still own:

  • end-to-end ingestion of the three operational source CSVs
  • domain-specific SQLite schemas, indexes, and views
  • person-link resolution policy beyond the shared helpers
  • connectivity staging and promotion workflows
  • final artifact contracts and audit-file emission

The shared helpers in this repository are the base layer those downstream flows build on.

Install

Published dependency:

uv add deped-dcp-template

Local development against a sibling checkout:

[tool.uv.sources]
deped-dcp-template = { path = "../deped-dcp-template" }

Build The Template Lookup DB

uv run deped-dcp-template extract \
  --templates-dir templates \
  --output artifacts/template_lookups_v1.16.db

When installed as a dependency, templates resolves to the bundled workbook directory shipped inside the package. Downstream projects do not need to copy the Excel templates into their own repository just to run the extractor.

Inspect the generated database summary:

uv run deped-dcp-template show \
  --db artifacts/template_lookups_v1.16.db

Tests

uv run pytest -q

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deped_dcp_template-0.2.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deped_dcp_template-0.2.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file deped_dcp_template-0.2.1.tar.gz.

File metadata

  • Download URL: deped_dcp_template-0.2.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • 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

Hashes for deped_dcp_template-0.2.1.tar.gz
Algorithm Hash digest
SHA256 62f109995faf2447495d1bb185ca4a8ccd759afe25a7918af9435cf15b0abde2
MD5 ed69c98eea08c014e0a06fd67dd130ba
BLAKE2b-256 719a48455762232a08ed6678b9cff046875383cfabf1f6a0eac9ef2f1f3a0e6c

See more details on using hashes here.

File details

Details for the file deped_dcp_template-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: deped_dcp_template-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • 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

Hashes for deped_dcp_template-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11732cfa439bf603e7985be885bf109eb8a8729260e6fd468a35b3fe7a7037ba
MD5 aed1822881b75ec5208f01fa9dedb391
BLAKE2b-256 ff68550fed4c94b5ed61668491528571670ba429040ff6660dbca60792ba776a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page