This is an automated email from the ASF dual-hosted git repository.
fengzhang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/main by this push:
new c5d1773a fix: update set_dev_version.py and fix minimum clearance line
unit test (#330)
c5d1773a is described below
commit c5d1773a2c61e70b3329c2b681f651c151505192
Author: Feng Zhang <[email protected]>
AuthorDate: Sat Nov 22 21:20:58 2025 -0700
fix: update set_dev_version.py and fix minimum clearance line unit test
(#330)
---
ci/scripts/set_dev_version.py | 9 +++++++++
python/sedonadb/tests/functions/test_functions.py | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ci/scripts/set_dev_version.py b/ci/scripts/set_dev_version.py
index e6b7874d..23cefe8b 100644
--- a/ci/scripts/set_dev_version.py
+++ b/ci/scripts/set_dev_version.py
@@ -79,12 +79,21 @@ def main():
_, last_dev_tag = find_last_dev_tag()
dev_distance = len(find_commits_since(last_dev_tag))
+ # Update workspace package version
file_regex_replace(
r'\nversion = "([0-9]+\.[0-9]+\.[0-9]+)"',
f'\nversion = "\\1-alpha{dev_distance}"',
src_path("Cargo.toml"),
)
+ # Update workspace dependencies versions to match the prerelease version
+ # Matches both 'sedona' and 'sedona-*' packages (including digits like
sedona-s2geography)
+ file_regex_replace(
+ r'(sedona(?:-[a-z0-9\-]+)?) = \{ version = "([0-9]+\.[0-9]+\.[0-9]+)",
path',
+ f'\\1 = {{ version = "\\2-alpha{dev_distance}", path',
+ src_path("Cargo.toml"),
+ )
+
with open(src_path("Cargo.toml"), "rb") as f:
print(tomllib.load(f)["workspace"]["package"]["version"])
diff --git a/python/sedonadb/tests/functions/test_functions.py
b/python/sedonadb/tests/functions/test_functions.py
index 296f9168..feca3c51 100644
--- a/python/sedonadb/tests/functions/test_functions.py
+++ b/python/sedonadb/tests/functions/test_functions.py
@@ -2278,8 +2278,8 @@ def test_st_minimum_clearance(eng, geom, expected):
"LINESTRING (0 0, 1 1)",
),
(
- "MULTIPOLYGON(((0.5 0.5,0 0,0 1,0.5 0.5)),((0.5 0.5,1 1,1 0,0.5
0.5)),((2.5 2.5,2 2,2 3,2.5 2.5)),((2.5 2.5,3 3,3 2,2.5 2.5)))",
- "LINESTRING (2.5 2.5, 3 2.5)",
+ "MULTIPOLYGON(((0.5 0.5,0 0,0 1,0.5 0.5)),((0.5 0.5,1 1,1 0,0.5
0.5)),((2.5 2.5,2 2,2 3,2.5 2.5)),((2.5 2.5,3.5 3.5,3.5 1.5,2.5 2.5)))",
+ "LINESTRING (2.5 2.5, 2 2.5)",
),
(
"POINT (1 1)",