A newer version of the Gradio SDK is available:
6.1.0
Contributing to DeepBoner
Thank you for your interest in contributing to DeepBoner! This document provides guidelines and instructions for contributing to the project.
Table of Contents
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting Changes
- Code Style
- Documentation
Code of Conduct
Please read and follow our Code of Conduct to keep our community welcoming and respectful.
Getting Started
Prerequisites
- Python 3.11 or higher
- uv package manager
- Git
Development Setup
Fork the repository on GitHub
Clone your fork:
git clone https://github.com/YOUR_USERNAME/DeepBoner.git cd DeepBonerInstall dependencies:
make install # or manually: uv sync --all-extras && uv run pre-commit installCopy the environment template:
cp .env.example .env # Edit .env with your API keys if neededVerify your setup:
make check
Making Changes
Branch Naming Convention
feature/short-description- New featuresfix/short-description- Bug fixesdocs/short-description- Documentation changesrefactor/short-description- Code refactoringtest/short-description- Test additions/improvements
Commit Message Format
We follow conventional commit messages:
type(scope): short description
Optional longer description explaining the change.
Closes #123
Types:
feat- New featurefix- Bug fixdocs- Documentation onlystyle- Code style (formatting, no logic change)refactor- Code refactoringtest- Adding/updating testschore- Build process, tooling, dependencies
Examples:
feat(tools): add OpenAlex API integration
fix(pubmed): handle empty search results gracefully
docs(readme): update quick start instructions
Testing
Running Tests
# Run all tests
make test
# Run with coverage
make test-cov
# Run specific test file
uv run pytest tests/unit/utils/test_config.py -v
# Run specific test
uv run pytest tests/unit/utils/test_config.py::TestSettings::test_default_max_iterations -v
Test Markers
@pytest.mark.unit- Unit tests (mocked, fast)@pytest.mark.integration- Integration tests (real APIs)@pytest.mark.slow- Slow tests@pytest.mark.e2e- End-to-end tests
Writing Tests
- TDD preferred: Write tests first, then implementation
- Location: Place unit tests in
tests/unit/mirroringsrc/structure - Mocking: Use
respxfor httpx,pytest-mockfor general mocking - Fixtures: Add reusable fixtures to
tests/conftest.py
Example test structure:
"""Tests for search handler module."""
import pytest
from src.tools.search_handler import SearchHandler
class TestSearchHandler:
"""Tests for SearchHandler class."""
@pytest.mark.unit
def test_parallel_search_returns_results(self, mock_httpx_client):
"""Verify parallel search aggregates results correctly."""
handler = SearchHandler()
result = handler.search("test query")
assert len(result.evidence) > 0
Code Style
Pre-commit Hooks
Pre-commit hooks run automatically on commit:
- Ruff - Linting and formatting
- MyPy - Type checking
To run manually:
make lint # Check linting
make format # Auto-format code
make typecheck # Type checking
Style Guidelines
- Type hints required - All functions must have type annotations
- Docstrings - Use Google-style docstrings for public APIs
- Line length - Maximum 100 characters
- Imports - Sorted by isort (handled by ruff)
Code Quality Rules
We use Ruff with these rule sets:
E- pycodestyle errorsF- pyflakesB- flake8-bugbearI- isortN- pep8-namingUP- pyupgradePL- pylintRUF- ruff-specific
Submitting Changes
Pull Request Process
- Ensure tests pass:
make check - Update documentation if adding features
- Create PR against
mainbranch - Fill out the PR template with:
- Summary of changes
- Related issues
- Test plan
- Wait for review - Address any feedback
PR Checklist
- Tests added/updated and passing
-
make checkpasses locally - Documentation updated (if applicable)
- Commit messages follow convention
- No secrets or API keys committed
- Changes are focused (one concern per PR)
Documentation
Where to Document
- README.md - User-facing overview and quick start
- CLAUDE.md - Developer/AI agent reference
- docs/ - Detailed documentation
architecture/- System designdevelopment/- Developer guidesdeployment/- Deployment instructionsreference/- API/config reference
Documentation Standards
- Use clear, concise language
- Include code examples where helpful
- Keep diagrams updated (Mermaid format)
- Link to related documentation
Getting Help
- Issues: Open a GitHub issue for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
Recognition
Contributors will be recognized in release notes. Thank you for helping make DeepBoner better!
"Peer-reviewed contributions only. We take evidence-based code very seriously." π¬