Thank you for your interest in contributing to Code Analysis Bot! This document provides guidelines and information for contributors.
- Python 3.8 or higher
- OpenSearch 2.3.0 or higher
- Git
- API keys for at least one LLM service (OpenAI, Perplexity, or Ollama)
- Fork and clone the repository:
git clone https://github.com/yourusername/on_call_bot.git
cd on_call_bot- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt
pip install -r requirements-dev.txt # Development dependencies- Setup environment variables:
cp .env.example .env
# Edit .env with your API keys- Run tests:
pyteston_call_bot/
├── core/ # Core business logic
├── services/ # Service layer (embeddings, search, analysis)
├── factories/ # Factory pattern implementations
├── models/ # Data models and schemas
├── ui/ # Streamlit user interface
├── config/ # Configuration and settings
├── utils/ # Utility functions
├── docs/ # Documentation
├── demos/ # Demo data and examples
└── tests/ # Test files
- Follow PEP 8 Python style guide
- Use type hints for all function parameters and return values
- Write docstrings for all public functions and classes
- Use meaningful variable and function names
- Write unit tests for all new features
- Ensure all tests pass before submitting PR
- Aim for >80% code coverage
- Include integration tests for new services
- Create a feature branch:
git checkout -b feature/your-feature-name-
Make your changes:
- Follow coding standards
- Add tests for new functionality
- Update documentation if needed
-
Test your changes:
pytest
black --check .
flake8- Commit your changes:
git add .
git commit -m "feat: add your feature description"- Push and create pull request:
git push origin feature/your-feature-nameUse conventional commit messages:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
- Update README.md for major changes
- Add docstrings to new functions and classes
- Update API documentation in docs/API.md
- Include examples for new features
When reporting bugs, please include:
- Python version and OS
- Steps to reproduce the issue
- Expected vs actual behavior
- Error messages and stack traces
- Configuration details (anonymized)
For new features:
- Check existing issues first
- Describe the feature and use case
- Explain why it would be valuable
- Consider implementation complexity
To add a new LLM or embedding service:
- Create service class in
services/ - Add factory implementation in
factories/ - Update configuration in
config/settings.py - Add tests and documentation
- Update README with new service info
- Open an issue for bugs or feature requests
- Check existing documentation first
- Ask questions in issue discussions
Thank you for contributing! 🙏 +