Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 1.65 KB

File metadata and controls

83 lines (62 loc) · 1.65 KB

Contributing to VPSBench

Thank you for your interest in contributing to VPSBench!

Getting Started

  1. Fork the repository
  2. Clone your fork
  3. Create a feature branch
  4. Make your changes
  5. Submit a pull request

Development Setup

git clone https://github.com/yourusername/vpsbench.git
cd vpsbench
pip install -e ".[dev]"

Running Tests

pytest
pytest -v
pytest --cov=vpsbench

Code Style

  • Follow PEP 8
  • Use type hints
  • Keep functions focused and small
  • Write docstrings for public APIs
  • Use meaningful variable names

Adding a New Benchmark

  1. Create a new file in src/vpsbench/benchmarks/
  2. Inherit from BaseBenchmark
  3. Implement run() and is_available() methods
  4. Add the benchmark to benchmarks/__init__.py
  5. Register it in cli.py
  6. Add scoring logic
  7. Write tests

Example:

from vpsbench.benchmarks.base import BaseBenchmark, BenchmarkResult

class MyBenchmark(BaseBenchmark):
    name = "mybench"
    category = "mybench"

    def run(self) -> BenchmarkResult:
        # Your benchmark logic
        return BenchmarkResult(
            name="My Benchmark",
            category="mybench",
            metrics={"key": "value"},
            score=85,
        )

Reporting Issues

  • Use the GitHub issue tracker
  • Include your OS and Python version
  • Include command output
  • Describe expected vs actual behavior

Pull Requests

  • Write clear commit messages
  • Include tests for new features
  • Update documentation if needed
  • Ensure all tests pass
  • Keep PRs focused on a single change

License

By contributing, you agree that your contributions will be licensed under the MIT License.