Contributing to py-phone-caller & OpenAlert¶
Thank you for your interest in contributing to py-phone-caller and OpenAlert (openalertd)!
1. Development Prerequisites¶
- Linux (
x86_64oraarch64) - Python
3.14managed viauv - Rust stable toolchain (
1.85+) withclippyandrustfmt(forsrc/openalertandrust_engine) mise&task(installs pinned AppSec and build tools declared inmise.toml)- System headers on Debian/Ubuntu when compiling
openalertd:pkg-config,libdbus-1-dev,libudev-dev,libssl-dev
2. Quick Bootstrap¶
# 1. Install pinned developer & AppSec CLI tools
mise install
# 2. Create/sync the frozen Python 3.14 workspace virtualenv
uv sync --frozen --all-packages
# 3. Install the fast pre-commit security hook (Gitleaks + Ruff S-rules)
task sec:hooks:install
# 4. Verify your toolchain
task sec:doctor
3. Running Tests & Verification Gates¶
Before opening a pull request, rebuild the documentation site and run the full coherence, non-regression, and AppSec gates in order:
# 1. Regenerate docs/assets/openapi/*.json in place via deploy/pages/export_openapi.py
# and build the hybrid GitHub Pages site (_site/) so test_docs_coherence.py also
# validates the rendered /manual/ HTML, nav tabs, and View-source links
task docs:build
# 2. Run Python + packaging + documentation coherence + Rust + Clippy + fast security checks
task verify:all
# 3. Run the full AppSec gate (Bandit, Semgrep, Clippy, pip-audit, cargo-deny/audit, OSV, Trivy IaC)
task sec:ci
# 4. Run the offline Ansible contract & role unit test suite
python3 -m unittest discover -s deploy/ansible/tests -v
(Preview the built site locally anytime on http://127.0.0.1:8008 with task docs:serve, or verify version parity only with task version:check.)
Key developer references:
- Python Workspace & Maturin Rust SMS Engine:
docs/uv-migration-and-workspace-guide.md - AppSec, SBOM & Supply-Chain Workflows:
docs/appsec-and-supply-chain-guide.md - Architecture & Call Flows:
docs/architecture-and-call-flows.md - Deployment Pillars (
deploy/*):deploy/docs/README.md
4. Coding & Security Guidelines¶
- Never commit secrets or personal data: Use
settings.tomlfor safe defaults,.secrets.toml/ Vault / env vars for credentials, and RFC 5737 / E.164 test placeholders (192.0.2.x,+15550100100) in examples and tests. - Keep lockfiles deterministic: Any dependency change must update
uv.lockorCargo.lockcleanly (uv lock --checkandcargo test --lockedmust pass). For air-gap compatibility, build constraints inpyproject.tomlmust use exact==pins. - Zero warnings in Rust:
cargo clippy --manifest-path src/openalert/Cargo.toml --all-targets --locked -- -D warningsmust pass cleanly. - Documentation & Version Coherence: Keep docs, OpenAPI specs (
docs/assets/openapi/*.json), and manifests synchronized (task docs:buildregenerates the OpenAPI specs in place from service routes andpyproject.toml;task version:checkandtests/test_docs_coherence.pyenforce version parity, OpenAPI zero drift, and zero broken relative links).
5. Licensing¶
- Contributions to
py-phone-caller(Python microservices,rust_engine, Web UI, and deployment automation) are licensed under the BSD 3-Clause License. - Contributions to
OpenAlert(src/openalert/) are dual-licensed under MIT OR Apache-2.0.