Skip to main content

deped-entity

deped-entity builds the canonical stakeholder entity artifact for DepEd data repositories. Package version 0.3.1 produces schema entities_v10 at artifacts/entities.db from the portal stakeholder_profile table.

The artifact preserves each admitted source row, derives shared entity identity, normalizes repeatable detail records, publishes current stakeholder and remoteness views, and records build provenance. Reporting marts, consumer-specific filters, authoritative geography, and ITO access policy stay with their owning repositories.

Start by task

The complete documentation starts at docs/index.md.

Standard workflow

just preflight
just build
just status --json
just audit

just download and just fetch explain that the raw source is owned by azure-db-extractor; they do not contact the network. Use just package only to build the Python distribution.

The default paths are:

Purpose Path
Portal source ../azure-db-extractor/data/portal.db
Generated artifact artifacts/entities.db

Set PORTAL_DB to use another portal database. To pass both paths explicitly:

uv run entity build \
  --portal-db ../azure-db-extractor/data/portal.db \
  --db artifacts/entities.db

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

The build validates the source relation and its required snake_case columns, creates schema entities_v10 in a same-directory staging database, loads and checks the artifact, then atomically replaces the output. A failed build leaves the previous artifact intact. The audit opens an existing artifact read-only.

Public surfaces

Surface Use
entities Source-row identity, provenance, submitted geography, and transaction fields
entity_stakeholder_current Latest raw stakeholder row per natural_key
entity_remoteness_current Latest raw stakeholder row with explicit known/unknown remoteness evidence
school_remoteness_current One canonical school after reviewed school-ID aliases and evidence consolidation
detail and relation tables Normalized location, remoteness, community, contact, personnel, institution, road, and transport evidence
build_runs Source hash, row counts, schema version, and completion metadata

Consumer rules

  • Use entity_id only for joins inside entities.db; use natural_key across artifacts.
  • Use school_remoteness_current.school_id for school-grain remoteness joins. The view keeps contributing raw IDs in source_school_ids.
  • Treat missing detail rows and false _known fields as absent evidence, not a negative answer.
  • Treat psgc_code, longitude, and latitude as cleaned portal submissions. Canonical geography and coordinate review belong to deped-dataset and deped-maps.
  • Read ITO personnel and office-access surfaces from deped-hr.

Development

just test
just check

just check runs lint, formatting and Pyright checks, tests, and the Zensical docs build.

Release files for deped-entity 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deped-entity 0.3.1
File Size Uploaded
deped_entity-0.3.1.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deped-entity 0.3.1
File Interpreter ABI Platform
deped_entity-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.9 kB

Release files / deped_entity-0.3.1.tar.gz

Download URL deped_entity-0.3.1.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
65ca2f51fabed7e2d6a3904932eca284ef3768463a2b24bd25797cf96bcf7fb9
BLAKE2b-256 checksum
How to use checksums
502e6a74b451f93ccabe19ca4bdd01a64a7a21d8f256a2c73dbabc94b08eb9af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

Release files / deped_entity-0.3.1-py3-none-any.whl

Download URL deped_entity-0.3.1-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34c692d00be8170b0b26be33dcd750fd8c2a808b8272d97e35bed4f60299441c
BLAKE2b-256 checksum
How to use checksums
3d4aee06146a4e99c7553cf90d0e8bf5edbb4b8064a5ab91d6b25fcde469601f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.2.1

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page