Thank you for your interest in contributing to Canvas! This document provides guidelines and instructions for contributing to the project.
- Make sure you have Python 3.11 installed
- Install Docker and Docker Compose
- Install Make (for development workflow)
- Familiarize yourself with the project structure
- Read the README.md file
- Check the existing issues and pull requests
-
Fork the repository
-
Clone your fork:
git clone https://github.com/your-username/canvas.git cd canvas -
Set up the development environment:
# Create and activate virtual environment uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies uv pip install -e . # Create DB named `canvas` in postgres
-
For Docker development:
make up
export PYTHONPATH="$PYTHONPATH:$(pwd)" && gunicorn -w 4 -k uvicorn.workers.UvicornWorker core.main:create_app # or python -m core.mainThe services will be available at:
- API Documentation: http://localhost:8001/docs
- ReDoc Documentation: http://localhost:8001/redoc
- UI: http://localhost:3000
The project uses a Makefile for common development tasks:
make dev # Start development environment
make up # Start services
make down # Stop services
make build # Build services
make rebuild # Rebuild services from scratch
make logs # View logs
make clean # Clean up containers and volumes
make test # Run tests (core and flow_engine)
make stage # Start stage environment
make prod # Start production environmentblack .ruff check .mypy .make test- Follow PEP 8 guidelines
- Use type hints
- Write docstrings for all public functions and classes
- Keep functions focused and small
- Create a feature branch from
main - Make your changes
- Run tests and ensure they pass (
make test) - Update documentation if needed
- Submit a pull request with a clear description
Follow the conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for code style changesrefactor:for code refactoringtest:for test-related changeschore:for maintenance tasks
- Be responsive to feedback
- Address review comments promptly
- Keep the PR focused and manageable
By contributing, you agree that your contributions will be licensed under the project's license.
Feel free to open an issue if you have any questions about contributing!