File size: 1,814 Bytes
891fe52 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # Contributing to Polyhedra
## Development Setup
### Prerequisites
- Python 3.11 or higher
- pip or uv package manager
### Initial Setup
```bash
# Clone the repository
cd poly
# Create virtual environment (recommended)
python -m venv venv
.\venv\Scripts\Activate.ps1 # Windows PowerShell
# source venv/bin/activate # Linux/Mac
# Install in development mode with dev dependencies
pip install -e ".[dev]"
```
### Development Workflow
```bash
# Run tests
pytest
# Run tests with coverage
pytest --cov=polyhedra --cov-report=html
# Format code
black src tests
# Lint code
ruff check src tests
# Type check
mypy src
# Run all checks before committing
black src tests ; ruff check src tests ; mypy src ; pytest
```
## Project Structure
```
poly/
src/polyhedra/ # Main package
services/ # Service implementations
schemas/ # Pydantic models
server.py # MCP server entry point
__init__.py
tests/ # Test suite
test_services/ # Service tests
test_schemas/ # Schema tests
conftest.py # Pytest fixtures
docs/ # Documentation
pyproject.toml # Project configuration
README.md
```
## Testing Guidelines
- Write tests for all new features
- Maintain >80% code coverage
- Use pytest fixtures from conftest.py
- Mark integration tests with @pytest.mark.integration
## Code Style
- Follow PEP 8
- Use type hints for all functions
- Line length: 100 characters
- Use Black for formatting
- Use Ruff for linting
## Story Development Process
1. Check story status in docs/stories/
2. Implement features according to acceptance criteria
3. Write unit and integration tests
4. Update story checklist as you complete tasks
5. Run full test suite before marking story complete
|