Code Style
All style rules are enforced by pre-commit hooks — no manual formatter runs are required. The rules below describe what the hooks enforce.
Python
- Linter and formatter:
ruff— configured in.pre-commit-config.yaml. It replaces bothflake8andblack. - Type hints: encouraged on all public functions and class methods. Not enforced in CI today, but PRs without type hints on new code will receive review feedback.
- Line length: 100 characters (ruff default override).
TypeScript
- Formatter:
prettiervia pre-commit — no per-project config needed. - Mode:
strictintsconfig.jsonfor all TS apps. - Avoid
any; useunknownand narrow types explicitly.
SQL (dbt)
- Use CTEs to break up logic — avoid nested subqueries.
- Lowercase all SQL keywords (
select,from,where,join). - snake_case for all identifiers (columns, aliases, model names).
- One CTE per logical transformation step; name CTEs descriptively.
with source as (
select * from {{ source('hmis', 'facility_reports') }}
),
renamed as (
select
facility_id,
report_month,
outpatient_visits
from source
)
select * from renamedLast updated on