Skip to main content

o# deped-hr

deped-hr builds and documents the DepEd personnel SQLite artifact: artifacts/personnel.db. The artifact is the read-only boundary for downstream systems that need HR metrics, staffing coverage, contact fields, or audit evidence without re-parsing the portal personnel DB or ESF7 source files. An optional later stage produces artifacts/esf7_details.db for row-linked workload and training audit detail.

Installed consumers use deped_hr.reader.load_reader() for version-bound, receipt-verified, read-only access to the personnel provider output.

The complete staged artifact can combine these source families:

  • the portal personnel SQLite database
  • the current InsightED ESF7 SQLite extract
  • optionally, the three SY 2024-2025 ESF7 CSVs as historical category and COC evidence
  • the ITO access workbook
  • lookup data from deped-dcp-template
  • school, division-office, and regional-office entities from deped-entity
  • the history-aware Public DepEd school spine from deped-dataset

What This Repo Owns

  • Personnel row cleaning and normalization
  • Lookup-driven position title resolution
  • Entity loading for the personnel domain only
  • snapshot-aware ESF7 loading, category authority, workload/training detail, and conservative current-ESF7-to-personnel matching
  • ITO access-source loading, office matching, and access-safe publication
  • A staged, auditable rebuild pipeline for artifacts/personnel.db
  • Public SQL surfaces for analytics, registry import, KPI review, and audit
  • Build metadata, row rejects, compatibility files, and quality-review reports

It does not own the canonical entity registry, the DCP lookup generator, or downstream school-universe, geography, learner-denominator, or analytics policy.

Build

just preflight
just build
just status --json
just audit

just build is the normal local workflow. It reads the personnel source from PORTAL_DB or ../azure-db-extractor/data/portal.db, refreshes artifacts/lookups.db, incrementally rebuilds artifacts/personnel.db from the narrow current InsightED core and ../deped-dataset/artifacts/db.sqlite3. Run just audit separately for the read-only receipt and domain-quality gate.

Add the expensive optional layers independently after the core is usable:

just build-esf7-history
just build-esf7-details

Export the current ESF7 school-governance evidence without personnel fields:

just export-esf7-governance

This writes artifacts/esf7-governance.db, a privacy-minimal audit artifact containing raw school/governance submissions, primitives-derived source IDs, variant counts, and unanimity or strict-majority consensus. It refuses to read an in-progress HR build and does not declare whether ESF7 or BEIS is correct.

The history stage adds exact category evidence and COC fallback. The details stage performs a separate wide InsightED scan to build workload/training summaries and artifacts/esf7_details.db. Either can be run later or omitted.

Docs

Start from Docs Home. The main reading paths are:

Serve the docs locally:

just docs

Key Semantics

  • The selected InsightED SY 2025-2026 snapshot is authoritative for current school-level staffing counts. Before optional history is loaded, current positions remain UNCLASSIFIED; exact SY 2024-2025 raw-position evidence classifies matching positions when the history stage is added.
  • The personnel survey is the contact/email source after audited matching; it is not the staffing-count authority.
  • school_personnel_public_current is the analytics provider surface. It is keyed by school_id and intentionally excludes HR-owned geography text, resubmission guidance, and other registry-only fields.
  • office_ito_access_current is the office access provider surface. It keeps matched ITO regional and division office rows with personal DepEd email addresses and leaves contact/audit details in internal tables and views.
  • school_personnel_registry_current is the materialized school-level import table for registry-style consumers. Historical modified COC evidence is mapped to the shared levels_mask vocabulary with source-year provenance.
  • ESF7 region, division, and district text remains raw evidence alongside primitives-derived normalized labels and source-area IDs. Canonical school governance IDs remain owned by the downstream school spine.
  • Personnel detailed_from and detailed_to evidence resolves to canonical dataset school_key values when an embedded ID, exact normalized name, or strict same-division fuzzy match is safe. Ambiguous candidates remain audit evidence rather than silently becoming school IDs.
  • esf7-governance.db is the narrow cross-repo comparison handoff. It excludes employee, contact, position, qualification, and submission-time fields.
  • School and office KPI consumers should start from v_school_personnel_kpis and v_office_personnel_kpis.
  • Office rollups should use v_office_personnel_summary and v_office_personnel_kpis, not inferred school rows.
  • TIN, phylsys_num, religion, ethnic group, civil status, and raw change payloads from ESF7 are never stored in either artifact.

School-level public surfaces resolve reviewed provider operational aliases before deduplication and aggregation. Raw personnel and ESF7 tables retain source IDs; public rows expose their sorted JSON provenance in source_school_ids.

Verification

Run the complete quality gate:

uv run ruff check src tests notebooks
uv run ruff format --check src tests notebooks
uv run pyright
uv run pytest -q
uv run zensical build
just package

Release files for deped-hr 0.3.2

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-hr 0.3.2
File Size Uploaded
deped_hr-0.3.2.tar.gz 123.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deped-hr 0.3.2
File Interpreter ABI Platform
deped_hr-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 283.8 kB

Release files / deped_hr-0.3.2.tar.gz

Download URL deped_hr-0.3.2.tar.gz
Size 123.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f1d39f13184464598c7715abb4489358a77fe8d849f24fbd75da6ae036f1edde
BLAKE2b-256 checksum
How to use checksums
cdb105ed3591257c05adba83b3f69175e7802a9187e31e4ea54e8a4d1926cd77
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_hr-0.3.2-py3-none-any.whl

Download URL deped_hr-0.3.2-py3-none-any.whl
Size 160.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
292f4d6914dc09ba9604a6626e4f3fd3eb03cc8691a2e252617203742dcfe32d
BLAKE2b-256 checksum
How to use checksums
8437c67709c1e871650f272104fbb8c9f62bace023d7ae54eca49938a230d110
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.3

2 release files

This release

0.3.2 This release

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

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