Thank you for your interest in contributing to Action Dispatch! This document provides guidelines and information for contributors.
By participating in this project, you are expected to uphold our Code of Conduct:
- Use welcoming and inclusive language
- Be respectful of differing viewpoints and experiences
- Gracefully accept constructive criticism
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include Python version, library version, and operating system
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the enhancement
- Describe the current behavior and explain which behavior you expected to see instead
- Explain why this enhancement would be useful
- Fork the repository and create your branch from
main - Make your changes with clear, logical commits
- Add tests for your changes
- Ensure all tests pass
- Update documentation if needed
- Follow the coding standards
- Submit a pull request
- Python 3.8 or higher
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/action-dispatch.git
cd action-dispatch
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install-
Create a new branch for your feature or fix:
git checkout -b feature/your-feature-name
-
Make your changes following the coding standards
-
Run tests to ensure everything works:
python -m unittest discover tests -v
-
Run code quality checks:
black action_dispatch tests flake8 action_dispatch tests mypy action_dispatch
-
Commit your changes:
git add . git commit -m "Add your descriptive commit message"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request from your fork to the main repository
- Follow PEP 8 style guide
- Use Black for code formatting
- Use type hints where appropriate
- Write docstrings for all public functions and classes
We use several tools to maintain code quality:
- Black: Code formatting
- Flake8: Linting
- MyPy: Type checking
- Coverage: Test coverage reporting
- unittest: Testing framework
- pre-commit: Git hooks
- Write tests for all new functionality
- Maintain or improve test coverage
- Use descriptive test names
- Include both positive and negative test cases
- Test edge cases and error conditions
def test_feature_description(self):
"""Test that the feature works as expected."""
# Arrange
setup_test_data()
# Act
result = perform_action()
# Assert
self.assertEqual(result, expected_value)- Update docstrings for any changed functions or classes
- Update README.md if adding new features
- Update CHANGELOG.md following Keep a Changelog format
- Include code examples for new features
Use clear and meaningful commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Examples:
Add support for custom fallback handlers
- Implement fallback mechanism for partial dimension matches
- Add tests for fallback behavior
- Update documentation with examples
Fixes #123
Releases are handled by maintainers:
- Update version in
action_dispatch/__init__.py - Update CHANGELOG.md with release notes
- Create a git tag for the version
- Build and upload to PyPI
- Create GitHub release with release notes
If you have questions about contributing, please:
- Check the existing issues and discussions
- Create a new discussion on GitHub
- Reach out to the maintainers
Thank you for contributing to Action Dispatch!