From c52d5512076f350347c6c516c21c3dbb9db3ec98 Mon Sep 17 00:00:00 2001 From: Daniel Mannarino Date: Wed, 17 Jul 2024 11:33:55 -0400 Subject: [PATCH] Increase expected RADD tile count for Asian expansion --- src/Dockerfile | 4 ++-- src/datapump/sync/sync.py | 2 +- tests/tests/test_unit.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Dockerfile b/src/Dockerfile index 12631f2..5319d55 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -15,7 +15,7 @@ RUN pip install . -t python # to change the hash of the file and get TF to realize it needs to be # redeployed. Ticket for a better solution: # https://gfw.atlassian.net/browse/GTC-1250 -# change 6 +# change 7 RUN yum install -y zip geos-devel @@ -26,4 +26,4 @@ RUN find python/ -type d -a -name '__pycache__' -print0 | xargs -0 rm -rf # Compress all source codes except files listed in .lambdaignore RUN cat .lambdaignore | xargs zip -9qyr layer.zip python -x -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] diff --git a/src/datapump/sync/sync.py b/src/datapump/sync/sync.py index 99d4e12..c55d202 100644 --- a/src/datapump/sync/sync.py +++ b/src/datapump/sync/sync.py @@ -451,7 +451,7 @@ class RADDAlertsSync(DeforestationAlertsSync): source_bucket = "gfw_gee_export" source_prefix = "wur_radd_alerts/" input_calc = "(A >= 20000) * (A < 40000) * A" - number_of_tiles = [190, 191] # Africa:54, Asia:52, CA: 16, SA:68 + number_of_tiles = [208, 209] # Africa:54, Asia:70, CA: 16, SA:68 grid = "10/100000" max_zoom = 14 diff --git a/tests/tests/test_unit.py b/tests/tests/test_unit.py index 4fef5ac..61a9d93 100644 --- a/tests/tests/test_unit.py +++ b/tests/tests/test_unit.py @@ -141,7 +141,7 @@ def test_radd_sync_nothing_newer(monkeypatch): lambda bucket, prefix: ["v20220222"], ) monkeypatch.setattr( - sync, "get_gs_files", lambda bucket, prefix, **kwargs: list(range(0, 191)) + sync, "get_gs_files", lambda bucket, prefix, **kwargs: list(range(0, 209)) ) raster_jobs = RADDAlertsSync("v20220101").build_jobs(mock_dp_config) @@ -168,7 +168,7 @@ def test_radd_sync_newer_available_with_valid_number_tiles(monkeypatch): lambda bucket, prefix: ["v20220222", "v20220221"], ) monkeypatch.setattr( - sync, "get_gs_files", lambda bucket, prefix, **kwargs: list(range(0, 190)) + sync, "get_gs_files", lambda bucket, prefix, **kwargs: list(range(0, 208)) ) raster_jobs = RADDAlertsSync("v20220101").build_jobs(mock_dp_config) @@ -204,7 +204,7 @@ def test_radd_sync_newer_available_with_too_many_tiles(monkeypatch): lambda bucket, prefix: ["v20220222"], ) monkeypatch.setattr( - sync, "get_gs_files", lambda bucket, prefix, **kwargs: list(range(0, 200)) + sync, "get_gs_files", lambda bucket, prefix, **kwargs: list(range(0, 250)) ) with pytest.raises(Exception):