File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed
Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ tag = False
44current_version = 1.0.129
55message = Bump version: {current_version} → {new_version} [skip ci]
66
7- [bumpversion:file:setup.py ]
8- search = version = " {current_version}"
9- replace = version = " {new_version}"
7+ [bumpversion:file:pyproject.toml ]
8+ search = version = " {current_version}"
9+ replace = version = " {new_version}"
Original file line number Diff line number Diff line change 11[project ]
22name = " graph_weather"
33requires-python = " >=3.11"
4- version = " 1.0.89 "
4+ version = " 1.0.129 "
55description = " Graph-based AI Weather models"
66authors = [
77 {name = " Jacob Prince-Bieker" , email = " jacob@bieker.tech" },
Original file line number Diff line number Diff line change 11"""Setup"""
22
3+ import re
34from pathlib import Path
45
56from setuptools import find_packages , setup
67
78this_directory = Path (__file__ ).parent
89long_description = (this_directory / "README.md" ).read_text ()
910
11+
12+ # Read version from pyproject.toml (single source of truth)
13+ def get_version ():
14+ pyproject_path = this_directory / "pyproject.toml"
15+ content = pyproject_path .read_text ()
16+ match = re .search (r'^version\s*=\s*"([^"]+)"' , content , re .MULTILINE )
17+ if match :
18+ return match .group (1 )
19+ raise RuntimeError ("Unable to find version string in pyproject.toml" )
20+
21+
1022setup (
1123 name = "graph_weather" ,
12- version = "1.0.129" ,
24+ version = get_version () ,
1325 packages = find_packages (),
1426 url = "https://github.com/openclimatefix/graph_weather" ,
1527 license = "MIT License" ,
You can’t perform that action at this time.
0 commit comments