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.1.tar.gz (45.7 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.1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for deped_entity-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dfa7880463b7e4ea230470ddf75260055fc518717e7b5f4e7bcdac096d686967
MD5 868430a8a34286404a24fc9100491b45
BLAKE2b-256 0e69df097baac4a3a41befad6a5bff510045ce391bddf2e1f14775f7bf2d616b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deped_entity-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a3fe27fe970dc8e622e34482c5f38f4f7b8d39afdb77951aeea02ad100cd05
MD5 821183481ee416e8965b9c5bf6408a03
BLAKE2b-256 4b3437441a8f10a67f804317ff8c0da59e5b8c244cd7fce916fcf5492ab02b77

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