Skip to content

Commit c9d0e3a

Browse files
committed
Fix: add lazy loading in data query
1 parent 40f72cf commit c9d0e3a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

aodn_cloud_optimised/lib/DataQuery.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
PolygonNotIntersectingError,
5252
)
5353

54-
__version__ = "0.2.9"
54+
__version__ = "0.3.0"
5555

5656
REGION: Final[str] = "ap-southeast-2"
5757
ENDPOINT_URL = "https://s3.ap-southeast-2.amazonaws.com"
@@ -408,7 +408,6 @@ def ensure_utc_aware(dt):
408408

409409
# Catch allowed types
410410
match dt:
411-
412411
# Attempt to parse a string datetime
413412
case str():
414413
try:
@@ -430,7 +429,6 @@ def ensure_utc_aware(dt):
430429

431430
# Update datetime
432431
if isinstance(dt, datetime):
433-
434432
# If tzinfo is None, assume UTC
435433
if dt.tzinfo is None:
436434
dt = dt.replace(tzinfo=timezone.utc)
@@ -2139,7 +2137,7 @@ def get_data(
21392137
combined_mask = mask_conditions[0]
21402138
for cond in mask_conditions[1:]:
21412139
combined_mask &= cond
2142-
ds = ds.where(combined_mask, drop=True)
2140+
ds = ds.where(combined_mask, drop=False)
21432141

21442142
# Scalar filters (e.g. {'vessel_name': 'VNCF'})
21452143
if scalar_filter:

0 commit comments

Comments
 (0)