Repository: ASFHyP3/asf-tools (language: python)

Issue:
update HAND geojson
Update HAND geojson in water_map jobs to pull from new, opendata S3 bucket at s3://copernicus-hand-30m/v1/2021/cop30-hand.geojson
<!--
If this is a pull request for a new release, please use the release template:
   https://github.com/ASFHyP3/asf-tools/compare/main...develop?template=release.md
 
NOTE: Pull requests should only be opened for merges to protected branches (required) and any 
changes which you'd like reviewed. Do not open a pull request to update a feature or personal
branch -- simply merge with `git`.
-->


Discussion / hints:

Fix patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..f2494b1b
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,8 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "daily"
+    labels:
+      - "bumpless"
diff --git a/.github/queries/associated-pr.query.yml b/.github/queries/associated-pr.query.yml
deleted file mode 100644
index f8b8644a..00000000
--- a/.github/queries/associated-pr.query.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-query: '
-  query($owner:String!, $name:String!, $sha:String!) {
-    repository(owner:$owner, name:$name) {
-      commit: object(expression:$sha) {
-        ... on Commit {
-          associatedPullRequests(first:1, orderBy:{field: UPDATED_AT, direction: DESC}){
-            edges{
-              node{
-                title
-                number
-                body
-              }
-            }
-          }
-        }
-      }
-    }
-  }'
-variables:
-  owner:
-    type: arg
-    name: owner
-  name:
-    type: arg
-    name: name
-  sha:
-    type: arg
-    name: sha
diff --git a/.github/queries/pr-labels.query.yml b/.github/queries/pr-labels.query.yml
deleted file mode 100644
index a048658d..00000000
--- a/.github/queries/pr-labels.query.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-query: '
-  query($owner:String!, $name:String!, $pr:Int!) {
-    repository(owner:$owner, name:$name) {
-      pullRequest(number:$pr) {
-        labels(first:100) {
-          nodes {
-            name
-          }
-        }
-      }
-    }
-  }'
-variables:
-  owner:
-    type: arg
-    name: owner
-  name:
-    type: arg
-    name: name
-  pr:
-    type: jq
-    file: pr.json
-    query: '.data.repository.commit.associatedPullRequests.edges[0].node.number'
-    cast: Int
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
index 610b74c8..7d822a64 100644
--- a/.github/workflows/changelog.yml
+++ b/.github/workflows/changelog.yml
@@ -10,15 +10,7 @@ on:
       - main
       - develop
 jobs:
-  changelog-udated:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v1
-
-      - name: Changelog check
-        uses: Zomzog/changelog-checker@v1.0.0
-        with:
-          fileName: CHANGELOG.md
-          noChangelogLabel: bumpless
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+  call-changelog-check-workflow:
+    uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.4.0
+    secrets:
+      USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml
index e4394109..b479ad4f 100644
--- a/.github/workflows/distribute.yml
+++ b/.github/workflows/distribute.yml
@@ -11,9 +11,9 @@ jobs:
     outputs:
       SDIST_VERSION: ${{ steps.build.outputs.version }}
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
 
-      - uses: actions/setup-python@v1
+      - uses: actions/setup-python@v4
         with:
           python-version: 3.8
 
@@ -40,7 +40,7 @@ jobs:
     runs-on: ubuntu-latest
     needs: distribute
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
 
       - uses: conda-incubator/setup-miniconda@v2
         with:
diff --git a/.github/workflows/labeled-pr.yml b/.github/workflows/labeled-pr.yml
index 59fa87c1..a0a3ecf8 100644
--- a/.github/workflows/labeled-pr.yml
+++ b/.github/workflows/labeled-pr.yml
@@ -11,12 +11,5 @@ on:
       - main
 
 jobs:
-  bump-labeled:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Require Labels
-        uses: mheap/github-action-required-labels@v1
-        with:
-          mode: exactly
-          count: 1
-          labels: "major, minor, patch, bumpless"
+  call-labeled-pr-check-workflow:
+    uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.4.0
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d392d4e7..fef586ca 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,7 +9,7 @@ jobs:
   finish:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           fetch-depth: 0
           token: ${{ secrets.TOOLS_BOT_PAK }}
