Contributing to HyperHTTP¶
Thank you for your interest in contributing to HyperHTTP! This document provides guidelines and instructions for contributing to the project.
Development Setup¶
-
Fork and clone the repository:
-
Create a virtual environment and activate it:
-
Install development dependencies:
Code Style¶
We use the following tools to maintain code quality:
- Black: Code formatting
- isort: Import sorting
- mypy: Static type checking
- flake8: Code linting
Run all style checks:
Running Tests¶
We use pytest for testing:
# Run all tests
pytest
# Run with coverage
pytest --cov=hyperhttp
# Run specific test file
pytest tests/test_client.py
# Run specific test
pytest tests/test_client.py::test_get_request
Documentation¶
We use MkDocs with Material theme for documentation:
- Make changes to the docs in the
docs/directory - Preview changes locally:
- Build documentation:
Pull Request Process¶
-
Create a new branch for your feature:
-
Make your changes and commit them:
-
Ensure all tests pass:
-
Push to your fork:
-
Open a Pull Request with:
- Clear description of changes
- Any related issues
- Test coverage for new features
- Documentation updates if needed
Commit Messages¶
Follow these guidelines for commit messages:
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor" not "Moves cursor")
- Limit first line to 72 characters
- Reference issues and pull requests after first line
Example:
Add retry mechanism for failed requests
- Implement exponential backoff
- Add configurable retry attempts
- Handle rate limiting
Fixes #123
Code Review Process¶
- All submissions require review
- Changes must have tests
- Documentation must be updated
- Code must pass CI checks
Development Guidelines¶
Performance¶
- Profile code changes with benchmarks
- Consider memory usage
- Avoid unnecessary allocations
- Use buffer pooling where appropriate
Testing¶
- Write unit tests for new features
- Include integration tests for complex functionality
- Add performance tests for critical paths
- Test error conditions
Documentation¶
- Update API documentation
- Add examples for new features
- Include performance implications
- Document any breaking changes
Release Process¶
- Update version in
pyproject.toml - Update CHANGELOG.md
- Create release commit:
- Tag the release:
- Push to GitHub:
Getting Help¶
- Open an issue for bugs
- Discuss major changes in issues
- Join our community discussions
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.