Skip to content

Commit

Permalink
Merge pull request #154 from wri/master
Browse files Browse the repository at this point in the history
Integrate hotfixes into develop
  • Loading branch information
jterry64 authored Sep 12, 2024
2 parents d2c6028 + e5c5fc8 commit 2e8370e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 8

RUN yum install -y zip geos-devel

Expand All @@ -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"]
CMD ["/bin/bash"]
5 changes: 3 additions & 2 deletions src/datapump/sync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ def build_jobs(self, config: DatapumpConfig) -> List[Job]:
resampling="mode",
implementation="default",
blocksize=1024,
export_to_gee=True,
# Disable export to GEE until COG metadata is reduced to < 10Mbytes
export_to_gee=False,
),
# Created from the "intensity" asset
CogAssetParameters(
Expand Down Expand Up @@ -451,7 +452,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

Expand Down
6 changes: 3 additions & 3 deletions tests/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 2e8370e

Please sign in to comment.