Submitting a Pull Request¶
Pull requests (PRs) are the primary way to contribute code changes to FedRAG. We welcome contributions for bug fixes, documentation improvements, new features, and enhancements to existing functionality.
Developing your Contribution¶
Follow these steps to create a well-structured pull request:
-
Create a descriptive branch
Tip
Choose a branch name that reflects your contribution (e.g.,
fix/memory-leak
,docs/improve-tutorials
,feature/add-transformer-support
). -
Make your changes following our Development Guidelines
-
Commit with clear messages
Tip
Write commit messages that explain both what and why. Include issue numbers when applicable (e.g., "Fix #42: Resolve memory leak in vector store").
-
Push to your fork
-
Open a pull request against the
main
branch and fill in the provided PR message template.
Documentation Contributions¶
When making documentation changes:
This launches a development server at http://127.0.0.1:8000/
, allowing you to preview changes in real-time as you edit. We encourage screenshots or animated GIFs for UI-related changes.
Code Review Process¶
Our review process ensures high-quality contributions:
- At least one maintainer will review your PR
- Address any feedback promptly and thoroughly
- Once approved, a maintainer will merge your PR
- Significant changes may require multiple reviewers
- Be responsive to comments and questions
Development Guidelines¶
Coding Style¶
We maintain high code quality standards through consistent style and automated tools:
- Follow PEP 8 conventions
- Use Black for consistent formatting
- Apply isort for organized imports
- Run Ruff for comprehensive linting
Our pre-commit hooks automatically enforce these standards when you commit changes. You can also invoke these hooks manually via the following commands:
Documentation¶
Clear documentation is essential:
- Document all public APIs using Google docstring format
- Update relevant documentation when modifying features
- Include practical examples to demonstrate functionality
- Ensure code comments explain "why" rather than "what"
Testing¶
Comprehensive testing ensures reliability:
- Write tests for all new features and bug fixes
- Aim to maintain or improve overall test coverage
- Use pytest for writing clear, effective tests
- Verify all tests pass before submitting:
We appreciate your contributions to making FedRAG better!