Skip to content

Commit 0ea1acc

Browse files
authored
docs(contrib): streamline contributor workflow and add issue-first approach (#5)
CHANGES - Add mandatory issue-first workflow to CONTRIBUTING.md (no issue, no PR) - Streamline development setup with concise sections and clear structure - Enhance quality tools section with complete file tree for templates and prompts - Create README-dockerhub.md for Docker Hub with full GitHub links - Apply ruff formatting to src/build_index.py for code consistency - Update README.md contributing link to use "follow" instead of "see" IMPACT - Contributors must create issues before PRs, ensuring structured development - Reduced contributor friction with clearer, more organized documentation - Docker Hub users get comprehensive guidance with proper GitHub references TECHNICAL NOTES - Issue-first approach enforces best practices and improves project management - Dockerhub README maintains feature parity while adapting for external hosting - Code formatting maintains consistency across Python files
1 parent c0214da commit 0ea1acc

File tree

4 files changed

+111
-40
lines changed

4 files changed

+111
-40
lines changed

CONTRIBUTING.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
> Updated on 2025-07-23 by @KemingHe
44
5-
Thank you for your interest in contributing! This document provides development setup instructions and guidelines.
5+
Thank you for your interest in contributing! This guide covers development workflow and setup.
66

7-
## 🛠️ Development Setup
7+
## 🔄 Contribution Workflow
8+
9+
**Issue-first approach**: No issue, no PR. No PR, no merge.
10+
11+
1. **Raise issue** - Bug report or feature request
12+
2. **Get assigned** - Wait for maintainer assignment
13+
3. **Create PR** - Link to assigned issue
14+
4. **Review & approval** - Address feedback
15+
5. **Merge** - Maintainer merges approved PR
816

9-
**Transport**: Stdio only (MCP standard for local tools).
17+
## 🛠️ Development Setup
1018

1119
### Local Development
1220

@@ -16,19 +24,19 @@ git clone <repo-url>
1624
cd python-dep-manager-companion-mcp-server
1725
uv sync
1826

19-
# Run server locally
27+
# Run server locally
2028
uv run --with fastmcp --with tantivy fastmcp run src/mcp_server.py
2129

2230
# Build Docker image
2331
docker build -t py-dep-man-companion .
2432
```
2533

26-
### Local Testing with MCP Client
34+
### Local Testing
2735

28-
For testing the server locally during development, add this configuration to your VSCode/Cursor `mcp.json`:
36+
Add to your VSCode/Cursor's `mcp.json` for testing:
2937

30-
>[!IMPORTANT]
31-
> Replace `/path/to/your/python-dependency-manager-companion-mcp-server` with the absolute path to your local repository.
38+
> [!IMPORTANT]
39+
> Replace `/path/to/your/repo` with your local repository path.
3240
3341
```json
3442
{
@@ -37,47 +45,38 @@ For testing the server locally during development, add this configuration to you
3745
"py-dep-man-companion-native": {
3846
"command": "uv",
3947
"args": [
40-
"run",
41-
"--directory",
42-
"/path/to/your/python-dependency-manager-companion-mcp-server",
43-
"--with",
44-
"fastmcp>=2.10.5",
45-
"--with",
46-
"tantivy>=0.24.0",
47-
"fastmcp",
48-
"run",
49-
"src/mcp_server.py"
48+
"run", "--directory", "/path/to/your/repo",
49+
"--with", "fastmcp>=2.10.5", "--with", "tantivy>=0.24.0",
50+
"fastmcp", "run", "src/mcp_server.py"
5051
]
5152
}
5253
}
5354
}
5455
}
5556
```
5657

57-
## 📝 Development Guidelines
58-
59-
- Follow existing code style and structure
60-
- Test your changes locally using the native configuration above
61-
- Update documentation when adding new features
62-
- Submit pull requests with clear descriptions of changes
58+
## 📝 Development Standards
6359

64-
### Git Workflow & Branching
60+
### Git Workflow
6561

66-
- **Branching pattern**: `type/feature-or-bug-scope/GitHubUsername`
62+
- **Branching**: `type/feature-or-bug-scope/GitHubUsername`
6763
- **Types**: `feat`, `fix`, `docs`, `test`, `refactor`, `chore`
64+
- **Commits**: Use `prompts/prompt-commit-msg-gen.md` for consistency
65+
66+
### Quality Tools
6867

69-
### Prompts for AI-Assisted Development
68+
Available templates and prompts for consistent contributions:
7069

7170
> [!TIP]
72-
> This project includes AI prompts and GitHub templates for consistent, high-quality contributions:
71+
> Use these tools for consistent, high-quality contributions that reduce review cycles.
7372
7473
```plaintext
7574
.github/
7675
├── ISSUE_TEMPLATE/
7776
│ ├── bug-report.md # Bug report template
7877
│ └── feature-request.md # Feature request template
7978
└── PULL_REQUEST_TEMPLATE/
80-
└── pull_request_template.md # PR template with checklist
79+
└── pull_request_template.md
8180
8281
prompts/
8382
├── prompt-commit-msg-gen.md # Generate uniform commit messages
@@ -86,12 +85,12 @@ prompts/
8685
└── prompt-readme-gen.md # Maintain documentation standards
8786
```
8887

89-
## 🔄 Automated Updates
88+
## 🤖 Automated Systems
9089

91-
This repository includes automated workflows that:
90+
The repository auto-updates weekly (Tuesday 6pm ET):
9291

93-
1. Update documentation weekly from official sources
94-
2. Rebuild search indexes automatically
95-
3. Publish multi-architecture Docker images
92+
1. Syncs official documentation
93+
2. Rebuilds search indexes
94+
3. Publishes Docker images
9695

97-
See [.github/workflows/README.md](.github/workflows/README.md) for workflow details.
96+
See [.github/workflows/README.md](.github/workflows/README.md) for technical details.

README-dockerhub.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Python Dependency Manager Companion MCP Server
2+
3+
> README updated on 2025-07-23 by [@KemingHe](https://github.com/KemingHe)
4+
5+
Official docs from `pip`, `poetry`, `uv`, and `conda` + automated weekly updates = zero maintenance overhead for developers using VSCode/Cursor with AI assistants. [[Demo]](https://www.loom.com/share/a80f6041dc374c07b95b2397ee4e8ca1?sid=1209cdce-7239-447e-8b20-49eae454cc9a)
6+
7+
## 🚀 Quick Start for Agentic IDEs
8+
9+
**1. Pull latest Docker image**:
10+
11+
```shell
12+
docker pull keminghe/py-dep-man-companion:latest
13+
```
14+
15+
**2. Add to your IDE's `mcp.json`**:
16+
17+
```json
18+
{
19+
"mcp": {
20+
"servers": {
21+
"python-deps": {
22+
"command": "docker",
23+
"args": ["run", "-i", "--rm", "keminghe/py-dep-man-companion:latest"]
24+
}
25+
}
26+
}
27+
}
28+
```
29+
30+
**3. Query official docs directly in your AI chat** - guaranteed fresh from weekly automated updates.
31+
32+
## 🔄 Auto-Update Architecture
33+
34+
```plaintext
35+
┌───────────────────────────┐
36+
│ ⏰ Every Tuesday 6pm ET │
37+
└─────────────┬─────────────┘
38+
39+
┌───────────────────────────┐
40+
│ 📚 Sync Official Docs │
41+
└─────────────┬─────────────┘
42+
43+
┌───────────────────────────┐
44+
│ 🔍 Rebuild Search Index │
45+
└─────────────┬─────────────┘
46+
47+
┌───────────────────────────┐
48+
│ 🐳 Publish Latest Image │
49+
└───────────────────────────┘
50+
```
51+
52+
**Zero maintenance**: Documentation automatically synced weekly from official sources. Docker `:latest` tag guarantees you always get current docs without manual updates.
53+
54+
## 🤝 Contributing
55+
56+
**Use as template**: [[Create from template]](https://github.com/new?template_name=python-dependency-manager-companion-mcp-server&template_owner=KemingHe) for your own MCP server projects.
57+
58+
**Contribute back**: Fork and follow [CONTRIBUTING.md](https://github.com/KemingHe/python-dependency-manager-companion-mcp-server/blob/main/CONTRIBUTING.md) for development setup.
59+
60+
## 🗺️ Roadmap
61+
62+
- [ ] Add support for `pipenv`, `pdm`, `pixi`
63+
- [ ] Add comprehensive tests with 100% coverage
64+
- [ ] Add indexing support for PDF and CSV files
65+
66+
## 📄 License
67+
68+
This project is licensed under the [MIT License](https://github.com/KemingHe/python-dependency-manager-companion-mcp-server/blob/main/LICENSE) - a permissive license that allows free use, modification, and distribution with attribution.
69+
70+
## 📞 Support
71+
72+
Open a [GitHub issue](https://github.com/KemingHe/python-dependency-manager-companion-mcp-server/issues) for bug reports and feature requests.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ docker pull keminghe/py-dep-man-companion:latest
3333

3434
**Use as template**: [[Create from template]](https://github.com/new?template_name=python-dependency-manager-companion-mcp-server&template_owner=KemingHe) for your own MCP server projects.
3535

36-
**Contribute back**: Fork and see [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup.
36+
**Contribute back**: Fork and follow [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup.
3737

3838
## 🔄 Auto-Update Architecture
3939

src/build_index.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def find_markdown_files(assets_dir: Path) -> list[tuple[Path, str, Dict[str, Any
110110
def read_file_content(file_path: Path) -> str:
111111
"""
112112
Read file content with multiple encoding fallbacks.
113-
113+
114114
Note: This function is called only with paths from find_markdown_files(),
115115
which uses glob() to find files within the controlled ASSETS_DIR structure.
116116
The paths are generated by filesystem iteration, not user input.
@@ -120,16 +120,16 @@ def read_file_content(file_path: Path) -> str:
120120
if not file_path.exists() or not file_path.is_file():
121121
logger.warning(f"File does not exist or is not a regular file: {file_path}")
122122
return ""
123-
123+
124124
# Simple safety check: ensure resolved path is still within assets
125125
if not file_path.resolve().is_relative_to(ASSETS_DIR.resolve()):
126126
logger.error(f"File path outside assets directory: {file_path}")
127127
return ""
128-
128+
129129
except (OSError, ValueError) as e:
130130
logger.warning(f"Path validation failed for {file_path}: {e}")
131131
return ""
132-
132+
133133
encodings = ["utf-8", "utf-8-sig", "latin1", "cp1252"]
134134

135135
for encoding in encodings:

0 commit comments

Comments
 (0)