diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d50f89d..a32a810 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -2,10 +2,7 @@ name: Publish RetailTree Python package distribution to PyPI on: push: - paths: - - "setup.py" - branches: - - "main" + jobs: build: 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) 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(),