From 6c3524298fa0e637ec59e5cf5d616ed0e918ff41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Fri, 22 Aug 2025 09:52:24 +0200 Subject: [PATCH 1/3] bumped version for release --- RELEASE.md | 6 +++--- VERSION | 2 +- update_version.py | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 0b1ec1c..951632a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,7 +1,7 @@ # Release notes -### head +### 2025.8.22 Features: @@ -16,7 +16,7 @@ Bugfixes: - Now using glibc 2.17 in conda builds (was using the host) - Fixed shifted pixels in clusters close to the edge of a frame -### 2025.07.18 +### 2025.7.18 Features: @@ -30,7 +30,7 @@ Bugfixes: - Removed unused file: ClusterFile.cpp -### 2025.05.22 +### 2025.5.22 Features: diff --git a/VERSION b/VERSION index fe2f750..3469ebe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2025.7.18 \ No newline at end of file +2025.8.22 \ No newline at end of file diff --git a/update_version.py b/update_version.py index 476895a..783eb9f 100644 --- a/update_version.py +++ b/update_version.py @@ -7,6 +7,7 @@ Script to update VERSION file with semantic versioning if provided as an argumen import sys import os import re +from datetime import datetime from packaging.version import Version, InvalidVersion @@ -26,9 +27,9 @@ def get_version(): # Check at least one argument is passed if len(sys.argv) < 2: - return "0.0.0" - - version = sys.argv[1] + version = datetime.today().strftime('%Y.%-m.%-d') + else: + version = sys.argv[1] try: v = Version(version) # normalize check if version follows PEP 440 specification @@ -54,4 +55,4 @@ def write_version_to_file(version): if __name__ == "__main__": version = get_version() - write_version_to_file(version) \ No newline at end of file + write_version_to_file(version) From 437f7cec89c4b4075fbb6a7571d577e91c109dce Mon Sep 17 00:00:00 2001 From: Alice Date: Fri, 22 Aug 2025 10:08:38 +0200 Subject: [PATCH 2/3] induce the cluster size of ClusterCollector from ClusterFinderMT - handle backwards compatibility --- python/aare/ClusterFinder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/aare/ClusterFinder.py b/python/aare/ClusterFinder.py index 251d938..56e504d 100644 --- a/python/aare/ClusterFinder.py +++ b/python/aare/ClusterFinder.py @@ -46,14 +46,16 @@ def ClusterFinderMT(image_size, cluster_size = (3,3), dtype=np.int32, n_sigma=5, return cls(image_size, n_sigma=n_sigma, capacity=capacity, n_threads=n_threads) - def ClusterCollector(clusterfindermt, cluster_size = (3,3), dtype=np.int32): """ Factory function to create a ClusterCollector object. Provides a cleaner syntax for the templated ClusterCollector in C++. """ - cls = _get_class("ClusterCollector", cluster_size, dtype) + if cluster_size != clusterfindermt.cluster_size: + raise Warning(f"Cluster size mismatch: ClusterCollector size {cluster_size} does not match ClusterFinderMT size {clusterfindermt.cluster_size}, using {clusterfindermt.cluster_size} instead.") + + cls = _get_class("ClusterCollector", clusterfindermt.cluster_size, dtype) return cls(clusterfindermt) def ClusterFileSink(clusterfindermt, cluster_file, dtype=np.int32): From d908ad36367db1580dae390022b9e6a3a6afab8f Mon Sep 17 00:00:00 2001 From: Alice Date: Fri, 22 Aug 2025 15:25:15 +0200 Subject: [PATCH 3/3] removed option to give clustersize --- python/aare/ClusterFinder.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/aare/ClusterFinder.py b/python/aare/ClusterFinder.py index 56e504d..cf5f4dd 100644 --- a/python/aare/ClusterFinder.py +++ b/python/aare/ClusterFinder.py @@ -46,14 +46,11 @@ def ClusterFinderMT(image_size, cluster_size = (3,3), dtype=np.int32, n_sigma=5, return cls(image_size, n_sigma=n_sigma, capacity=capacity, n_threads=n_threads) -def ClusterCollector(clusterfindermt, cluster_size = (3,3), dtype=np.int32): +def ClusterCollector(clusterfindermt, dtype=np.int32): """ Factory function to create a ClusterCollector object. Provides a cleaner syntax for the templated ClusterCollector in C++. """ - - if cluster_size != clusterfindermt.cluster_size: - raise Warning(f"Cluster size mismatch: ClusterCollector size {cluster_size} does not match ClusterFinderMT size {clusterfindermt.cluster_size}, using {clusterfindermt.cluster_size} instead.") cls = _get_class("ClusterCollector", clusterfindermt.cluster_size, dtype) return cls(clusterfindermt)