Skip to content

Commit 02dc7e0

Browse files
authored
Bump the server version to 0.4.1 (#132)
1 parent f08cdc9 commit 02dc7e0

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

.cursor/rules/130-version-management.mdc

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,47 @@ alwaysApply: false
55
---
66
# MCP Server Version Management Rule
77

8-
## When updating the version of the MCP server, update the following files:
8+
## When updating the version of the MCP server, update the following files
99

1010
1. **`pyproject.toml`** - Update the `version` field in the `[project]` section:
11+
1112
```toml
1213
[project]
1314
name = "blockscout-mcp-server"
1415
version = "X.Y.Z" # <-- Update this line
1516
```
1617

1718
2. **`blockscout_mcp_server/__init__.py`** - Update the `__version__` variable:
19+
1820
```python
1921
"""Blockscout MCP Server package."""
2022

2123
__version__ = "X.Y.Z" # <-- Update this line
2224
```
2325

24-
## Important Notes:
26+
## Important Notes
2527

2628
- **Use the exact same version string** in both locations (e.g., "1.2.3")
2729
- **Follow semantic versioning** (MAJOR.MINOR.PATCH) when choosing version numbers
2830
- **Update both files simultaneously** to maintain consistency across the codebase
31+
32+
## Why Dual-Location Approach?
33+
34+
While modern Python packaging suggests using `importlib.metadata.version(__name__)` to make `pyproject.toml` the single source of truth, **we deliberately use the dual-location approach** for the following reasons:
35+
36+
### **Reliability Across Environments**
37+
38+
- **Local Development**: Works when running directly from source without installation
39+
- **Docker Containers**: Functions regardless of installation method
40+
- **Testing**: Reliable in various test environments and CI/CD pipelines
41+
- **Multiple Installation Methods**: Compatible with pip, uv, and other package managers
42+
43+
### **Deployment Scenarios**
44+
45+
For an MCP server that needs to work in various environments (local development, Docker, different installation methods), the dual-location approach ensures version information is always accessible without runtime dependencies or potential import failures.
46+
47+
### **Trade-offs**
48+
49+
- **Slight Maintenance Overhead**: Requires updating two files instead of one
50+
- **Drift Risk**: Mitigated by this rule ensuring both locations are updated simultaneously
51+
- **Consistency**: The version management rule ensures both locations stay in sync

blockscout_mcp_server/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Blockscout MCP Server package."""
22

3-
__version__ = "0.3.1"
3+
__version__ = "0.4.1"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "blockscout-mcp-server"
3-
version = "0.3.1"
3+
version = "0.4.1"
44
description = "MCP server for Blockscout"
55
requires-python = ">=3.11"
66
dependencies = [

0 commit comments

Comments
 (0)