Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
5416bae
Add QR code generation feature to immunization notices
eswarchandravidyasagar Oct 6, 2025
0757520
Update conf.typ template to support QR code display
eswarchandravidyasagar Oct 6, 2025
8cb00f6
Update pyproject.toml dependencies and fix currupted english template
eswarchandravidyasagar Oct 9, 2025
1c29339
Adjust spacing in immunization notice templates for improved readability
eswarchandravidyasagar Oct 9, 2025
5082796
Refactor QR code generation to save as 1-bit PNG and improve image qu…
eswarchandravidyasagar Oct 10, 2025
b0e0cd2
Add PDF encryption functionality
eswarchandravidyasagar Oct 10, 2025
cbcc331
QR code support and improving layout
eswarchandravidyasagar Oct 14, 2025
d929863
compatible with standard PDF editor tools
eswarchandravidyasagar Oct 14, 2025
42b3e4b
Merge branch 'main' into feat/encrypt_pdfs
eswarchandravidyasagar Oct 15, 2025
33a6b3a
Remove compiled Python bytecode file from the repository
eswarchandravidyasagar Oct 15, 2025
0c6dc5a
Remove French client info table and adjust English table for improved…
eswarchandravidyasagar Oct 15, 2025
bcc9006
Add notice configuration support with customizable contact details an…
eswarchandravidyasagar Oct 15, 2025
ef934f2
Add notice configuration support with customizable QR payload and con…
eswarchandravidyasagar Oct 15, 2025
a7bc2a4
refactor: replace inline encryption logic with separate encrypt_noti…
eswarchandravidyasagar Oct 15, 2025
8900ffa
refactor: streamline date conversion logic in utils and related scripts
eswarchandravidyasagar Oct 15, 2025
7608b34
add conditional cleanup message to pipeline script
eswarchandravidyasagar Oct 15, 2025
68d240d
Focusing on Just QR code config for this PR
eswarchandravidyasagar Oct 15, 2025
eac1224
Merge branch 'main' into qr-codes
eswarchandravidyasagar Oct 15, 2025
39d7ae8
Switch to ISO 639-1 language codes in existing code before embarking …
jangevaare Oct 15, 2025
8bad815
feat: Add non-batching preprocessing. Batching functionality remains …
jangevaare Oct 15, 2025
8cd5752
Cherry pick python versions of templates from
kassyray Oct 15, 2025
7f206a3
Rename `.py` template generators, remove the `.sh` versions from branch
jangevaare Oct 15, 2025
3def256
remove duplicated code
eswarchandravidyasagar Oct 16, 2025
7333596
fix redundant code
eswarchandravidyasagar Oct 16, 2025
4f67182
dob cleanup
eswarchandravidyasagar Oct 16, 2025
57b4ef1
Add example with multiple overdue disesases to example dataset
jangevaare Oct 16, 2025
77f7f44
generate notices and template updates to support single-client PDF wo…
jangevaare Oct 16, 2025
a618e1a
pdf compilation also refactored for single-client workflow. Gradually…
jangevaare Oct 16, 2025
0c6f889
Optional batching step
jangevaare Oct 16, 2025
a198edc
cleanup deps
eswarchandravidyasagar Oct 16, 2025
a604a18
move month mappings to global constants for better readability and p…
eswarchandravidyasagar Oct 20, 2025
c7528ec
enhance PDF encryption and decryption path handling using pathlib
eswarchandravidyasagar Oct 20, 2025
94ed430
use PYTHON variable for consistent Python interpreter in encryption s…
eswarchandravidyasagar Oct 20, 2025
74494e9
Refine notice encryption: batch parallel run, skip existing outputs, …
eswarchandravidyasagar Oct 20, 2025
c34498f
batch encryption to improve worker management and job execution
eswarchandravidyasagar Oct 20, 2025
0fdbdad
Replace run_pipeline.sh with Python orchestrator for better maintaina…
Copilot Oct 22, 2025
b9b36d6
Merge branch 'feat/qr-codes-merge' into refactor/single-client-pdfs
jangevaare Oct 23, 2025
1de32a5
Merge branch 'feat/encrypt-pdfs-merge' into refactor/single-client-pdfs
jangevaare Oct 23, 2025
7bf8565
Update README and configuration files for QR code and PDF encryption …
jangevaare Oct 23, 2025
b2634d7
Centralize configuration into parameters.yaml
jangevaare Oct 23, 2025
2e6ee29
Merge feat/unit-testing-merge: Add CI/CD infrastructure and modernize…
jangevaare Oct 23, 2025
523e4ab
Add optional QR data field to ClientArtifact dataclass
jangevaare Oct 23, 2025
ecb2b8a
Move imports to top of scripts, use as modules. Enable use of pipelin…
jangevaare Oct 23, 2025
db3b8d9
Move .typ files into a dedicated artifact subdirectory
jangevaare Oct 23, 2025
2afc0f6
Documenting data flow
jangevaare Oct 23, 2025
0d06244
QR code generationas a dedicated script (`generate_qr_codes.py`)
jangevaare Oct 23, 2025
c2b7b79
Agents!
jangevaare Oct 23, 2025
c8252bd
data_models and enums!
jangevaare Oct 23, 2025
a8162ca
Codecoverage
jangevaare Oct 24, 2025
1635643
Refactor testing, and include testing and documentation standards, an…
jangevaare Oct 24, 2025
5d303db
chore: cherrypick test.yml coverage configuration from feat/code-cov
jangevaare Oct 25, 2025
c2843de
chore: cherrypick pre-commit configuration from feat/pre-commit
jangevaare Oct 25, 2025
df36625
precommit hook use and format
jangevaare Oct 25, 2025
c03c49e
Docs pass as we gear towards production readyness
jangevaare Oct 25, 2025
8f7a798
Reorganize templates to template folder, and update tests and documen…
jangevaare Oct 25, 2025
4868b8c
rename scripts to pipeline, run_pipeline to orchestrator, update all …
jangevaare Oct 26, 2025
fe4faab
Add `ty` typechecker (note pre-commit hook not yet available for tool)
jangevaare Oct 26, 2025
86ed47c
Run `ty` and fix 45 detected issues.
jangevaare Oct 26, 2025
7fe4a75
Enable tracking of `uv.lock`, and add dependabot to keep up to date
jangevaare Oct 26, 2025
90614a0
docstring standardization
jangevaare Oct 26, 2025
b84cb17
common enum for templated strings in qr codes and passwords.
jangevaare Oct 26, 2025
ef6b09a
Language as an enum as well
jangevaare Oct 26, 2025
93dd5c9
typst not actually used
jangevaare Oct 26, 2025
09656cb
Removed deprecated code in pdf encryption
jangevaare Oct 26, 2025
9a3fa7b
Remove unused convenience function
jangevaare Oct 26, 2025
a22e428
Remove underscore prefixes from function names
jangevaare Oct 27, 2025
ecc88e3
Streamlined agent guidance
jangevaare Oct 27, 2025
8f832c9
config validator reuse, documentation of step contracts, more code cl…
jangevaare Oct 27, 2025
dfe3b2a
Testing standards follow documentation standards
jangevaare Oct 27, 2025
602def6
cherry pick docs/BRANCHING.md
jangevaare Oct 27, 2025
7238805
Remove shebang - not needed for `uv run`
jangevaare Oct 27, 2025
3008b23
Centralize normalization, and translation for both overdue disease li…
jangevaare Oct 27, 2025
393f6a3
typ files actually generated with translated headers...
jangevaare Oct 27, 2025
2eace57
Use babel to support flexible string formatting of dates
jangevaare Oct 27, 2025
0c9a881
Add warnings for duplicate client IDs
jangevaare Oct 28, 2025
fb4be6e
ISO formatted dates in parameters, and renamed keys for clarity
jangevaare Oct 28, 2025
34f98e8
Remove date delivered from qr code and pdf encryption template options
jangevaare Oct 28, 2025
36d7736
Move parameter configuration consistently into own README
jangevaare Oct 28, 2025
a3a29ec
Greater reuse of clientrecord, removal of fullname storage and use
jangevaare Oct 28, 2025
cda0886
Emit more informative message on direct module usage
jangevaare Oct 28, 2025
99aaac9
Merge branch 'main' into refactor/single-client-pdfs
jangevaare Oct 29, 2025
adb196c
Add back page-numbering
jangevaare Oct 29, 2025
7e8016b
count_pdfs to more generic validate_pdfs; use of invisible markers in…
jangevaare Oct 30, 2025
60009a6
Documentation updates for pdf validation
jangevaare Oct 30, 2025
18300ab
partial testing of pdf validator
jangevaare Oct 30, 2025
099e099
Add "measurements" to validation. Measure contact area.
jangevaare Nov 3, 2025
b545430
Add documentation to PDF validation approach
jangevaare Nov 3, 2025
4658ca0
client id validation rule
jangevaare Nov 3, 2025
69a93d9
Merge pull request #60 from WDGPH/feat/pdf-validator
jangevaare Nov 3, 2025
c1b31ca
Fix tests for 10-digit client ID tests
jangevaare Nov 3, 2025
d2efc75
Ruff format .
jangevaare Nov 3, 2025
ae7ad4f
Rename pdf batching to pdf bundling, enable bundling + individual pdf…
jangevaare Nov 3, 2025
d2cc9ca
Bundling of unencrypted PDFs only
jangevaare Nov 3, 2025
f8b9eb6
improve clarity of clean up workflows with before_run and after_run s…
jangevaare Nov 3, 2025
8255e91
if removing individual PDFs option enabled, look for either batching …
jangevaare Nov 3, 2025
ee7bba7
Typo fixes, and remove lazy loading of yaml in tests
jangevaare Nov 4, 2025
a8d2bd0
Merge pull request #62 from WDGPH/feat/batch-n-encrypt
jangevaare Nov 4, 2025
25a82ec
Remove mention of OEN in docstring - not used for client id
jangevaare Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2

