Skip to content

Pull Request Guidelines

This document outlines the process for submitting pull requests to the YAML Workflow Engine project.

Before Creating a Pull Request

  1. Check Existing Issues/PRs
  2. Search for existing issues or pull requests
  3. Create an issue for discussion if needed
  4. Link your PR to relevant issues

  5. Update Your Fork

    # Add the upstream remote if not already done
    git remote add upstream https://github.com/orieg/yaml-workflow.git
    
    # Fetch upstream changes
    git fetch upstream
    
    # Rebase your branch on upstream main
    git checkout your-feature-branch
    git rebase upstream/main
    

  6. Run Local Checks

    # Install development dependencies
    pip install -e ".[dev]"
    
    # Format code
    black src/ tests/
    isort --profile black src/ tests/
    
    # Run type checking
    mypy src/
    
    # Run tests
    pytest tests/
    
    # Check documentation
    mkdocs serve
    

Creating a Pull Request

Branch Naming

Follow these conventions: - feature/description for new features - fix/description for bug fixes - docs/description for documentation changes - refactor/description for code refactoring - test/description for test improvements

Example: feature/add-http-retry

Commit Messages

Use conventional commit format:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types: - feat: New feature - fix: Bug fix - docs: Documentation changes - style: Code style changes (formatting, etc.) - refactor: Code refactoring - test: Adding or updating tests - chore: Maintenance tasks

Example:

feat(tasks): add HTTP request retry mechanism

- Implement exponential backoff retry logic
- Add retry configuration options
- Include retry count in task output

Closes #123

Pull Request Template

## Description
Brief description of the changes

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Code follows style guide
- [ ] All tests passing
- [ ] Type hints added/updated
- [ ] Docstrings updated

## Related Issues
Fixes #123

## Additional Notes
Any additional information that reviewers should know

Review Process

Requesting Reviews

  1. Choose Reviewers
  2. Request review from maintainers
  3. Tag relevant stakeholders
  4. Consider domain expertise

  5. Draft PRs

  6. Use draft PRs for work in progress
  7. Mark as ready when complete

Addressing Feedback

  1. Review Comments
  2. Respond to all comments
  3. Explain your changes
  4. Link to relevant documentation

  5. Making Changes

    # Make requested changes
    git add .
    git commit -m "fix: address review feedback"
    
    # Update PR
    git push origin your-feature-branch
    

  6. Resolving Discussions

  7. Mark resolved when addressed
  8. Request re-review when ready

After Merge

  1. Clean Up

    # Switch to main
    git checkout main
    
    # Update main
    git pull upstream main
    
    # Delete local branch
    git branch -d your-feature-branch
    
    # Delete remote branch
    git push origin --delete your-feature-branch
    

  2. Follow Up

  3. Close related issues
  4. Update project documentation
  5. Monitor CI/CD pipeline

Tips for Success

  1. Keep PRs Focused
  2. One feature/fix per PR
  3. Split large changes into smaller PRs
  4. Link related PRs

  5. Quality Checks

  6. Run all tests locally
  7. Check code coverage
  8. Verify documentation

  9. Communication

  10. Be responsive to feedback
  11. Ask questions if unclear
  12. Update PR description as needed

  13. Documentation

  14. Update relevant docs
  15. Add inline comments
  16. Include examples

Common Issues

PR Too Large

Split into smaller, logical chunks: 1. Core functionality 2. Additional features 3. Documentation 4. Tests

Failed Checks

Common fixes:

# Code style
black src/ tests/
isort --profile black src/ tests/

# Type checking
mypy src/

# Fix test failures
pytest tests/ -v

Merge Conflicts

# Update main
git fetch upstream
git checkout main
git merge upstream/main

# Rebase your branch
git checkout your-feature-branch
git rebase main

# Force push if needed
git push origin your-feature-branch --force-with-lease