devPTIpack Architecture Redesign
⚠️ Important caveat: The architecture documents referenced below (in .github/docs/) are proposed designs, not final mandates. They represent one well-researched path forward, but developers implementing these changes should treat them as guidance. Deviations are expected and welcome — discuss in the relevant issue or PR before taking a different direction. The truth is in the code and the tests, not in these documents.
Objective
Revise and refactor devPTIpack from a dual-generation golem package (with ~2000+ lines of dead legacy code, minimal documentation, and ~14% test coverage) into a clean, well-documented, thoroughly tested modern R package with a clear public API and extensible data ingestion.
Architecture Documents
All design documents live in .github/docs/:
Sub-Issues (ordered by dependency)
Relationship to Pre-Existing Issues
| Issue |
Relationship |
| #2 (debug artifacts) |
Subsumed by #8 Batch 1 |
| #3 (deprecate v1 modules) |
Subsumed by #8 Batches 1–5 |
| #4 (remove unused exports) |
Subsumed by #8 Batch 1 |
| #5 (H3 global database) |
Upstream design; #13 implements the R package interface |
| #6 (unit test coverage) |
Subsumed by #10 |
| #7 (validation refactor) |
Complementary; can proceed independently |
| #1 (data interfaces) |
Long-term vision; #13 addresses the hex ingestion portion |
Phasing & Dependencies
#8 Cleanup ──────┐
├──► #11 Documentation ──► #12 Workspace/Vignettes/pkgdown
#10 Testing ─────┘
#13 Hex Ingestion (independent, can start anytime)
End-State Goals
After all sub-issues are resolved:
- Only modern pipeline remains — entry points:
launch_pti(), launch_pti_onepage(), create_new_pti()
- All ~95 permanent functions have complete roxygen2 documentation
- Test coverage > 80% — Tier 1 (pure functions) + Tier 2 (module servers) automated in CI
- Package website deployed on GitHub Pages with grouped vignettes
- Hex ingestion pipeline provides developer-facing pre-deployment data prep from custom shapefiles + H3 API
R CMD check passes with 0 warnings, 0 errors, 0 notes
devPTIpackArchitecture RedesignObjective
Revise and refactor
devPTIpackfrom a dual-generation golem package (with ~2000+ lines of dead legacy code, minimal documentation, and ~14% test coverage) into a clean, well-documented, thoroughly tested modern R package with a clear public API and extensible data ingestion.Architecture Documents
All design documents live in
.github/docs/:arch-00-overview.mdarch-01-cleanup.mdarch-02-docs.mdarch-02.01-testing-calc-pipeline.mdarch-03-testing.mdarch-04-workspace.mdarch-05-hex-ingestion.mdSub-Issues (ordered by dependency)
dev/, add vignettes, deploy site)Relationship to Pre-Existing Issues
Phasing & Dependencies
End-State Goals
After all sub-issues are resolved:
launch_pti(),launch_pti_onepage(),create_new_pti()R CMD checkpasses with 0 warnings, 0 errors, 0 notes