updates:

# uv lockfile
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
groups:
# Group all minor and patch updates for GitHub Actions
# Keep individual updates for major updates
minor-and-patch:
update-types:
- "minor"
- "patch"

# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
interval: "daily"
groups:
# Group all minor and patch updates for GitHub Actions
# Keep individual updates for major updates
minor-and-patch:
update-types:
- "minor"
- "patch"
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ __pycache__/
*.pyo
*.log
*.tmp
uv.lock

# Code coverage
htmlcov/
*.egg-info/
build/
dist/
.coverage
.coverage.*
.pytest_cache/
*.cover
htmlcov/
coverage.xml
coverage.json
177 changes: 177 additions & 0 deletions AGENTS.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Agent Development Guidelines


## Read first

* **Standards**:
* `docs/DOCUMENTATION_STANDARDS.md`
* `docs/TESTING_STANDARDS.md`
* `docs/CODE_ANALYSIS_STANDARDS.md`

---

## Workflow

1. **Understand:** read code, trace flows, grep usages, read docs.
2. **Plan:** design around findings.
3. **Implement:** imports at top, types, meaningful docstrings.
4. **Test:** `uv run pytest` with markers.
5. **Configure:** add parameters under the correct step in YAML with comments.
6. **Document:** update standards or docstrings when feature‑complete. **Avoid standalone reports; strongly focus on integrating findings into existing docs and keeping them up to date.**

