Contributing
Prerequisites
- Python 3.12 — the repo ships a
Pipfileat the root for pre-commit and shared tooling - Node.js (LTS) and pnpm — required for TypeScript apps and the docs site
- Git 2.x
Pre-commit hooks
All linting and formatting is enforced at commit time via .pre-commit-config.yaml. The hooks that run on every commit are:
| Hook | What it does |
|---|---|
ruff | Python linting and auto-fix |
prettier | TypeScript / JS / JSON / MDX formatting |
check-yaml | YAML syntax validation |
Branch naming
| Type | Pattern | Example |
|---|---|---|
| New feature | feature/* | feature/add-hmis-dbt-model |
| Bug fix | fix/* | fix/prefect-flow-timeout |
| Maintenance | chore/* | chore/update-pre-commit-hooks |
PR flow
- Open a PR from your branch to
main. - CI gates must pass (see below) before merging.
- Request review from a team member.
- Squash-merge to
mainwith a conventional commit message.
Setup
Clone the repo
git clone git@github.com:MOH-Rwanda/Healthcare.MOH.RWA.HIC.git
cd Healthcare.MOH.RWA.HICInstall pre-commit
pip install pre-commit
pre-commit installThis installs the hooks into your local .git/hooks directory. They will run automatically on every git commit.
Set up the app you are working on
Follow the setup guide for the relevant subsystem:
- dbt — see Analytics / dbt
- Prefect — see Analytics / Prefect
- GreenRiver — see Platform
- Docs site —
pnpm install && pnpm dev(port 4050)
CI/CD workflows
Seven GitHub Actions workflows cover the full delivery pipeline:
| Workflow | Trigger |
|---|---|
dbt-ci | Push / PR touching dbt/ |
prefect-deploy | Push to main touching prefect/ |
jupyter-validate | Push / PR touching notebooks/ |
greenriver-fe | Push / PR touching frontend app |
greenriver-be | Push / PR touching backend app |
pr-validation | Every PR — enforces branch naming and commit format |
security-scan | Nightly and on PR — Trivy + Bandit |
All CI gates must be green before a PR can be merged. The pr-validation workflow will fail if your branch name or commit messages do not follow the conventions in Git & Commit Conventions.
Last updated on