Contributing to Veridex¶
Thank you for your interest in contributing to Veridex! This document provides guidelines for contributing to the project.
Development Setup¶
-
Fork and clone the repository
-
Create a virtual environment
-
Install in development mode
Code Style¶
- Follow PEP 8 style guide
- Use Black for code formatting:
black veridex/ tests/ - Use flake8 for linting:
flake8 veridex/ - Add type hints where possible
- Write docstrings for all public APIs
Testing¶
- Write tests for all new features
- Ensure all tests pass before submitting PR
- Aim for >80% code coverage
Adding a New Detector¶
- Create a new file in the appropriate module (
text/,image/, oraudio/) - Inherit from
BaseSignal - Implement required methods:
namepropertydtypepropertyrun(input_data)methodcheck_dependencies()method
Example:
from veridex.core.signal import BaseSignal, DetectionResult
class MyDetector(BaseSignal):
@property
def name(self) -> str:
return "my_detector"
@property
def dtype(self) -> str:
return "text" # or "image", "audio"
def check_dependencies(self) -> None:
# Check for required packages
pass
def run(self, input_data) -> DetectionResult:
# Implementation
return DetectionResult(
score=0.5,
confidence=0.8,
metadata={}
)
- Add tests in
tests/ - Update module
__init__.pyto export the new detector - Add documentation
Pull Request Process¶
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Add tests
- Run the test suite
- Format code:
black veridex/ tests/ - Commit with clear messages
- Push to your fork
- Create a Pull Request
PR Checklist¶
- Tests added/updated
- Documentation updated
- Code formatted with Black
- No linting errors
- CHANGELOG.md updated
- All tests passing
Bug Reports¶
When filing a bug report, include: - Python version - Veridex version - Operating system - Minimal code to reproduce - Expected vs actual behavior - Error messages/stack traces
Feature Requests¶
When requesting a feature: - Check existing issues first - Provide clear use case - Consider implementation complexity - Be open to discussion
Code of Conduct¶
- Be respectful and professional
- Welcome newcomers
- Focus on constructive feedback
- Assume good intentions
Questions?¶
- Open a GitHub issue
- Check existing documentation
- Review examples in
examples/
Thank you for contributing to Veridex! 🎉