3.5 KiB
3.5 KiB
Contributing to HoopScout
GitFlow Policy (Required)
main: production branchdevelop: integration branchfeature/*: implementation branches fromdeveloprelease/*: release hardening branches fromdevelophotfix/*: urgent production fixes frommain
Branch Naming Examples
Feature branches:
feature/player-search-performancefeature/provider-sportradar-adapterfeature/scouting-watchlist-notes
Release branches:
release/0.9.0-betarelease/1.0.0
Hotfix branches:
hotfix/fix-ingestion-run-crashhotfix/nginx-healthcheck-timeout
Practical Workflow
- Sync base branch:
git checkout develop
git pull
- Create feature branch:
git checkout -b feature/your-feature-name
- Implement and test in Docker.
- Open PR into
develop. - Require passing tests/checks and review before merge.
For release:
- Create
release/*fromdevelop. - Stabilize, run regression tests, update docs/versioning.
- Merge
release/*intomainand back intodevelop.
For production urgent fix:
- Create
hotfix/*frommain. - Patch, test, merge to
mainanddevelop.
Local Development Setup
cp .env.example .env
docker compose up --build
If needed:
docker compose exec web python manage.py migrate
docker compose exec web python manage.py createsuperuser
Testing Guidelines
Run full suite:
docker compose run --rm web sh -lc 'pip install -r requirements/dev.txt && pytest -q'
Run targeted modules while developing:
docker compose run --rm web sh -lc 'pip install -r requirements/dev.txt && pytest -q tests/test_players_views.py'
Migration Guidelines
When schema changes are made:
- Create migrations.
- Review migration SQL implications.
- Commit migration files with model changes.
Commands:
docker compose exec web python manage.py makemigrations
docker compose exec web python manage.py migrate
Ingestion Development Notes
- Keep provider-specific code inside
apps/providers/*. - Keep orchestration and logging in
apps/ingestion/*. - Preserve idempotency (
update_or_create, stable mappings). - Store raw payloads only in designated diagnostic fields.
Suggested Milestones (GitFlow-Aligned)
M1 Infrastructure Foundation- Container/runtime hardening
- settings/security baseline
- CI test pipeline
M2 Domain + Search Core- normalized schema
- HTMX search flow
- pagination/sorting/filter correctness
M3 Scouting Productivity- saved searches/watchlist UX
- auth-protected workflows
M4 Ingestion Reliability- provider adapters
- ingestion retries/rate-limit handling
- admin operations
M5 Integration Surface- read-only API stabilization
- docs and onboarding hardening
M6 Release Hardening- performance pass
- observability and failure drills
- release candidate QA
Recommended Feature Branch Development Order
feature/domain-stability-and-indexesfeature/search-query-optimizationfeature/scouting-ux-polishfeature/provider-adapter-expansionfeature/ingestion-observabilityfeature/api-readonly-improvementsfeature/security-and-rate-limit-tuning
This order prioritizes core data correctness first, then user value, then integration breadth.
Definition of Done
- Runs correctly in Docker
- Tests added/updated for behavior changes
- Migrations included when schema changes occur
- Docs updated (
README,CONTRIBUTING,.env.example) when workflows/config change - No secrets committed