You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,36 @@ After setup, the commit message template will be automatically loaded when runni
101
101
102
102
Please use GitHub Issues to report bugs or request features.
103
103
104
+
## Version Management
105
+
106
+
NetPulse uses a **Single Source of Truth** approach for version management:
107
+
108
+
### How It Works
109
+
110
+
-**Version Definition**: Version numbers are defined in `pyproject.toml` (and `netpulse-client/pyproject.toml` for the client SDK)
111
+
-**Automatic Reading**: Code automatically reads version from installed package metadata using `importlib.metadata`
112
+
-**Development Fallback**: If package is not installed (development mode), a fallback version is used
113
+
114
+
### Updating Version Numbers
115
+
116
+
**For Production Releases** (package installed):
117
+
1. Update `version = "x.y.z"` in `pyproject.toml`
118
+
2. Update `version = "x.y.z"` in `netpulse-client/pyproject.toml` (if needed)
119
+
3. Reinstall the package: `pip install -e .`
120
+
4. Code will automatically use the new version
121
+
122
+
**For Development Consistency** (optional but recommended):
123
+
- Also update the fallback version in `netpulse/__init__.py` and `netpulse-client/netpulse_client/__init__.py` to match
124
+
125
+
### Version Files
126
+
127
+
-`pyproject.toml` - Main project version (primary source)
128
+
-`netpulse-client/pyproject.toml` - Client SDK version (primary source)
129
+
-`netpulse/__init__.py` - Auto-reads from package metadata (fallback for dev mode)
130
+
-`netpulse-client/netpulse_client/__init__.py` - Auto-reads from package metadata (fallback for dev mode)
131
+
132
+
**Note**: In most cases, you only need to update `pyproject.toml` files. The code will automatically use the correct version after package installation.
133
+
104
134
## Questions?
105
135
106
136
Feel free to open a discussion or contact the maintainers.
0 commit comments