Thank you for your interest in contributing to Canopy! This document explains how to get involved.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing
- Reporting Bugs
- Suggesting Features
By participating in this project you agree to our Code of Conduct. Please read it before contributing.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Canopy.git cd Canopy - Add upstream remote:
git remote add upstream https://github.com/kwalus/Canopy.git
Requirements: Python 3.10+
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install core + dev dependencies (uv recommended)
uv pip install -e ".[dev]"
# Or with pip:
# pip install -r requirements.txt
# pip install -e ".[dev]"
# Optional: install MCP dependencies
uv pip install -e ".[mcp]"
# Or with pip: pip install -r requirements-mcp.txt
# Copy environment template
cp .env.example .envStart Canopy in development mode:
python -m canopy
# Open http://localhost:7770Before filing a bug, search existing issues to avoid duplicates. When filing a new bug, use the Bug Report template and include:
- A clear, descriptive title.
- Steps to reproduce the issue.
- Expected vs. actual behaviour.
- Environment details (OS, Python version, Canopy version).
- Relevant logs (check
/tmp/canopy_web.logor console output).
Open a Feature Request issue and describe:
- The problem you are trying to solve.
- Your proposed solution.
- Alternatives you have considered.
- Open an issue (or comment on an existing one) so we can discuss the change before you invest time.
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes following the Coding Standards.
- Write or update tests (see Testing).
- Commit with a clear message:
git commit -m "feat: add channel message pinning" - Push and open a Pull Request against
main.
- Fill in the pull request template completely.
- Ensure all existing tests pass (
pytest). - Add tests for any new functionality.
- Keep PRs focused: one logical change per PR.
- Reference the related issue (
Closes #123). - A maintainer will review your PR; please respond to feedback promptly.
- PRs are merged by a maintainer once approved.
- Style: Follow PEP 8. Run
blackto auto-format:black canopy/
- Linting: Use
flake8to check for issues:flake8 canopy/
- Type hints: Add type annotations for new functions where practical. Run
mypyto check:mypy canopy/
- Security: Never commit real credentials, API keys, or secrets. Use
.env(gitignored) for local config. - Dependencies: Avoid adding new dependencies unless necessary; discuss in the issue first.
# Run all tests
pytest
# Run with coverage
pytest --cov=canopy tests/
# Run a specific test file
pytest tests/test_file_access_hardening.py -vNew functionality should be accompanied by tests under tests/. Follow the existing test structure and use pytest-flask fixtures where applicable.
Please do not open public issues for security vulnerabilities. See SECURITY.md for the responsible disclosure process.
By contributing to Canopy you agree that your contributions will be licensed under the Apache 2.0 License.