Skip to content

Commit 116a202

Browse files
committed
DAS-2456 Remove unused imports
1 parent 77aacb4 commit 116a202

7 files changed

Lines changed: 26 additions & 17 deletions

File tree

hoss/adapter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,16 @@ def process_item(self, item: Item, source: Source):
132132
url, title=staged_filename, media_type=mime, roles=['data']
133133
)
134134

135-
# Return the STAC record
136-
return result
137135
except Exception as exception:
138136
self.logger.exception(exception)
139137
raise_from_hoss_exception(exception)
140138
finally:
141139
# Clean up any intermediate resources
142140
shutil.rmtree(workdir)
143141

142+
# Return the STAC record
143+
return result
144+
144145
def validate_message(self):
145146
"""Check the service was triggered by a valid message containing
146147
the expected number of granules.

hoss/bbox_utilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import json
1818
from collections import namedtuple
19-
from logging import Logger
2019
from typing import Dict, List, Optional, Tuple, Union
2120

2221
import numpy as np

hoss/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,5 +312,6 @@ class InvalidVariableRequest(CustomNoRetryError):
312312
def __init__(self, variable_names):
313313
super().__init__(
314314
'InvalidVariableRequest',
315-
f'Some variables requested are not supported and could not be processed: "{variable_names}".',
315+
f'Some variables requested are not supported and could not be processed: '
316+
f'"{variable_names}".',
316317
)

hoss/subset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
66
"""
77

8-
from logging import Logger
98
from typing import List, Set
109

1110
from harmony_service_lib.message import Message, Source

hoss/utilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""
66

77
import mimetypes
8-
from logging import Logger
98
from os import sep
109
from os.path import splitext
1110
from shutil import move

hoss/variable_utilities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def check_invalid_variable_request(
3434
# varinfo exclusions will automatically be applied.
3535
if not requested_variables:
3636
get_logger().info(
37-
f'All variables are requested. The following variables will be excluded: {unprocessable_variables}'
37+
f'All variables are requested. The following variables will be excluded:'
38+
f'{unprocessable_variables}'
3839
)
3940
return
4041

tests/unit/test_projection_utilities.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,15 +1331,15 @@ def test_remove_points_outside_grid_extents(self):
13311331
points_x = np.array(
13321332
[
13331333
-1100.1,
1334-
-1000.0,
1334+
-1000.0123456783,
13351335
-800.3,
13361336
-700.4,
13371337
-700.5,
13381338
-700.6,
13391339
-700.7,
13401340
-800.8,
13411341
-900.9,
1342-
-1000.0,
1342+
-1000.01234567892,
13431343
-1100.1,
13441344
]
13451345
)
@@ -1349,27 +1349,36 @@ def test_remove_points_outside_grid_extents(self):
13491349
700.2,
13501350
800.3,
13511351
900.4,
1352-
1000.0,
1352+
1000.0123456781,
13531353
1100.6,
1354-
1000.0,
1354+
1000.0123456784,
13551355
900.8,
13561356
800.9,
13571357
700.0,
13581358
600.1,
13591359
]
13601360
)
13611361
expected_x = np.array(
1362-
[-1000.0, -800.3, -700.4, -700.5, -700.7, -800.8, -900.9, -1000.0]
1362+
[
1363+
-1000.012345678,
1364+
-800.3,
1365+
-700.4,
1366+
-700.5,
1367+
-700.7,
1368+
-800.8,
1369+
-900.9,
1370+
-1000.012345678,
1371+
]
13631372
)
13641373
expected_y = np.array(
1365-
[700.2, 800.3, 900.4, 1000.0, 1000.0, 900.8, 800.9, 700.0]
1374+
[700.2, 800.3, 900.4, 1000.012345678, 1000.012345678, 900.8, 800.9, 700.0]
13661375
)
13671376

13681377
granule_extent = {
1369-
"x_min": -1000.0,
1370-
"x_max": 1000.0,
1371-
"y_min": -1000.0,
1372-
"y_max": 1000.0,
1378+
"x_min": -1000.0123456789,
1379+
"x_max": 1000.0123456786,
1380+
"y_min": -1000.0123456787,
1381+
"y_max": 1000.0123456788,
13731382
}
13741383

13751384
with self.subTest("Perimeter contains some valid points within grid extent"):

0 commit comments

Comments
 (0)