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
feat: implement semantic versioning with setuptools-scm
- Configure setuptools-scm in pyproject.toml for dynamic versioning
- Add /api/version endpoint in Flask backend
- Create useVersion hook and display version in frontend sidebar
- Update README files with tagging workflow documentation
- Remove hardcoded version in favor of Git tag-based versioning
Resolves#175
Co-authored-by: yangm2 <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,40 @@ Live at https://tenantfirstaid.com/
89
89
```
90
90
`--keep-going` will continue to run checks, even if previous `make` rule fail. Omit if you want to stop after the first `make` rule fails.
91
91
92
+
## Versioning and Releases
93
+
94
+
This project uses [semantic versioning](https://semver.org/) with automated version management via `setuptools-scm`. The version is automatically derived from Git tags.
95
+
96
+
### Creating a Release
97
+
98
+
1. **Determine the version bump type:**
99
+
- **Patch release** (0.2.0 → 0.2.1): Bug fixes, minor improvements
100
+
- **Minor release** (0.2.0 → 0.3.0): New features, backward-compatible changes
Flask backend API for the Tenant First Aid chatbot.
4
+
5
+
## Development Setup
6
+
7
+
See the main [README.md](../README.md) for full setup instructions.
8
+
9
+
## API Endpoints
10
+
11
+
-`/api/init` - Initialize chat session
12
+
-`/api/query` - Send chat message
13
+
-`/api/history` - Get chat history
14
+
-`/api/clear-session` - Clear current session
15
+
-`/api/citation` - Get citation information
16
+
-`/api/version` - Get application version
17
+
18
+
## Version Management
19
+
20
+
This backend uses `setuptools-scm` for automatic version management based on Git tags. The version is dynamically generated from the repository's tag history.
21
+
22
+
### Checking Version
23
+
24
+
```bash
25
+
# In the backend directory
26
+
uv run python -c "from importlib.metadata import version; print(version('tenant-first-aid'))"
27
+
28
+
# Or via the API
29
+
curl http://localhost:5001/api/version
30
+
```
31
+
32
+
### Creating a New Release
33
+
34
+
1. Ensure all changes are committed and pushed
35
+
2. Create a new tag following semantic versioning:
36
+
```bash
37
+
git tag v0.3.0 # or appropriate version
38
+
git push origin v0.3.0
39
+
```
40
+
3. The version will automatically be updated in the application
React frontend application for the Tenant First Aid chatbot.
4
+
5
+
## Development Setup
6
+
7
+
See the main [README.md](../README.md) for full setup instructions.
8
+
9
+
## Version Display
10
+
11
+
The application version is automatically fetched from the backend API and displayed in the navigation sidebar. The version corresponds to the backend version derived from Git tags.
12
+
13
+
### Version Hook
14
+
15
+
The frontend includes a custom `useVersion` hook that fetches version information from `/api/version`:
0 commit comments