We welcome contributions! This document provides guidelines for contributing to the project.
- Clone the repository:
git clone https://github.com/cased/sandboxes.git
cd sandboxes- Install with development dependencies:
uv pip install -e ".[dev,all]"- Set up pre-commit hooks:
pre-commit install# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=sandboxes --cov-report=html
# Run specific test file
pytest tests/test_base.py
# Run integration tests (requires API keys)
pytest tests/ -m integrationWe use:
- ruff for linting
- black for formatting
- mypy for type checking
Run all checks:
ruff check .
black .
mypy sandboxes/- Create
sandboxes/providers/your_provider.py - Inherit from
SandboxProviderbase class - Implement required methods:
create_sandbox()execute_command()destroy_sandbox()list_sandboxes()
- Add tests in
tests/test_integration_your_provider.py - Update CLI in
sandboxes/cli.py - Add to documentation
Example provider structure:
from sandboxes.base import SandboxProvider, Sandbox, SandboxConfig, ExecutionResult
class YourProvider(SandboxProvider):
@property
def name(self) -> str:
return "your_provider"
async def create_sandbox(self, config: SandboxConfig) -> Sandbox:
# Implementation
pass
async def execute_command(self, sandbox_id: str, command: str, **kwargs) -> ExecutionResult:
# Implementation
pass
async def destroy_sandbox(self, sandbox_id: str) -> bool:
# Implementation
passFollow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test changesperf:Performance improvementsrefactor:Code refactoringchore:Maintenance tasks
- Fork the repository
- Create a feature branch:
git checkout -b feat/your-feature - Make your changes
- Run tests and linting
- Commit with descriptive message
- Push to your fork
- Open a pull request
Please use GitHub Issues to report bugs or request features. Include:
- Clear description
- Steps to reproduce (for bugs)
- Expected behavior
- Actual behavior
- Environment details (Python version, OS, etc.)
By contributing, you agree that your contributions will be licensed under the MIT License.