---

## Collaboration

* Present findings in the conversation as Markdown. Do not emit temporary files or heredoc tricks.
* Integrate durable learnings into standards, module comments, or docstrings.
* End each task by archiving insights where future contributors will look.

---

## Package layout

* **Orchestrator:** `pipeline/orchestrator.py` is the `viper` CLI entry point and coordinates 9 steps.
* **Steps:** Modules are organized by steps 1–9, not by functional themes.
* **Templates:** `templates/` contains `en_template.py`, `fr_template.py`. Import via `from templates import ...`. Typesetting is separate from orchestration.

---

## Dependencies

Single source of truth: `uv.lock`.

* Code to locked versions. No runtime fallbacks for alternate APIs.
* Upgrades:

```bash
uv lock --upgrade
uv sync
uv run pytest
git add uv.lock && git commit -m "deps: upgrade"
```
* If a version bump is required, update `pyproject.toml`, run `uv sync`, test, and commit the new lockfile.

---

## Configuration (`config/parameters.yaml`)

* Organize by pipeline step with headers, e.g., `# Step 3: Generating QR Codes`.
* Use dot notation and `snake_case` keys, e.g., `qr.enabled`, `qr.payload_template`.
* Document inline in YAML.
* Validate quickly:

```bash
uv run python -c "import yaml,sys; yaml.safe_load(open('config/parameters.yaml')) or sys.exit(0)"
```

