Skip to content

Latest commit

 

History

History
140 lines (99 loc) · 3.07 KB

File metadata and controls

140 lines (99 loc) · 3.07 KB

Contributing Guide

Thank you for your interest in contributing to this project! This guide will help you get started with contributing effectively.

Getting Started

  1. Fork the repository and clone your fork:

    gh repo clone dreadnode/AIRTBench-Code
    cd AIRTBench-Code
  2. Set up your development environment with your preferred package manager:

    # Using pip
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    pip install -r requirements.txt
    
    # Using uv
    uv venv
    source .venv/bin/activate
    uv pip install -r requirements.txt
    
    # Using poetry
    poetry install
  3. Install and configure pre-commit hooks:

    pre-commit install
  4. Create a new branch for your contribution:

    git checkout -b your-feature-name

Development Process

Code Quality Checks

Before submitting your changes, ensure all quality checks pass:

# Run all checks at once
task check

# Or run individual checks:
task format  # Code formatting with Black
task lint    # Linting with Ruff
task types   # Type checking with mypy
task test    # Run tests with pytest

The pre-commit hooks will automatically run most checks when you commit changes.

Documentation

  • Add documentation for new features in the docs/ directory
  • Update existing documentation to reflect your changes

Commit Messages

Follow Conventional Commits for your commit messages:

# Format: <type>: <description>
feat: add new template feature
fix: resolve issue with pytest config
docs: improve setup instructions
ci: update GitHub Actions workflow

Common types: feat, fix, docs, style, refactor, test, ci, chore

Pull Request Process

  1. Update your branch with the latest changes:

    git fetch origin
    git rebase origin/main
  2. Push your changes:

    git push origin your-feature-name
  3. Create a pull request with:

    • Clear, descriptive title following conventional commits
    • Detailed description of changes
    • Links to related issues
    • Screenshots for UI changes (if applicable)
    • Documentation updates
    • Template updates (if required)
  4. Address any review feedback and update your PR

Code Standards

  • Follow the existing code style (enforced by Black and Ruff)
  • Maintain type hints and add new ones for your code
  • Write clear docstrings for new functions and classes
  • Add tests for new features or bug fixes
  • Keep changes focused and atomic
  • Update example code if needed

Project Structure

When adding new features, follow the project structure:

.
├── docs/              # Documentation
├── examples/          # Usage examples
├── tests/             # Test suite
└── pyproject.toml     # Project configuration

Getting Help

  • Check existing issues and pull requests

  • Open a new issue for:

    1. Bug reports
    2. Feature requests
    3. Questions about the template
    4. Contributing questions

We aim to respond to all issues promptly.