Contributing Guide
Thank you for considering contributing to Ollama PDF RAG! This document provides guidelines and instructions for contributing.
Code of Conduct
This project follows a Code of Conduct that all contributors are expected to adhere to. Please read CODE_OF_CONDUCT.md before contributing.
How to Contribute
Setting Up Development Environment
- Fork the repository
-
Clone your fork:
-
Create a virtual environment:
-
Install development dependencies:
-
Set up pre-commit hooks:
Development Workflow
-
Create a new branch:
-
Make your changes
-
Run tests:
-
Commit your changes:
-
Push to your fork:
-
Create a Pull Request
Commit Message Guidelines
We follow conventional commits. Format:
Types: - feat: New feature - fix: Bug fix - docs: Documentation - style: Formatting - refactor: Code restructuring - test: Adding tests - chore: Maintenance
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run specific test file
pytest tests/test_document.py
Documentation
- Update documentation for any new features
- Add docstrings to new functions/classes
- Update README.md if needed
Pull Request Process
- Update documentation
- Add tests for new features
- Ensure all tests pass
- Update CHANGELOG.md
- Request review from maintainers
Code Style
- Follow PEP 8
- Use type hints
- Add docstrings (Google style)
- Keep functions focused and small
Getting Help
- Open an issue for bugs
- Discuss major changes in issues first
- Join our community discussions
Release Process
- Update version in relevant files
- Update CHANGELOG.md
- Create a new release on GitHub
- Tag the release
License
By contributing, you agree that your contributions will be licensed under the MIT License.