Skip to content

Development Setup

This guide will help you set up your development environment for contributing to Trapster.

Prerequisites

  • Python 3.11 or higher
  • Git
  • A code editor (VS Code, PyCharm, etc.)
  • Docker (optional, for container-based development)

Initial Setup

  1. Fork the repository on GitHub

  2. Clone your fork:

bash
git clone https://github.com/YOUR_USERNAME/trapster-community.git
cd trapster-community
  1. Create a virtual environment:
bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
bash
pip install -r requirements.txt

Development Workflow

  1. Create a new branch for your feature:
bash
git checkout -b feature/your-feature-name
  1. Commit your changes:
bash
git add .
git commit -m "feat: add new feature"
  1. Push to your fork:
bash
git push origin feature/your-feature-name
  1. Create a Pull Request on GitHub

Common Issues

  1. Port conflicts: If you're running multiple instances, use different ports in your config

  2. Permission errors: When running on ports < 1024, use:

bash
sudo setcap 'cap_net_bind_service=+ep' /path/to/venv/bin/python3
  1. Import errors: Ensure you're in your virtual environment:
bash
which python  # Should point to your venv

Getting Help