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

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.0.tar.gz (1.2 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.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deped_dcp_template-0.2.0.tar.gz
  • Upload date:
  • Size: 1.2 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.0.tar.gz
Algorithm Hash digest
SHA256 1b208298b0db223fdb409936eceadb03643ab1502d4058c890eff1acf48b753e
MD5 09c85d8b42c95f03a72e69f97c56fa5e
BLAKE2b-256 ea38f3eff3c112864eb0c0bc64e2fd0168544f648c770ab13fceac2d4d9f5640

See more details on using hashes here.

File details

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

File metadata

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

Hashes for deped_dcp_template-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19325f992d23a5646a40a81a88c9097316130cb21f38512a3679dbee8018426a
MD5 b477e38d95d21576cd5db765dcb554f9
BLAKE2b-256 e825f626b0e0f974d84dd43269b83c362b49293dcb7ba207f1746e3dbe9011de

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