Metadata-Version: 2.3
Name: deped-dcp-template
Version: 0.11.1
Summary: Shared templates and cleaning semantics for DepEd DCP data packages.
Requires-Dist: deped-primitives>=0.12,<0.13
Requires-Dist: deped-runtime[excel]>=0.7,<0.8
Requires-Dist: click>=8.4
Requires-Dist: email-validator>=2.3
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# deped-dcp-template

`deped-dcp-template` packages the approved version 1.16 DepEd Computerization
Program (DCP) workbooks and the rules needed to read their controlled values.
It can extract lookup tables into SQLite and normalize submitted DCP values.

Version `0.10.0` replaced the former catch-all cleaner with focused, typed
modules. Applications remain responsible for loading their own source data and
writing their own databases. See the
[DepEd Orchestrator](https://mv3.dev/deped-orchestrator/) for this package's
place in the wider build process.

## Install

```bash
uv add deped-dcp-template
```

## Commands

```bash
uv run deped-dcp-template extract --templates-dir templates --output artifacts/base.db
uv run deped-dcp-template show --db artifacts/base.db
uv run --extra r2 deped-runtime r2 ls --prefix deped-dcp-template/templates
```

R2 support is optional and provided by `deped-runtime`.

## Public modules

- `normalization`, `values`, and `timestamps` handle submitted scalar values.
- `contacts`, `people`, and `entities` handle DCP collection records.
- `positions` and `equipment` expose immutable catalog builders and
  normalization policy.
- `audit` records shared DCP validation evidence.
- `extractor` and `template_assets` own canonical workbook artifacts.

Generic file, Excel, console, SQL, SQLite, and storage mechanics belong to
`deped-runtime`. Ecosystem-wide DepEd identity and governance semantics belong
to `deped-primitives`. In particular,
`deped_dcp_template.values.normalize_school_id` intentionally retains the
integer-coercion contract used by DCP collection schemas; it is not a
replacement for the Primitives school-identity APIs.

## Documentation and checks

- [Docs index](docs/index.md)
- [Architecture](docs/architecture.md)
- [Lookup extraction](docs/lookup-extraction.md)
- [Normalization](docs/normalization.md)
- [Downstream adoption](docs/downstream-adoption.md)

```bash
just preflight
just status --json
just audit
just check
just package
```

This is a shared library, so `just build` intentionally explains that there is
no repository-level data product. Consumers use the explicit
`deped-dcp-template extract` command for lookup databases. `just download`
restores canonical templates; `just fetch` performs no network refresh.
