Skip to content

Commit

Permalink
HARMONY-1745: Fixed typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
ygliuvt committed Jun 12, 2024
1 parent 2dc6dc8 commit 0a27460
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions harmony/harmony.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ def __repr__(self) -> str:


class WKT:
"""The WKT represntation of Spatial."""
"""The Well Known Text (WKT) representation of Spatial."""

def __init__(self, wkt: str):
"""Constructs a WKT of spatial area.
"""Constructs a WKT instance of spatial area.
Args:
wkt: WKT string
wkt: the WKT string
Returns:
A WKT
A WKT instance
"""
self.wkt = wkt

Expand Down Expand Up @@ -382,7 +382,7 @@ def __init__(self,
'variables': 'parameter-name'
}
self.spatial_validations = [
(lambda s: is_wkt_valid(s.wkt), f'WKT {spatial.wkt} is not valid'),
(lambda s: is_wkt_valid(s.wkt), f'WKT {spatial.wkt} is invalid'),
]
else:
self.variable_name_to_query_param = {
Expand Down
6 changes: 3 additions & 3 deletions tests/test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def test_request_dimensions_error_messages(value):
assert message in messages

@pytest.mark.parametrize('key, value, message', [
('spatial', WKT('BBOX(-140,20,-50,60)'), 'WKT BBOX(-140,20,-50,60) is not valid'),
('spatial', WKT('APOINT(0 51.48)'), 'WKT APOINT(0 51.48) is not valid'),
('spatial', WKT('CIRCULARSTRING(0 0, 1 1, 1 0)'), 'WKT CIRCULARSTRING(0 0, 1 1, 1 0) is not valid'),
('spatial', WKT('BBOX(-140,20,-50,60)'), 'WKT BBOX(-140,20,-50,60) is invalid'),
('spatial', WKT('APOINT(0 51.48)'), 'WKT APOINT(0 51.48) is invalid'),
('spatial', WKT('CIRCULARSTRING(0 0, 1 1, 1 0)'), 'WKT CIRCULARSTRING(0 0, 1 1, 1 0) is invalid'),
])
def test_request_spatial_error_messages(key, value, message):
request = Request(Collection('foo'), **{key: value})
Expand Down

0 comments on commit 0a27460

Please sign in to comment.