Contributing to INDB
Thank you for your interest in contributing to INDB (Interpretative Neural Database)!
Development Setup
Prerequisites
- Python 3.11+
- pip or poetry
- Git
Setup Steps
-
Clone the repository
-
Create virtual environment
-
Install dependencies
-
Install development tools
-
Set up pre-commit hooks
-
Copy environment template
-
Run tests
Code Style
We use automated formatters and linters:
- black: Code formatting (line length: 100)
- flake8: Linting
- mypy: Type checking
Format code before committing
Testing
Run all tests
Run specific test suite
Run with coverage
Pull Request Process
-
Create a feature branch
-
Make your changes
- Write clean, documented code
- Add tests for new features
-
Update documentation as needed
-
Run quality checks
-
Commit your changes
-
Push and create PR
Commit Message Convention
We follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting)refactor:Code refactoringtest:Test changeschore:Build/tooling changes
Examples:
feat: add pagination to events endpoint
fix: resolve race condition in test_large_dataset
docs: update API documentation for v2 endpoints
Project Structure
backend/
├── core/ # Core INDB engine
├── services/ # Business logic
├── protocols/ # Multi-protocol support
├── api/ # API routes
├── auth/ # Authentication
├── storage/ # Data persistence
├── tests/ # Test suites
└── docs/ # Documentation
Adding New Features
1. Core Features
- Add to
core/directory - Write unit tests in
tests/unit/ - Update
core/__init__.pyexports
2. API Endpoints
- Add to
main.pyorapi/routes/ - Use
/api/v2/prefix - Add Pydantic models for request/response
- Write integration tests
3. Protocol Support
- Add to
protocols/directory - Implement protocol interface
- Add protocol tests in
tests/protocols/
Documentation
- Update
README.mdfor user-facing changes - Update
docs/API.mdfor API changes - Add docstrings to all functions/classes
- Update
CHANGELOG.md
Questions?
- Open an issue for bugs
- Start a discussion for feature requests
- Check existing issues before creating new ones
License
By contributing, you agree that your contributions will be licensed under the project's license.
Thank you for contributing to INDB! 🚀