🎉 First off, thanks for taking the time to contribute! 🎉
We welcome contributions from everyone, regardless of experience level. This guide will help you get started with contributing to RAG PDF Chatbot.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Coding Standards
- Commit Guidelines
- Pull Request Process
- Testing
- Documentation
- Issue Reporting
- Feature Requests
This project adheres to the Contributor Covenant. By participating, you are expected to uphold this code. Please report unacceptable behavior to [maintainers].
- Ensure the bug was not already reported by searching on GitHub under Issues
- If you're unable to find an open issue addressing the problem, open a new one
- Open a new issue with the "enhancement" label
- Provide a clear description of the proposed enhancement
- Explain why this enhancement would be useful
- Check the open issues for tasks
- Look for issues labeled "good first issue" if you're new
- Comment on the issue to let others know you're working on it
- Fix typos, grammar, or unclear explanations
- Add missing documentation
- Improve existing documentation
- Python 3.8+
- Git
- Ollama with required models
- Virtual environment (recommended)
# Clone the repository
git clone https://github.com/your-org/rag-pdf-chatbot.git
cd rag-pdf-chatbot
# Create and activate 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 dev-requirements.txt # Development dependencies
# Set up pre-commit hooks
pre-commit install# Basic test
python -m src.main --help
# Run with sample question
python -m src.main --question "What is RAG?"- Follow PEP 8 style guide
- Use Black for code formatting
- Use isort for import sorting
- Use flake8 for linting
- Use Python type hints for all functions and methods
- Follow PEP 484 type hinting guidelines
- Use
Optionalfor nullable types - Use
Anysparingly
- Follow Google-style docstrings
- Document all public classes, methods, and functions
- Include examples where helpful
- Keep documentation up-to-date
- Write unit tests for new functionality
- Aim for 80%+ code coverage
- Use descriptive test names
- Test edge cases and error conditions
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the coderefactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools
feat(document_processor): add support for DOCX files
- Added PyMuPDFLoader for DOCX document loading
- Updated chunking strategy for DOCX content
- Added unit tests for DOCX processing
Fixes #123
fix(vector_store): handle missing vector store gracefully
- Added null checks before vector store operations
- Improved error messages for missing vector store
- Added fallback to rebuild vector store
Closes #456
- Fork the repository and create your branch from
main - Install development dependencies and set up pre-commit hooks
- Make your changes following coding standards
- Write tests for your changes
- Update documentation if needed
- Run tests to ensure nothing is broken
- Commit your changes with clear commit messages
- Push to your fork and submit a pull request
- Wait for review and address any feedback
- Clear title and description
- Reference related issues (e.g., "Fixes #123")
- Pass all CI checks
- Include appropriate tests
- Update documentation if needed
- Follow coding standards
# Run all tests
pytest tests/
# Run specific test
pytest tests/test_document_processor.py
# Run with coverage
pytest --cov=src tests/
# Run with verbose output
pytest -v tests/tests/
├── __init__.py
├── test_config.py
├── test_document_processor.py
├── test_vector_store.py
├── test_rag_chain.py
└── test_main.py
- Use
pytestframework - Follow Arrange-Act-Assert pattern
- Test both happy paths and error cases
- Use mocking for external dependencies
- Keep tests focused and fast
- Use Markdown for all documentation
- Follow consistent formatting
- Include code examples where helpful
- Keep documentation up-to-date with code changes
- Use diagrams (Mermaid) for complex concepts
docs/
├── ARCHITECTURE.md # System architecture
├── CONTRIBUTING.md # Contribution guidelines
├── API.md # API reference
├── DEPLOYMENT.md # Deployment guide
└── EXAMPLES.md # Usage examples
### Description
Clear and concise description of the bug.
### Steps to Reproduce
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected Behavior
What you expected to happen.
### Actual Behavior
What actually happened.
### Screenshots
If applicable, add screenshots.
### Environment
- OS: [e.g., Windows 10, macOS 12.1, Ubuntu 20.04]
- Python version: [e.g., 3.8.10]
- RAG PDF Chatbot version: [e.g., 1.0.0]
### Additional Context
Add any other context about the problem.### Problem Statement
Is your feature request related to a problem? Please describe.
### Proposed Solution
Describe the solution you'd like.
### Alternatives
Describe alternatives you've considered.
### Additional Context
Add any other context or screenshots.- Join our Discord for discussions
- Follow us on Twitter for updates
- Star the repository to show your support
Thank you to all our contributors who have helped make this project better!
Happy Coding! 🚀