Contributing to MCP Server Replicate

January 6, 2025 ยท View on GitHub

First off, thank you for considering contributing to MCP Server Replicate! It's people like you that make it a great tool for everyone.

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

How Can I Contribute?

Reporting Bugs

Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:

  • Use a clear and descriptive title
  • Describe the exact steps which 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 any error messages or logs

Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:

  • A clear and descriptive title
  • A detailed description of the proposed functionality
  • Any possible drawbacks or alternatives you've considered
  • If possible, a rough implementation plan

Pull Requests

  1. Fork the repo and create your branch from main
  2. If you've added code that should be tested, add tests
  3. If you've changed APIs, update the documentation
  4. Ensure the test suite passes
  5. Make sure your code follows the existing style
  6. Issue that pull request!

Development Process

  1. Set up your development environment:
# Clone your fork
git clone https://github.com/your-username/mcp-server-replicate.git
cd mcp-server-replicate

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or
.venv\Scripts\activate  # Windows

# Install development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install
  1. Make your changes:
  • Write your code
  • Add or update tests
  • Update documentation
  • Run the test suite
  1. Commit your changes:
# Stage your changes
git add .

# Commit using conventional commits
git commit -m "feat: add amazing feature"
# or
git commit -m "fix: resolve issue with something"
  1. Push and create a PR:
git push origin your-branch-name

Style Guide

Python Code Style

Commit Messages

Follow Conventional Commits:

  • feat: for new features
  • fix: for bug fixes
  • docs: for documentation changes
  • style: for formatting changes
  • refactor: for code refactoring
  • test: for adding tests
  • chore: for maintenance tasks

Testing

  • Write unit tests for new functionality
  • Ensure all tests pass before submitting PR
  • Maintain or improve code coverage
  • Test edge cases and error conditions

Documentation

  • Update README.md if needed
  • Add docstrings to new functions/classes
  • Update API documentation
  • Include examples for new features

Review Process

  1. Automated checks must pass:

    • Tests
    • Linting
    • Type checking
    • Code coverage
  2. Code review requirements:

    • At least one approval
    • No unresolved comments
    • All automated checks pass
  3. Merge requirements:

    • Up-to-date with main branch
    • No conflicts
    • All review requirements met

Getting Help

Recognition

Contributors will be recognized in:

  • The project's README
  • Release notes
  • GitHub's contributors page

Thank you for contributing to MCP Server Replicate! ๐ŸŽ‰