Contributing to dsRAG
We welcome contributions from the community! Whether it's fixing bugs, improving documentation, or proposing new features, your contributions make dsRAG better for everyone.
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
- Create a new branch for your changes:
Development Setup
-
Create a virtual environment:
-
Install development dependencies:
Making Changes
- Make your changes in your feature branch
- Write or update tests as needed
- Update documentation to reflect your changes
- Run the test suite to ensure everything works:
Code Style
We follow standard Python coding conventions: - Use PEP 8 style guide - Use meaningful variable and function names - Write docstrings for functions and classes - Keep functions focused and concise - Add comments for complex logic
Documentation
When adding or modifying features:
- Update docstrings for any modified functions/classes
- Update relevant documentation in the docs/
directory
- Add examples if appropriate
- Ensure documentation builds without errors:
Testing
For new features or bug fixes:
- Add appropriate unit tests in the tests/
directory
- Tests should subclass unittest.TestCase
- Follow the existing test file naming pattern: test_*.py
- Update existing tests if needed
- Ensure all tests pass locally
- Maintain or improve code coverage
Example test structure:
import unittest
from dsrag import YourModule
class TestYourFeature(unittest.TestCase):
def setUp(self):
# Set up any test fixtures
pass
def test_your_feature(self):
# Test your new functionality
result = YourModule.your_function()
self.assertEqual(result, expected_value)
def tearDown(self):
# Clean up after tests
pass
Submitting Changes
-
Commit your changes:
-
Push to your fork:
-
Open a Pull Request:
- Go to the dsRAG repository on GitHub
- Click "Pull Request"
- Select your feature branch
- Describe your changes and their purpose
- Reference any related issues
Pull Request Guidelines
Your PR should:
- Focus on a single feature or fix
- Include appropriate tests
- Update relevant documentation
- Follow the code style guidelines
- Include a clear description of the changes
- Reference any related issues
Getting Help
If you need help with your contribution:
- Join our Discord
- Ask questions in the PR
- Tag maintainers if you need specific guidance
Code of Conduct
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Follow project maintainers' guidance
Thank you for contributing to dsRAG!