release: bump version to 0.84.2
This commit is contained in:
1 parent
5e6352f524
commit
30b44ec00d
77 files changed
+3312
-1039
No files matched your search
@@ -434,3 +434,40 @@ async def test_cloud_apis_rbac_optimistic_lock_and_analytics(monkeypatch):
|
||||
assert r_clear.json()["meta"]["mode"] == "fallback_static"
|
||||
finally:
|
||||
app.dependency_overrides.clear()
|
||||
|
||||
|
||||
def test_resolve_effective_cloud_config_clamps_on_low_memory(monkeypatch):
|
||||
cfg = earth_clouds.CloudMapConfig(resolution="4096x2048")
|
||||
|
||||
monkeypatch.setattr(earth_clouds, "detect_container_memory_limit_mb", lambda: 500)
|
||||
clamped = earth_clouds.resolve_effective_cloud_config(cfg)
|
||||
assert clamped.resolution == "2048x1024"
|
||||
|
||||
monkeypatch.setattr(earth_clouds, "detect_container_memory_limit_mb", lambda: 2048)
|
||||
assert earth_clouds.resolve_effective_cloud_config(cfg).resolution == "4096x2048"
|
||||
|
||||
monkeypatch.setattr(earth_clouds, "detect_container_memory_limit_mb", lambda: None)
|
||||
assert earth_clouds.resolve_effective_cloud_config(cfg).resolution == "4096x2048"
|
||||
|
||||
|
||||
def test_fuse_and_synthesize_visual_layers_streams_png_payloads():
|
||||
from datetime import UTC, datetime
|
||||
from app.services.earth_clouds_fx import fuse_and_synthesize_visual_layers
|
||||
|
||||
ir_zero = np.zeros((32, 64), dtype=np.uint8)
|
||||
temp_grid = np.full((32, 64), 16.0, dtype=np.float32)
|
||||
temp_grid[9:13, 50:56] = 8.0
|
||||
vis_arr = np.zeros((32, 64, 4), dtype=np.uint8)
|
||||
vis_arr[:, :, 3] = 255
|
||||
vis_arr[9:13, 50:56, :3] = [215, 215, 215]
|
||||
|
||||
fused, webp = fuse_and_synthesize_visual_layers(
|
||||
ir_zero,
|
||||
temp_grid,
|
||||
[({"id": "himawari", "sub_lon": 140.7}, _make_png_bytes(vis_arr))],
|
||||
width=64,
|
||||
height=32,
|
||||
now_utc=datetime(2026, 12, 3, 5, 0, 0, tzinfo=UTC),
|
||||
)
|
||||
assert int(fused[11, 53]) >= 120
|
||||
assert webp is not None and len(webp) > 20
|
||||
Reference in new issue
Block a user