- Зачем: - нужна единая спецификация для сообщений коммитов - облегчение code review и читаемости истории - Что: - создан COMMIT_RULES.md с правилами Conventional Commits - адаптированы scopes под репозиторий: sql, modeling, bookings, docs, data - обновлена секция в AGENTS.md с ссылкой на полные правила - Проверка: - git log --oneline -1 - cat COMMIT_RULES.md | head -20
2.2 KiB
2.2 KiB
Repository Guidelines
Project Structure & Module Organization
- Root
README.mddescribes the learning roadmap (RU). dwh-modeling/contains the article and demo DWH model; SQL lives indwh-modeling/sqlas ordered scripts01_...sql–06_...sql.postgres-bookings/is a Dockerized PostgreSQL + demo “bookings” DB; start it first, then apply DWH scripts against thedemodatabase.
Build, Test, and Development Commands
- Start demo Postgres:
cd postgres-bookings && bash download_db.sh && docker compose up -d - Open
psqlinside the container:
cd postgres-bookings && ./psql_sh - Apply DWH schema from the repo root (after Postgres is up):
psql -h 127.0.0.1 -p 5432 -U postgres -d demo -f dwh-modeling/sql/01_ddl_stg-dds.sql - Stop and reset the cluster when needed:
cd postgres-bookings && docker compose down -v
Coding Style & Naming Conventions
- SQL: PostgreSQL dialect, uppercase keywords,
snake_caseidentifiers, 4-space indentation, and concise comments (-- ...). - SQL files: keep numeric prefixes (
01_,02_, …) to reflect execution order and use descriptive suffixes likeddl_*/dml_*. - Shell: target
bash, prefer simple, POSIX-friendly constructs; mirror the style of existing scripts inpostgres-bookings/.
Testing Guidelines
- There is no dedicated test framework; treat SQL scripts as executable documentation.
- For
dwh-modeling/sql, run scripts sequentially and rerun04_validation.sqlafter changes to ensure the demo model still loads and basic checks pass. - For
postgres-bookings, after modifications rundocker compose up -d && ./psql_shand verify simple queries such asSELECT COUNT(*) FROM bookings.flights;.
Commit & Pull Request Guidelines
Required: Read COMMIT_RULES.md before making commits.
Pull requests should focus on one topic, include a brief context, list of changes, and manual steps to reproduce or validate (commands you ran, expected results).
Security & Configuration Tips
- Do not commit personal
.envfiles or credentials; use local overrides only. - Demo credentials and ports in
postgres-bookingsare for local training only—never reuse them in shared or production environments.