Skip to main content

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

Project description

deped-entity

deped-entity builds artifacts/entities.db, the canonical SQLite artifact for DepEd stakeholder entities. It reads the stakeholder Sheet1 workbook, derives shared natural_key values for schools and offices, and stores normalized location, access, community, personnel, contact, transportation, ITO, coordinate audit, and build provenance tables.

Downstream packages should use this artifact for entity identity instead of rebuilding stakeholder tables independently.

Inputs

Required:

  • data/2026-04-29-entities.xlsx, or another stakeholder workbook with the expected Sheet1 headers

Optional:

  • data/2026-04-29-ito-list.xlsx for Regional and Division ICT Officer tables
  • data/2025-12-20-geo-k12-deped.csv for school coordinate baseline audits

The justfile uses these default paths. Override them with the CLI when using a different local file.

Build

Download shared source files:

just download

Build the standard artifact:

just build

Audit the result:

just audit

The standard build writes artifacts/entities.db, loads the stakeholder workbook, imports ITO data, loads the coordinate baseline, creates indexes and views, and records a build_runs provenance row.

CLI

Build with explicit paths:

uv run entity build \
  --input data/2026-04-29-entities.xlsx \
  --ito-input data/2026-04-29-ito-list.xlsx \
  --geo-input data/2025-12-20-geo-k12-deped.csv \
  --db artifacts/entities.db

Refresh only ITO tables in an existing database:

uv run entity ito \
  --input data/2026-04-29-ito-list.xlsx \
  --db artifacts/entities.db

Inspect artifact counts and audit metrics:

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

Consumer Notes

  • entities.source_row_id is unique row provenance from the workbook ID.
  • entities.natural_key is the shared cross-artifact identity key.
  • Multiple workbook rows can share one natural_key; use v_recent_entries when a consumer needs the latest row per entity.
  • entities.longitude and entities.latitude remain workbook-submitted coordinates. The optional geo CSV is loaded into school_coordinates_base and compared through v_school_coordinate_deviations.
  • ITO rows are kept even when best-effort matching cannot resolve an entity_id.

Docs

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.2.1.tar.gz (115.3 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.2.1-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deped_entity-0.2.1.tar.gz
  • Upload date:
  • Size: 115.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.2.1.tar.gz
Algorithm Hash digest
SHA256 3f9962d9bbed69f5e7f0cdc368cbeb1aafcf7b652be1d8ba9ccf04f40b507917
MD5 ddfdf32e283047c1106d3ea12759b6ff
BLAKE2b-256 5c02e04c731c03c710c91f39fe44217e71ba423e7a87d0012f094ab1edb8b306

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deped_entity-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 358496e4a28eee5fe7c37db31bdd0f8aa34f551b70dcc1323d418591f8ffbcf6
MD5 00a9a230134dd0cac288c10e45023bb3
BLAKE2b-256 dd05397cc8a1bd0da92257badda74991b19dcb04bb4415ba315e7d0ca5b1465b

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