Skip to content

Commit

Permalink
fix misnamed tests, remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Mar 23, 2024
1 parent 115a2f0 commit 2796182
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions centerline_width/centerline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Built-in Python functions
import math
import logging
import csv

# External Python libraries
import numpy as np
Expand Down Expand Up @@ -154,7 +153,6 @@ def equalDistanceCenterline(centerline_coordinates=None,
if centerline_coordinates is None:
return None

centerline_line = LineString(centerline_coordinates)
equal_distance_between_centerline_coordinates = []

geodesic = pyproj.Geod(ellps=ellipsoid)
Expand Down
5 changes: 3 additions & 2 deletions centerline_width/pytests/test_errorPlotDiagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ def test_plotCenterlineWidth_darkModeInvalidTypes(invalid_input, error_output):

@pytest.mark.parametrize("invalid_input, error_output",
invalid_non_bool_options)
def test_plotCenterline_equalAxisInvalidTypes(invalid_input, error_output):
def test_plotCenterlineWidth_equalAxisInvalidTypes(invalid_input,
error_output):
with pytest.raises(
ValueError,
match=re.escape(
Expand All @@ -397,7 +398,7 @@ def test_plotCenterline_equalAxisInvalidTypes(invalid_input, error_output):

@pytest.mark.parametrize("invalid_input, error_output",
invalid_non_bool_options)
def test_plotCenterline_showPlotInvalidTypes(invalid_input, error_output):
def test_plotCenterlineWidth_showPlotInvalidTypes(invalid_input, error_output):
with pytest.raises(
ValueError,
match=re.escape(
Expand Down
2 changes: 0 additions & 2 deletions centerline_width/relativeDistance.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def relativeCenterlineCoordinates(first_point, centerline_coordinates,

def relativeRidgeCoordinates(first_point, x_ridge, y_ridge, ellipsoid):
# Convert Voronoi ridges from Decimal Degree to Relative Distance
geodesic = pyproj.Geod(ellps=ellipsoid)

x_relative_ridges = []
y_relative_ridges = []
Expand All @@ -89,7 +88,6 @@ def relativeRidgeCoordinates(first_point, x_ridge, y_ridge, ellipsoid):

def relativeWidthCoordinates(first_point, width_dictionary, ellipsoid):
# Convert width dictionary from Decimal Degree to Relative Distance
geodesic = pyproj.Geod(ellps=ellipsoid)

relative_width_dictionary = {}
for k, v in width_dictionary.items():
Expand Down
3 changes: 1 addition & 2 deletions centerline_width/width.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Built-in Python functions
import logging
import csv

# External Python libraries
from shapely.geometry import Point, LineString
Expand Down Expand Up @@ -101,8 +102,6 @@ def intersectsTopOrBottomOfBank(point1, point2):
right_width_coordinates = {}
left_width_coordinates = {}
num_intersection_coordinates = {}
x = []
y = []

min_x, min_y, max_x, max_y = river_object.bank_polygon.bounds
for centerline_point, slope in centerline_slope.items():
Expand Down

0 comments on commit 2796182

Please sign in to comment.