Skip to main content

Builds a canonical stakeholder entity SQLite database from the StakeholderProfile workbook.

Project description

deped-entity

deped-entity builds the canonical stakeholder entity SQLite database from the StakeholderProfile workbook. It owns entity identity for schools, division offices, and regional offices so downstream packages can join against a shared natural_key contract instead of rebuilding their own entity tables.

What This Package Owns

  • Header-driven extraction from StakeholderProfile
  • Canonical entities.db artifact creation
  • Travel-time, coordinate, and transportation alias normalization
  • Reference and junction tables for nearby institutions, road conditions, and transportation modes
  • Build provenance through build_runs

This package is the source of truth for the entities.db artifact only.

Inputs And Outputs

Required input:

  • A stakeholder workbook under data/ with the expected StakeholderProfile headers

Primary output:

  • artifacts/entities.db

CLI

Build the entity database:

uv run entity build \
  --input data/2026-04-02-entities.xlsx \
  --db artifacts/entities.db

Audit a built database:

uv run entity audit \
  --db artifacts/entities.db

Notes

  • The loader maps columns by header text, not by Excel column letter.
  • Blank business-key rows are skipped.
  • All nonblank stakeholder rows are retained, including rows whose Type Of Transaction is not Beginning Inventory.
  • natural_key generation intentionally matches the shared helpers from deped-dcp-template.
  • Multiple source rows may share the same natural_key; source_row_id remains the unique row-level provenance key.

Documentation

This repository uses Zensical for documentation.

Build the docs locally with:

uv run zensical build

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_entity-0.1.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

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

deped_entity-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file deped_entity-0.1.0.tar.gz.

File metadata

  • Download URL: deped_entity-0.1.0.tar.gz
  • Upload date:
  • Size: 45.1 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

Hashes for deped_entity-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69a4ef19db448e234c8ed6025702a79d03ede4fdb8edd8e9a651979e11a22578
MD5 2ae2ebc10aef6a9b1f4b9884a44a6411
BLAKE2b-256 fcb1fa01c1ea530ec53b6b89b09b6c093626a96ae52900b39f9c674afcc313db

See more details on using hashes here.

File details

Details for the file deped_entity-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deped_entity-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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_entity-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 476104a7306f9b6ca34162593758d225205b2fa6250b528652958c17b92be486
MD5 bcc47f0736771aab2d1be276d1f03483
BLAKE2b-256 f7440bb4a121c80c719f8ac3c934d5faada1732040be6bf979d12239b9cb11ae

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