Thank you for your interest in contributing to Cloud Diagram MCP! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting Changes
- Release Process
- Style Guidelines
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the repository maintainers.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/cloud-diagram-mcp.git cd cloud-diagram-mcp - Add upstream remote:
git remote add upstream https://github.com/aviveldan/cloud-diagram-mcp.git
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Python 3.10 or higher
- Node.js 18 or higher
- Graphviz (required for diagram generation)
Ubuntu/Debian:
sudo apt-get install graphvizmacOS:
brew install graphvizWindows:
winget install --id Graphviz.GraphvizAdd Graphviz bin directory to your PATH.
pip install -r requirements.txt
pip install -e ".[dev]" # Install with dev dependenciescd ui
npm install
cd ..cd ui
npm run build
cd ..- Check existing issues to see if someone is already working on it
- Create an issue if one doesn't exist to discuss your proposed changes
- Keep changes focused - one feature or fix per pull request
- Write tests for new functionality
- Use clear and descriptive commit messages
- Follow the format:
<type>: <description> - Types:
feat,fix,docs,style,refactor,test,chore - Examples:
feat: Add support for GCP Cloud Runfix: Correct color mapping for replaced resourcesdocs: Update installation instructions
Run the MCP server tests:
python test_mcp.pyBuild the UI and run Playwright tests:
cd ui
npm run build
python create-test-harness.py
python create-test-harness-architecture.py
npm test
cd ..The complete test suite (matches CI):
# Python tests
python test_mcp.py
# UI tests
cd ui
npm run build
python create-test-harness.py
python create-test-harness-architecture.py
npm test
cd ..See TESTING.md for detailed testing documentation.
- Update tests to cover your changes
- Run all tests locally and ensure they pass
- Update documentation if you've changed functionality
- Check code formatting:
black --check --line-length 100 cloud_diagram_mcp/ test_mcp.py
- Run type checking (optional but recommended):
mypy cloud_diagram_mcp/ --config-file pyproject.toml
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub from your fork to the main repository
-
Fill out the PR template with:
- Description of changes
- Type of change (bug fix, feature, etc.)
- Testing performed
- Screenshots (if UI changes)
-
Wait for CI to complete and fix any failures
-
Respond to review feedback promptly
- Keep PRs focused and reasonably sized
- Include tests for new functionality
- Update documentation as needed
- Ensure CI passes before requesting review
- Be responsive to feedback and questions
Releases are managed by maintainers. The process is:
- Update version in
cloud_diagram_mcp/__init__.pyandpyproject.toml - Update
CHANGELOG.mdwith release notes - Commit changes and push to main
- Create and push a version tag (e.g.,
v2.1.0) - GitHub Actions automatically:
- Builds the package
- Creates a GitHub release
- Publishes to PyPI
See CI_CD.md for detailed release documentation.
- Follow PEP 8
- Use Black for formatting (line length: 100)
- Use type hints where possible
- Write docstrings for public functions and classes
- Keep functions focused and reasonably sized
- Use TypeScript for type safety
- Follow React best practices
- Use functional components with hooks
- Keep components focused and reusable
- Use Markdown for documentation
- Keep language clear and concise
- Include code examples where helpful
- Update README.md for user-facing changes
- Write descriptive commit messages
- Keep commits atomic (one logical change per commit)
- Rebase on main before submitting PR
- Squash commits if requested during review
- General questions: Open a discussion
- Bug reports: Open an issue
- Feature requests: Open an issue
By contributing to Cloud Diagram MCP, you agree that your contributions will be licensed under the MIT License.
Your contributions help make Cloud Diagram MCP better for everyone. We appreciate your time and effort! 🎉