Development Documentation
This directory contains development guidelines, best practices, and technical documentation for Controlvar.
Files
- Development Guidelines: the Python, lint and pull request rules
- Testing Guide: running the suites, and the rules a new test follows
- Runnable Documentation Examples: tagging and enrolling a page's shell examples
- Database
- Migrations Guide
- Using the Data Layer
- Backup Guide
- Dependency Injection: a route's session, caller and permission checks
- CI workflows: the required checks, and running them yourself
Common Tasks
- Database Management
- Creating Migrations
-
Development Process
- Pull requests
-
CI
-
Deterministic Backend Test Profile
- Start test dependencies with Docker Compose:
docker compose -f docker-compose.test.yml up -d postgres-test redis-test
- Run the standardized backend release checks:
./scripts/run-backend-tests.sh release
- For full local parity (starts/stops containers automatically):
EP_TEST_PROFILE=compose ./scripts/run-backend-tests.sh all
Best Practices
- Code Quality
- Follow the Development Guidelines
- Write comprehensive tests
- Document your code
-
Review before committing
-
Database
- Use migrations for schema changes
- Follow backup procedures
- Optimize queries
-
Handle transactions properly
-
Architecture
- Use dependency injection
- Follow SOLID principles
- Write modular code
- Consider scalability
Need Help?
- Review the Development Guidelines
- Check the Database Guides
- See the Workflow Documentation
- Contact the development team for assistance