From acfe1dd2b19015323973e16bfe07fb1e1be92303 Mon Sep 17 00:00:00 2001 From: Tushar Saini Date: Fri, 31 May 2024 14:15:14 +0530 Subject: [PATCH 1/3] [UPD] update relative radius logic --- retailtree/retailtree.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/retailtree/retailtree.py b/retailtree/retailtree.py index 9eef551..9543b02 100644 --- a/retailtree/retailtree.py +++ b/retailtree/retailtree.py @@ -57,17 +57,13 @@ def build_tree(self, dist_func=euclidean): def __get_neighbors_radius(self): """ Method to get the radius within which neighbors will be searched for. - If number of annotations is greater than 10, random annotations are considered. - Radius is the max of the diagonals of the annotations considered. """ radius = self.__neighbors_radius if not radius: annotation_bucket = list(self.annotations.values()) - if len(annotation_bucket) > 10: - random_annotations = sample(annotation_bucket, 10) - else: - random_annotations = annotation_bucket + + random_annotations = annotation_bucket distance = [math.sqrt(pow(annotation.width, 2) + pow( annotation.length, 2)) for annotation in random_annotations] radius = max(distance) From bcbb08127c563e662f7a2f40d0bc7e55ca5a9a4b Mon Sep 17 00:00:00 2001 From: Tushar Saini Date: Fri, 31 May 2024 14:16:08 +0530 Subject: [PATCH 2/3] [UPD] update version 1.3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8ff14b5..dd131d2 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def read(fname): setup( name="retailtree", - version="1.2", + version="1.3", long_description=read("README.md"), long_description_content_type='text/markdown', packages=find_packages(), From 5804e926720c21e34418c0224cd5ad5b9adf0609 Mon Sep 17 00:00:00 2001 From: Tushar Saini Date: Fri, 31 May 2024 14:35:53 +0530 Subject: [PATCH 3/3] [UPD] update CI/CD --- .github/workflows/workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 88b1258..b3b3ea7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,6 +1,9 @@ name: Publish RetailTree Python package distribution to PyPI on: + push: + branches: + - main workflow_run: workflows: ["Run Tests"] types: