Skip to content

Commit

Permalink
fix: linter appeasement
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrink committed Sep 19, 2023
1 parent a0d0855 commit 79c89ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
7 changes: 4 additions & 3 deletions tests/test_decimer_segmentation.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import numpy as np
from decimer_segmentation.decimer_segmentation import *
from decimer_segmentation.decimer_segmentation import (
determine_depiction_size_with_buffer
)

def test_determine_depiction_size_with_buffer():
# Determine the average depiction size of the structures in a given list of structures
# Determine 1.1 * max depiction size of the structures in a given list of bboxes
bboxes = [
[0, 0, 6, 6],
[0, 0, 8, 8],
Expand Down
22 changes: 19 additions & 3 deletions tests/test_mask_expansion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import numpy as np
from decimer_segmentation.complete_structure import *
from decimer_segmentation.complete_structure import (
get_bounding_box_center,
get_edge_line,
get_euklidian_distance,
set_x_range,
get_next_pixel_to_check,
adapt_x_values,
get_contour_seeds,
get_mask_center,
get_seeds,
get_neighbour_pixels,
expand_masks,
expansion_coordination,
detect_horizontal_and_vertical_lines,
)


def test_get_bounding_box_center():
Expand Down Expand Up @@ -31,7 +45,8 @@ def test_get_euklidian_distance():


def test_set_x_range():
# For the contour-based expansion, non-white pixels on the contours of the original polygon bounding box are detected
# For the contour-based expansion, non-white pixels on the contours of the original
# polygon bounding box are detected
test_distance = 3
test_eukl_distance = 4
test_image_array = np.array([[1, 5]])
Expand All @@ -55,7 +70,8 @@ def test_get_next_pixel_to_check():


def test_adapt_x_values():
# Returns a bounding box where the nodes are altered depending on their relative position to bounding box centre
# Returns a bounding box where the nodes are altered depending on their relative
# position to bounding box centre
test_bounding_box = np.array([[1, 5], [2, 4]])
test_node_index = 1
test_image_shape = [2, 4, 6]
Expand Down

0 comments on commit 79c89ca

Please sign in to comment.