Thank you for your interest in contributing to DeepCritical! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Setup
- Contributing Process
- Code Style
- Testing
- Documentation
- Issue Guidelines
- Pull Request Guidelines
- Release Process
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to conduct@deepcritical.dev.
- Python 3.10 or higher
- uv (recommended) or pip
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/DeepCritical.git cd DeepCritical
# Install uv if not already installed
# Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync --dev
# Run tests to verify setup
uv run pytest tests/# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install package in development mode
pip install -e .
# Install development dependencies
pip install -e ".[dev]"
# Run tests to verify setup
pytest tests/git checkout -b feature/your-feature-name
# or
git checkout -b bugfix/issue-number- Write your code following our Code Style guidelines
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass
# Run all tests
uv run pytest tests/ -v
# Run specific test categories
uv run pytest tests/unit/ -v
uv run pytest tests/integration/ -v
# Run linting
uv run ruff check .
# Run formatting check
uv run ruff format --check .git add .
git commit -m "feat: add new feature description"Use conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for test additions/changeschore:for maintenance tasks
git push origin feature/your-feature-nameThen create a pull request on GitHub.
We use Ruff for linting and formatting:
# Check code style
uv run ruff check .
# Format code
uv run ruff format .
# Auto-fix issues
uv run ruff check . --fix- Type Hints: Use type hints for all function parameters and return values
- Docstrings: Use Google-style docstrings for all public functions and classes
- Imports: Use absolute imports and organize them properly
- Naming: Use descriptive names for variables, functions, and classes
- Error Handling: Use appropriate exception handling with meaningful error messages
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
class ExampleModel(BaseModel):
"""Example model for demonstration.
Args:
name: The name of the example
value: The value associated with the example
"""
name: str = Field(..., description="The name of the example")
value: Optional[int] = Field(None, description="The value associated with the example")
def example_function(data: Dict[str, str]) -> List[str]:
"""Process example data and return results.
Args:
data: Dictionary containing input data
Returns:
List of processed strings
Raises:
ValueError: If data is invalid
"""
if not data:
raise ValueError("Data cannot be empty")
return [f"processed_{key}" for key in data.keys()]tests/
├── unit/ # Unit tests
├── integration/ # Integration tests
├── fixtures/ # Test fixtures
└── conftest.py # Pytest configuration
import pytest
from DeepResearch.example_module import example_function
def test_example_function():
"""Test example function with valid input."""
data = {"key1": "value1", "key2": "value2"}
result = example_function(data)
assert len(result) == 2
assert "processed_key1" in result
def test_example_function_empty_data():
"""Test example function with empty input."""
with pytest.raises(ValueError, match="Data cannot be empty"):
example_function({})# Run all tests
uv run pytest tests/ -v
# Run with coverage
uv run pytest tests/ --cov=DeepResearch --cov-report=html
# Run specific test file
uv run pytest tests/unit/test_example.py -v
# Run tests matching pattern
uv run pytest tests/ -k "test_example" -vREADME.md: Main project documentationdocs/: Detailed documentationCONTRIBUTING.md: This fileSECURITY.md: Security policy- Code docstrings: Inline documentation
- README Updates: Update README.md for user-facing changes
- API Documentation: Use docstrings for all public APIs
- Configuration Documentation: Document new configuration options
- Examples: Provide usage examples for new features
- Use clear, concise language
- Provide code examples
- Include configuration examples
- Update related documentation when making changes
- Search existing issues to avoid duplicates
- Check if the issue is already fixed in the latest version
- Gather relevant information (environment, steps to reproduce, etc.)
- Bug Report: Use the bug report template
- Feature Request: Use the feature request template
- Documentation: Use the documentation template
- Performance: Use the performance template
- Question: Use the question template
- Bioinformatics: Use the bioinformatics template for domain-specific issues
We use labels to categorize issues:
priority: critical/high/medium/lowtype: bug/enhancement/documentation/performance/questioncomponent: core/prime/bioinformatics/deepsearch/challenge/tools/agents/config/graph/docsstatus: needs-triage/in-progress/blocked/needs-review/ready-for-testing/resolved
- Ensure all tests pass
- Run linting and fix any issues
- Update documentation as needed
- Add tests for new functionality
- Update CHANGELOG.md if applicable
Use the provided pull request template and fill out all relevant sections.
- Automated Checks: All CI checks must pass
- Code Review: At least one maintainer must approve
- Testing: Changes must be tested
- Documentation: Documentation must be updated
- All CI checks pass
- At least one approval from maintainers
- No merge conflicts
- Up-to-date with main branch
We use Semantic Versioning:
MAJOR.MINOR.PATCH(e.g., 1.0.0)MAJOR: Breaking changesMINOR: New features (backward compatible)PATCH: Bug fixes (backward compatible)
- Patch Release: Bug fixes and minor improvements
- Minor Release: New features and enhancements
- Major Release: Breaking changes and major new features
- Update version in
pyproject.toml - Update
CHANGELOG.md - Create release branch
- Run full test suite
- Create GitHub release
- Publish to PyPI
- Update documentation
- Follow Pydantic Graph patterns
- Use proper state management
- Implement error handling and recovery
- Follow PRIME architecture principles
- Implement proper tool validation
- Use scientific grounding approaches
- Follow data fusion patterns
- Implement proper evidence validation
- Use integrative reasoning approaches
- Follow ToolSpec patterns
- Implement proper input/output validation
- Use registry integration
- Follow Pydantic AI patterns
- Implement proper dependency management
- Use typed contexts
- GitHub Issues: For bug reports and feature requests
- GitHub Discussions: For questions and general discussion
- Email: maintainers@deepcritical.dev
Contributors will be recognized in:
- Release notes
- CONTRIBUTORS.md file
- GitHub contributors page
Thank you for contributing to DeepCritical! 🚀