Development Setup¶
How to set up your development environment for HAFO.
Prerequisites¶
- Python 3.13+
- uv - Python package manager
- Node.js - For Prettier formatting
- Git - Version control
Setup Steps¶
1. Clone the Repository¶
2. Install Python Dependencies¶
This installs all development dependencies including:
- pytest and coverage tools
- Ruff for linting/formatting
- Pyright for type checking
- MkDocs for documentation
3. Install Node Dependencies¶
This installs Prettier for JSON formatting.
4. Verify Setup¶
Run the test suite to verify everything is working:
Run linting:
IDE Setup¶
VS Code (Recommended)¶
Install these extensions:
- Python - Python language support
- Pylance - Python language server
- Ruff - Python linting
The repository includes VS Code settings in .vscode/ for consistent configuration.
PyCharm¶
- Set Python interpreter to the uv virtual environment
- Enable Ruff for formatting
- Configure Pyright for type checking
Development Workflow¶
- Create a feature branch:
git checkout -b feature/my-feature - Make changes
- Run tests:
uv run pytest - Run linting:
uv run ruff check && uv run pyright - Commit changes
- Push and create a pull request