@@ -21,7 +21,7 @@ jobs:
           echo ::set-output name=ARC_FILE::ASF_ArcGIS_Toolbox_$(echo ${GITHUB_REF#refs/tags/}).zip
 
       - name: Zip ArcGIS Toolbox
-        uses: montudor/action-zip@v0.1.0
+        uses: montudor/action-zip@v1
         with:
           args: zip -qq -j -r ${{ steps.release_assets.outputs.ARC_FILE }} ArcGIS-toolbox
 
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index d53e0804..542c1faf 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -6,9 +6,9 @@ jobs:
   flake8:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
 
-      - uses: actions/setup-python@v1
+      - uses: actions/setup-python@v4
         with:
           python-version: 3.8
 
@@ -24,17 +24,17 @@ jobs:
 
 
   call-secrets-analysis-workflow:
-    uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@main
+    uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.4.0
 
 
   trufflehog:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           fetch-depth: 0
 
-      - uses: actions/setup-python@v1
+      - uses: actions/setup-python@v4
         with:
           python-version: 3.8
 
diff --git a/.github/workflows/tag-version.yml b/.github/workflows/tag-version.yml
index 1696384a..20a3194c 100644
--- a/.github/workflows/tag-version.yml
+++ b/.github/workflows/tag-version.yml
@@ -7,6 +7,6 @@ on:
 
 jobs:
   call-bump-version-workflow:
-    uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@main
+    uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.4.0
     secrets:
       USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb2151d5..208f1c95 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
 and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 
+## [0.4.3]
+
+### Changed
+* `asf_tools.water_map` now uses the  updated [ASF Global HAND dataset](https://copernicus-hand-30m.s3.amazonaws.com/) derived from the [2021 release of the Copernicus GLO-30 Public DEM](https://spacedata.copernicus.eu/blogs/-/blogs/copernicus-dem-2021-release-now-available)
+
 ## [0.4.2](https://github.com/ASFHyP3/asf-tools/compare/v0.4.1...v0.4.2)
 
 ### Added
diff --git a/asf_tools/hand/prepare.py b/asf_tools/hand/prepare.py
index bf338f7f..a63a708a 100644
--- a/asf_tools/hand/prepare.py
+++ b/asf_tools/hand/prepare.py
@@ -12,7 +12,7 @@
 from asf_tools.composite import get_epsg_code
 from asf_tools.util import GDALConfigManager
 
-HAND_GEOJSON = '/vsicurl/https://asf-hand-data.s3.amazonaws.com/cop30-hand.geojson'
+HAND_GEOJSON = '/vsicurl/https://copernicus-hand-30m.s3.amazonaws.com/v1/2021/cop30-hand.geojson'
 
 gdal.UseExceptions()
 ogr.UseExceptions()


Test patch:
diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml
index 7bf549fb..7ade1d3f 100644
--- a/.github/workflows/test-and-build.yml
+++ b/.github/workflows/test-and-build.yml
@@ -12,19 +12,19 @@ on:
 
 jobs:
   call-pytest-workflow:
-    uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@main
+    uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.4.0
     with:
       local_package_name: asf_tools
       conda_env_name: asf-tools
 
   call-version-info-workflow:
-    uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@main
+    uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.4.0
     with:
       conda_env_name: asf-tools
 
   call-docker-ghcr-workflow:
     needs: call-version-info-workflow
-    uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@main
+    uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.4.0
     with:
       version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }}
     secrets:
diff --git a/tests/data/hand_candidates.npz b/tests/data/hand_candidates.npz
index 96914682..883e5824 100644
Binary files a/tests/data/hand_candidates.npz and b/tests/data/hand_candidates.npz differ
diff --git a/tests/test_vector.py b/tests/test_vector.py
index 6ced5610..0da21ce8 100644
--- a/tests/test_vector.py
+++ b/tests/test_vector.py
@@ -59,4 +59,4 @@ def test_get_intersecting_feature_properties():
 
 def test_get_features():
     assert len(vector.get_features(dem.DEM_GEOJSON)) == 26450
-    assert len(vector.get_features(hand.prepare.HAND_GEOJSON)) == 26445
+    assert len(vector.get_features(hand.prepare.HAND_GEOJSON)) == 26450