---

## Code style

* Imports at top: future → stdlib → third‑party → local.

```python
from __future__ import annotations
import json
import yaml
from .config_loader import load_config
```
* Use type hints, f‑strings, docstrings, dataclasses.
* No wildcard imports.
* Depth and significance guidance lives in `docs/CODE_ANALYSIS_STANDARDS.md`.

---

## Quality gates (pre‑commit)

One‑time setup:

```bash
uv sync --group dev
uv run pre-commit install
```

Manual run:

```bash
uv run pre-commit run --all-files
```

Hooks (block commits on failure): `ruff check --fix` then `ruff format`.

---

## Type checking (`ty`)

Check before tests:

```bash
uv run ty check
```

Resolve all type errors or justify with `# type: ignore` and a short comment.

---

## Command execution discipline

Run each shell command once. Investigate before re‑running.

* If you need stderr, include it from the start: `2>&1`.
* On hangs or failures, inspect state (`git status`, file contents) before retrying.
* After interruptions, verify outcomes before re‑execution.

---

## Engineering principles

Applies at all times. Compatibility posture is noted where behavior differs before and after 1.0.

1. **Simplicity first.** Prefer straightforward code over abstraction. Use native structures freely. Extract helpers only when they reduce duplication or improve clarity.

* *Compatibility note:* pre‑1.0 favors rapid simplification with no backward‑compat guarantees. Post‑1.0 preserve public contracts when changing code.
2. **Clear boundaries and reuse.** Colocate helpers with the step that uses them. Extract to `utils.py` only when reused by ≥2 modules and clarity improves. Prefer pure, side‑effect‑free helpers with action‑oriented names.
3. **Deterministic, step‑isolated pipeline.** Steps read inputs from disk and write outputs to disk. Do not pass in‑memory state via the orchestrator. Same input → same output, including ordering and filenames.
4. **Contracts over defensiveness.** Centralize input validation in preprocessing and output checks in dedicated validation steps. Fail fast with precise exceptions. Do not add silent fallbacks.
5. **Naming and public surface.** Functions use `snake_case` with verbs (e.g., `generate_typst_files`). Do not rely on leading underscores for privacy; document intent. Only the orchestrator exposes a CLI; no per‑module parsers.
6. **Dependencies are locked.** Write to the APIs in `uv.lock`. If an API changes, upgrade and re‑lock. Do not branch at runtime to support multiple versions.
7. **Errors and logging.** Catch only exceptions you can handle meaningfully. Raise actionable messages. Log at step boundaries and major operations. Informative, not noisy.
8. **Parallel development without drift.** Keep core steps stable (preprocess, notices, compile, validate). Optional steps (encryption, batching, cleanup) may evolve independently if contracts hold. Update tests and docs with any schema or layout change.
9. **Tests are the spec.** Update tests with behavior changes. Use integration tests for quick feedback and E2E tests for coverage. Keep E2E tests project‑root aware.
10. **Documentation placement.** Enduring standards live here and in `docs/`. Point‑in‑time analyses and refactor plans live in `docs/`.
- **Single canonical working document per initiative.** During a feature or refactor effort, maintain one authoritative document (e.g., `docs/DEFENSIVE_CODE_AND_HELPERS_PLAN.md`). Append progress (phases, decisions, status) to that file instead of creating new phase‑specific Markdown files.
- Prefer sections like "Status", "Decision Log", and dated "Updates" within the canonical doc over new files such as `PHASE_X_START.md` or `PHASE_X_COMPLETION.md`.
- If interim files were created, integrate their content back into the canonical doc and avoid introducing new ones. Link to historical PRs/commits for provenance rather than duplicating documents.

---

## Tests: quick reference

Setup once:

```bash
uv sync --group dev
```

Run pipeline:

```bash
uv run viper <input.xlsx> <en|fr>
```

Run tests:

```bash
uv run pytest # all
uv run pytest -m unit # unit only (~2s)
uv run pytest -m "not e2e" # skip e2e
uv run pytest tests/e2e/ -v # only e2e
uv run pytest tests/test_file.py::TestClass::test_name -v
```

Coverage:

```bash
uv run pytest --cov=pipeline --cov-report=html # opens htmlcov/index.html
```
Loading