Skip to content

Commit 1684a47

Browse files
authored
Merge pull request #140 from GeoscienceAustralia/upgrade_dev
Use latest DEA Tools in dev requirements, make `postgres` optional extra
2 parents 0f475b6 + 20b09c3 commit 1684a47

File tree

9 files changed

+29
-8
lines changed

9 files changed

+29
-8
lines changed

.github/workflows/dea-intertidal-image-dev.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ on:
3131
release:
3232
types: [edited, published]
3333

34+
# Ensure only one test workflow runs per branch/PR at a time
35+
concurrency:
36+
group: ${{ github.workflow }}-${{ github.ref }} # Group by workflow and branch/PR ref
37+
cancel-in-progress: true # Cancel any in-progress runs if a new one starts
38+
3439
permissions:
3540
id-token: write # Required for requesting Json web token
3641
contents: write # Required for actions/checkout

.github/workflows/dea-intertidal-image.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ on:
3434
release:
3535
types: [edited, published]
3636

37+
# Ensure only one test workflow runs per branch/PR at a time
38+
concurrency:
39+
group: ${{ github.workflow }}-${{ github.ref }} # Group by workflow and branch/PR ref
40+
cancel-in-progress: true # Cancel any in-progress runs if a new one starts
41+
3742
permissions:
3843
id-token: write # Required for requesting Json web token
3944
contents: write # Required for actions/checkout

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RUN pip install uv && \
3636
# Now copy the rest of the files
3737
COPY . /app
3838

39-
# Install DEA Intertidal and verify installation
40-
RUN uv pip install . --system && \
39+
# Install DEA Intertidal with postgres extra and verify installation
40+
RUN uv pip install .[postgres] --system && \
4141
uv pip check && \
4242
dea-intertidal --help

dev-requirements.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ aiohttp==3.10.10
33
awscli==1.38.1
44
botocore==1.37.1
55
Bottleneck==1.4.2
6-
click==8.1.7
6+
click==8.2.1
77
dask==2024.3.1
8-
datacube[s3,performance]==1.9.3
9-
dea-tools==0.3.6
8+
datacube[s3,performance]==1.9.6
9+
dea-tools==0.4.0
1010
eodatasets3
1111
eo-tides==0.8.0
1212
hdstats==0.1.8.post1
1313
geopandas==0.14.4
1414
matplotlib==3.9.2
1515
mdutils==1.6.0
1616
numpy==1.26.4
17-
odc-algo==0.2.3
17+
odc-algo==1.0.1
1818
odc-geo==0.4.10
1919
odc-ui==0.2.1
2020
pandas==2.2.3

intertidal/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from eodatasets3.verify import PackageChecksum
3232
from eodatasets3.stac import to_stac_item, validate_item
3333
from datacube.utils.masking import mask_invalid_data
34+
from datacube.utils.geometry import Geometry as Geometry_datacube18
3435

3536
from intertidal.utils import configure_logging
3637

@@ -120,7 +121,7 @@ def extract_geobox(
120121
"""
121122

122123
# List of valid input geometry types (from `odc-geo` or `datacube-core`)
123-
GEOM_TYPES = (odc.geo.geom.Geometry, datacube.utils.geometry._base.Geometry)
124+
GEOM_TYPES = (odc.geo.geom.Geometry, Geometry_datacube18)
124125

125126
# Either `study_area` or `geom` must be provided
126127
if study_area is None and geom is None:

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"xarray",
4545
]
4646

47+
# Optional dependencies
48+
EXTRAS = {
49+
"postgres": ["psycopg2"],
50+
}
51+
4752
# Package metadata
4853
NAME = "dea_intertidal"
4954
DESCRIPTION = "Tools for running Digital Earth Australia Intertidal"
@@ -63,6 +68,7 @@
6368
"python_requires": REQUIRES_PYTHON,
6469
"url": URL,
6570
"install_requires": REQUIRED,
71+
"extras_require": EXTRAS,
6672
"packages": find_packages(),
6773
"include_package_data": True,
6874
"license": "Apache License 2.0",

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Integration tests
1010
1111
This directory contains tests that are run to verify that DEA Intertidal code runs correctly. The ``test_intertidal.py`` file runs a small-scale full workflow analysis over an intertidal flat in the Gulf of Carpentaria using the DEA Intertidal [Command Line Interface (CLI) tools](../notebooks/Intertidal_CLI.ipynb), and compares these results against a LiDAR validation DEM to produce some simple accuracy metrics.
1212

13-
The latest integration test completed at **2025-07-14 14:20**. Compared to the previous run, it had an:
13+
The latest integration test completed at **2025-07-16 17:07**. Compared to the previous run, it had an:
1414
- RMSE accuracy of **0.14 m ( :heavy_minus_sign: no change)**
1515
- MAE accuracy of **0.12 m ( :heavy_minus_sign: no change)**
1616
- Bias of **0.12 m ( :heavy_minus_sign: no change)**

tests/validation.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,7 @@ time,Correlation,RMSE,MAE,R-squared,Bias,Regression slope
120120
2025-07-08 04:33:10.752555+00:00,0.975,0.145,0.123,0.95,0.117,1.119
121121
2025-07-09 06:39:54.701598+00:00,0.975,0.145,0.123,0.95,0.117,1.119
122122
2025-07-14 04:20:42.968376+00:00,0.975,0.145,0.123,0.95,0.117,1.119
123+
2025-07-16 05:28:52.268887+00:00,0.975,0.145,0.123,0.95,0.117,1.119
124+
2025-07-16 06:18:39.433814+00:00,0.975,0.145,0.123,0.95,0.117,1.119
125+
2025-07-16 06:35:53.694461+00:00,0.975,0.145,0.123,0.95,0.117,1.119
126+
2025-07-16 07:07:43.740627+00:00,0.975,0.145,0.123,0.95,0.117,1.119

tests/validation.jpg

-68 Bytes
Loading

0 commit comments

Comments
 (0)