Contributing to Ragatanga¶
Thank you for your interest in contributing to Ragatanga! This document provides guidelines and instructions for contributing to the project.
Code of Conduct¶
Please read and follow our Code of Conduct to ensure a positive and inclusive environment for everyone.
Getting Started¶
Setting Up Development Environment¶
- Fork the repository on GitHub
- Clone your fork locally:
- Set up a virtual environment:
- Install development dependencies:
Running Tests¶
We use pytest for testing:
# Run all tests
pytest
# Run specific tests
pytest tests/test_ontology.py
# Run with coverage
pytest --cov=ragatanga
Development Workflow¶
Branching Strategy¶
main: Stable release branchdevelop: Development branch for next release- Feature branches: Create from
developwith formatfeature/your-feature-name - Bugfix branches: Create from
developwith formatbugfix/issue-description
Pull Request Process¶
- Create a new branch from
develop - Make your changes
- Run tests and ensure they pass
- Update documentation if necessary
- Submit a pull request to the
developbranch - Wait for code review and address any feedback
Coding Standards¶
Code Style¶
We follow PEP 8 and use Black for code formatting:
Type Hints¶
We use type hints throughout the codebase:
def example_function(param1: str, param2: int) -> bool:
"""
Example function with type hints.
Args:
param1: Description of param1
param2: Description of param2
Returns:
Description of return value
"""
return True
Documentation¶
- Use docstrings for all public classes and methods
- Follow Google style docstrings
- Update documentation when adding or changing features
Adding Features¶
Adding a New Embedding Provider¶
- Create a new file in
ragatanga/core/embeddings/providers/ - Implement the
EmbeddingProviderinterface - Register the provider in
ragatanga/core/embeddings/manager.py - Add tests in
tests/core/embeddings/ - Update documentation
Adding a New LLM Provider¶
- Create a new file in
ragatanga/core/llm/providers/ - Implement the
LLMProviderinterface - Register the provider in
ragatanga/core/llm/manager.py - Add tests in
tests/core/llm/ - Update documentation
Release Process¶
- Update version in
pyproject.toml - Update
CHANGELOG.md - Create a pull request from
developtomain - After approval and merge, create a new release on GitHub
- CI/CD will automatically publish to PyPI
Getting Help¶
If you need help or have questions:
- Open an issue on GitHub
- Join our community discussions
- Reach out to the maintainers
Thank you for contributing to Ragatanga!