Skip to content

Commit

Permalink
update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Nov 12, 2024
1 parent 70af73a commit d0549cd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
6 changes: 4 additions & 2 deletions add_new_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
features_in_csv = list(features_df["Feature Name"])

# list of all features that exist (with both latitude/longitude values)
retrieved_features = pydar.features_from_latlon_range(
min_latitude=-90, max_latitude=90, min_longitude=0, max_longitude=360)
retrieved_features = pydar.features_from_latlon_range(min_latitude=-90,
max_latitude=90,
min_longitude=0,
max_longitude=360)

# check if all features in CSV have both latitude/longitude values
if not features_in_csv == retrieved_features:
Expand Down
9 changes: 4 additions & 5 deletions example_pydar_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
f"\nFeature Names Found at -72 latitude and 183 longitude = {feature_names_list}"
)

feature_names_list = pydar.features_from_latlon_range(
min_latitude=-82,
max_latitude=-72,
min_longitude=183,
max_longitude=190)
feature_names_list = pydar.features_from_latlon_range(min_latitude=-82,
max_latitude=-72,
min_longitude=183,
max_longitude=190)
print(
f"\nFeature Names Found in Latitude/Longitude Range = {feature_names_list}"
)
Expand Down
9 changes: 4 additions & 5 deletions pydar/pytests/test_error_retrieve_ids_by_time_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,10 @@ def test_retrieveIDSByLatitudeLongitude_verifyOutput(caplog):


def test_retrieveFeaturesFromLatitudeLongitudeRange_verifyOutput(caplog):
found_features = pydar.features_from_latlon_range(
min_latitude=-82,
max_latitude=-72,
min_longitude=183,
max_longitude=190)
found_features = pydar.features_from_latlon_range(min_latitude=-82,
max_latitude=-72,
min_longitude=183,
max_longitude=190)
assert found_features == [
'Crveno Lacus', 'Ontario Lacus', 'Romo Planitia', 'Rossak Planitia',
'Saraswati Flumen'
Expand Down
18 changes: 8 additions & 10 deletions pydar/retrieve_ids_by_time_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,20 +327,18 @@ def features_from_latlon(latitude: (int, float) = None,
longitude=longitude)

# Runs range check, but the range is 0 for an exact spot
feature_names_list = features_from_latlon_range(
min_latitude=latitude,
max_latitude=latitude,
min_longitude=longitude,
max_longitude=longitude)
feature_names_list = features_from_latlon_range(min_latitude=latitude,
max_latitude=latitude,
min_longitude=longitude,
max_longitude=longitude)
return feature_names_list


### RETURN FEATURE NAMES FOR A RANGE OF LATITUDE/LONGTIUDES #############
def features_from_latlon_range(
min_latitude: (int, float) = None,
max_latitude: (int, float) = None,
min_longitude: (int, float) = None,
max_longitude: (int, float) = None) -> list:
def features_from_latlon_range(min_latitude: (int, float) = None,
max_latitude: (int, float) = None,
min_longitude: (int, float) = None,
max_longitude: (int, float) = None) -> list:
# Retrieve all Feature Names that are within a range of latitude/longitude
# Returns a list of feature names
pydar.errorHandlingRetrieveIDSByLatitudeLongitudeRange(
Expand Down

0 comments on commit d0549cd

Please sign in to comment.