From 25c206f6be590612fa58db11a15582f145e100c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 04:03:10 +0000 Subject: [PATCH 01/12] Bump mamba-org/provision-with-micromamba from 15 to 16 Bumps [mamba-org/provision-with-micromamba](https://github.com/mamba-org/provision-with-micromamba) from 15 to 16. - [Release notes](https://github.com/mamba-org/provision-with-micromamba/releases) - [Commits](https://github.com/mamba-org/provision-with-micromamba/compare/v15...v16) --- updated-dependencies: - dependency-name: mamba-org/provision-with-micromamba dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/distribute.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index 54297f7..29b9408 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -19,7 +19,7 @@ jobs: with: fetch-depth: 0 - - uses: mamba-org/provision-with-micromamba@v15 + - uses: mamba-org/provision-with-micromamba@v16 - name: Build distribution id: build @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: mamba-org/provision-with-micromamba@v15 + - uses: mamba-org/provision-with-micromamba@v16 - name: Ensure hyp3_sdk v${{ needs.call-version-info-workflow.outputs.version }}} is pip installable run: | From 77837b41a446fb3dcd07f4a9c4f14cdffb9603b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 03:48:34 +0000 Subject: [PATCH 02/12] Bump pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.8 to 1.8.10. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.8...v1.8.10) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/distribute.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index 4a9e2d6..8f80a5d 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -27,7 +27,7 @@ jobs: python -m build - name: upload to PyPI.org - uses: pypa/gh-action-pypi-publish@v1.8.8 + uses: pypa/gh-action-pypi-publish@v1.8.10 with: user: __token__ password: ${{ secrets.TOOLS_PYPI_PAK }} From d658316879c9c78a2255108531965565bbd1100d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 03:51:16 +0000 Subject: [PATCH 03/12] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/distribute.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index b2f933f..f884097 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -15,7 +15,7 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -41,7 +41,7 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: mamba-org/provision-with-micromamba@v15 From b29237a4e33491a1de534d07defda0534b016dde Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Wed, 6 Sep 2023 09:58:37 -0800 Subject: [PATCH 04/12] Do not tweet release notes --- .github/workflows/notify-downstream.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/notify-downstream.yml b/.github/workflows/notify-downstream.yml index 550dedc..c1f908e 100644 --- a/.github/workflows/notify-downstream.yml +++ b/.github/workflows/notify-downstream.yml @@ -17,13 +17,3 @@ jobs: repo: ASFHyP3/hyp3-docs ref: main inputs: '{"sdk_version": "${{ github.event.release.tag_name }}"}' - - - name: Tweet release notes - uses: benc-uk/workflow-dispatch@v1.2 - with: - workflow: propose-tweet.yml - token: ${{ secrets.TOOLS_BOT_PAK }} - repo: ASFHyP3/hyp3-docs - ref: develop - inputs: > - {"message": ${{ toJSON(format('{0}{1}', github.event.release.name, github.event.release.body)) }} } From be62e6de8a0aab8fd2198d29f75221be968207e9 Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Fri, 22 Sep 2023 10:03:33 -0800 Subject: [PATCH 05/12] Apply suggestions from code review --- .github/workflows/distribute.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index 29b9408..f7923ac 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -19,7 +19,9 @@ jobs: with: fetch-depth: 0 - - uses: mamba-org/provision-with-micromamba@v16 + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml - name: Build distribution id: build @@ -43,7 +45,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: mamba-org/provision-with-micromamba@v16 + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml - name: Ensure hyp3_sdk v${{ needs.call-version-info-workflow.outputs.version }}} is pip installable run: | From 8c94d0cc7bb27d0ace9974d6d7a49571e2569265 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 03:24:34 +0000 Subject: [PATCH 06/12] Bump ASFHyP3/actions from 0.8.2 to 0.8.3 Bumps [ASFHyP3/actions](https://github.com/asfhyp3/actions) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/asfhyp3/actions/releases) - [Changelog](https://github.com/ASFHyP3/actions/blob/develop/CHANGELOG.md) - [Commits](https://github.com/asfhyp3/actions/compare/v0.8.2...v0.8.3) --- updated-dependencies: - dependency-name: ASFHyP3/actions dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/changelog.yml | 2 +- .github/workflows/create-jira-issue.yml | 2 +- .github/workflows/distribute.yml | 2 +- .github/workflows/labeled-pr.yml | 2 +- .github/workflows/release-template-comment.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-analysis.yml | 4 ++-- .github/workflows/tag-version.yml | 2 +- .github/workflows/test.yml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index c81dbc4..b53663a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -12,6 +12,6 @@ on: jobs: call-changelog-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.3 secrets: USER_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index 3615af1..3a138e9 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -6,7 +6,7 @@ on: jobs: call-create-jira-issue-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.3 secrets: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index fa629f1..3962c33 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -7,7 +7,7 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.3 distribute: runs-on: ubuntu-latest diff --git a/.github/workflows/labeled-pr.yml b/.github/workflows/labeled-pr.yml index ee8a5f5..103ae29 100644 --- a/.github/workflows/labeled-pr.yml +++ b/.github/workflows/labeled-pr.yml @@ -12,4 +12,4 @@ on: jobs: call-labeled-pr-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.3 diff --git a/.github/workflows/release-template-comment.yml b/.github/workflows/release-template-comment.yml index 42994c1..5ecedad 100644 --- a/.github/workflows/release-template-comment.yml +++ b/.github/workflows/release-template-comment.yml @@ -7,7 +7,7 @@ on: jobs: call-release-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.8.3 permissions: pull-requests: write secrets: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be19bb4..ab16a9e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: call-release-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.3 with: release_prefix: HyP3 SDK secrets: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 2d1d541..ae70063 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -4,9 +4,9 @@ on: push jobs: call-flake8-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.8.3 with: local_package_names: hyp3_sdk call-secrets-analysis-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.3 diff --git a/.github/workflows/tag-version.yml b/.github/workflows/tag-version.yml index 5053fe6..5130be2 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@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.3 secrets: USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7ed72d..348b8c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,6 @@ on: jobs: call-pytest-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.8.3 with: local_package_name: hyp3_sdk From 317c602a593aa1358e8e0dce08b6c21bec13b41e Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Fri, 13 Oct 2023 12:07:37 -0800 Subject: [PATCH 07/12] Add `phase_filter_parameter` for InSAR jobs --- src/hyp3_sdk/hyp3.py | 17 +++++++++++++++-- tests/test_hyp3.py | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/hyp3_sdk/hyp3.py b/src/hyp3_sdk/hyp3.py index 8cce8e9..16f6706 100644 --- a/src/hyp3_sdk/hyp3.py +++ b/src/hyp3_sdk/hyp3.py @@ -335,7 +335,8 @@ def submit_insar_job(self, include_dem: bool = False, include_wrapped_phase: bool = False, apply_water_mask: bool = False, - include_displacement_maps: bool = False) -> Batch: + include_displacement_maps: bool = False, + phase_filter_parameter: float = 0.6) -> Batch: """Submit an InSAR job Args: @@ -353,6 +354,9 @@ def submit_insar_job(self, apply_water_mask: Sets pixels over coastal waters and large inland waterbodies as invalid for phase unwrapping include_displacement_maps: Include displacement maps (line-of-sight and vertical) in the product package + phase_filter_parameter: Adaptive phase filter exponent (alpha). + Larger values result in more aggressive filtering. If zero, adaptive phase filter will be skipped. + We recommend against values less than 0.2, or values with more than two decimal places of precision. Returns: A Batch object containing the InSAR job @@ -374,7 +378,8 @@ def prepare_insar_job(cls, include_dem: bool = False, include_wrapped_phase: bool = False, apply_water_mask: bool = False, - include_displacement_maps: bool = False) -> dict: + include_displacement_maps: bool = False, + phase_filter_parameter: float = 0.6) -> dict: """Submit an InSAR job Args: @@ -392,9 +397,17 @@ def prepare_insar_job(cls, apply_water_mask: Sets pixels over coastal waters and large inland waterbodies as invalid for phase unwrapping include_displacement_maps: Include displacement maps (line-of-sight and vertical) in the product package + phase_filter_parameter: Adaptive phase filter exponent (alpha). + Larger values result in more aggressive filtering. If zero, adaptive phase filter will be skipped. + We recommend against values less than 0.2, or values with more than two decimal places of precision. + Returns: A dictionary containing the prepared InSAR job """ + # TODO do we actually need this, or do we normally allow the API to validate values? + if phase_filter_parameter < 0.0 or phase_filter_parameter > 1.0: + raise ValueError(f'Expected phase_filter_parameter in range [0.0, 1.0] but got {phase_filter_parameter}') + if include_los_displacement: warnings.warn('The include_los_displacement parameter has been deprecated in favor of ' 'include_displacement_maps, and will be removed in a future release.', FutureWarning) diff --git a/tests/test_hyp3.py b/tests/test_hyp3.py index 041f711..af23d0a 100644 --- a/tests/test_hyp3.py +++ b/tests/test_hyp3.py @@ -259,6 +259,7 @@ def test_prepare_rtc_job(): } +# TODO add phase_filter_parameter, including test for ValueError def test_prepare_insar_job(): assert HyP3.prepare_insar_job(granule1='my_granule1', granule2='my_granule2') == { 'job_type': 'INSAR_GAMMA', From 810a233f1b0a5726e77df2c2b4237012cbed52f5 Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Thu, 19 Oct 2023 10:32:49 -0800 Subject: [PATCH 08/12] remove unnecessary value error --- src/hyp3_sdk/hyp3.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/hyp3_sdk/hyp3.py b/src/hyp3_sdk/hyp3.py index 16f6706..583605a 100644 --- a/src/hyp3_sdk/hyp3.py +++ b/src/hyp3_sdk/hyp3.py @@ -404,10 +404,6 @@ def prepare_insar_job(cls, Returns: A dictionary containing the prepared InSAR job """ - # TODO do we actually need this, or do we normally allow the API to validate values? - if phase_filter_parameter < 0.0 or phase_filter_parameter > 1.0: - raise ValueError(f'Expected phase_filter_parameter in range [0.0, 1.0] but got {phase_filter_parameter}') - if include_los_displacement: warnings.warn('The include_los_displacement parameter has been deprecated in favor of ' 'include_displacement_maps, and will be removed in a future release.', FutureWarning) From f8be61f7ae5f8e8e2245f62f953cf5df029d85c9 Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Thu, 19 Oct 2023 10:33:32 -0800 Subject: [PATCH 09/12] update todo --- tests/test_hyp3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_hyp3.py b/tests/test_hyp3.py index af23d0a..4e6388d 100644 --- a/tests/test_hyp3.py +++ b/tests/test_hyp3.py @@ -259,7 +259,7 @@ def test_prepare_rtc_job(): } -# TODO add phase_filter_parameter, including test for ValueError +# TODO add phase_filter_parameter def test_prepare_insar_job(): assert HyP3.prepare_insar_job(granule1='my_granule1', granule2='my_granule2') == { 'job_type': 'INSAR_GAMMA', From 69612086b0e065c8ece3e4e540745b11261d318e Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Thu, 19 Oct 2023 13:44:31 -0800 Subject: [PATCH 10/12] Add `phase_filter_parameter` to tests --- tests/test_hyp3.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_hyp3.py b/tests/test_hyp3.py index 4e6388d..b2305b2 100644 --- a/tests/test_hyp3.py +++ b/tests/test_hyp3.py @@ -259,7 +259,6 @@ def test_prepare_rtc_job(): } -# TODO add phase_filter_parameter def test_prepare_insar_job(): assert HyP3.prepare_insar_job(granule1='my_granule1', granule2='my_granule2') == { 'job_type': 'INSAR_GAMMA', @@ -273,12 +272,13 @@ def test_prepare_insar_job(): 'include_wrapped_phase': False, 'apply_water_mask': False, 'include_displacement_maps': False, + 'phase_filter_parameter': 0.6, } } assert HyP3.prepare_insar_job(granule1='my_granule1', granule2='my_granule2', name='my_name', looks='10x2', include_los_displacement=True, include_look_vectors=True, include_inc_map=True, include_dem=True, include_wrapped_phase=True, apply_water_mask=True, - include_displacement_maps=True) == { + include_displacement_maps=True, phase_filter_parameter=0.4) == { 'job_type': 'INSAR_GAMMA', 'name': 'my_name', 'job_parameters': { @@ -291,6 +291,7 @@ def test_prepare_insar_job(): 'include_wrapped_phase': True, 'apply_water_mask': True, 'include_displacement_maps': True, + 'phase_filter_parameter': 0.4, }, } From e282478d5022583f34b61fb7652b7b529ff96dfd Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Thu, 19 Oct 2023 13:48:11 -0800 Subject: [PATCH 11/12] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6251c83..63ffe51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 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). +## [3.1.0] +### Added +* Added the `phase_filter_parameter` keyword argument for the `HyP3.submit_insar_job` and `HyP3.prepare_insar_job` methods. + ## [3.0.0] ### Removed * Removed the `Job.subscription_id` attribute in response to the Subscriptions feature being removed from HyP3. From 086fe4db3fab52fa6562c11a6ee38d8a3fcc196f Mon Sep 17 00:00:00 2001 From: Jake Herrmann Date: Mon, 23 Oct 2023 12:16:50 -0800 Subject: [PATCH 12/12] update `phase_filter_parameter` docstrings --- src/hyp3_sdk/hyp3.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hyp3_sdk/hyp3.py b/src/hyp3_sdk/hyp3.py index 583605a..1ccae8a 100644 --- a/src/hyp3_sdk/hyp3.py +++ b/src/hyp3_sdk/hyp3.py @@ -354,9 +354,10 @@ def submit_insar_job(self, apply_water_mask: Sets pixels over coastal waters and large inland waterbodies as invalid for phase unwrapping include_displacement_maps: Include displacement maps (line-of-sight and vertical) in the product package - phase_filter_parameter: Adaptive phase filter exponent (alpha). - Larger values result in more aggressive filtering. If zero, adaptive phase filter will be skipped. - We recommend against values less than 0.2, or values with more than two decimal places of precision. + phase_filter_parameter: Adaptive phase filter parameter. + Useful values fall in the range 0.2 to 1. + Larger values result in stronger filtering. + If zero, adaptive phase filter will be skipped. Returns: A Batch object containing the InSAR job @@ -397,9 +398,10 @@ def prepare_insar_job(cls, apply_water_mask: Sets pixels over coastal waters and large inland waterbodies as invalid for phase unwrapping include_displacement_maps: Include displacement maps (line-of-sight and vertical) in the product package - phase_filter_parameter: Adaptive phase filter exponent (alpha). - Larger values result in more aggressive filtering. If zero, adaptive phase filter will be skipped. - We recommend against values less than 0.2, or values with more than two decimal places of precision. + phase_filter_parameter: Adaptive phase filter parameter. + Useful values fall in the range 0.2 to 1. + Larger values result in stronger filtering. + If zero, adaptive phase filter will be skipped. Returns: A dictionary containing the prepared InSAR job