Skip to content

Commit

Permalink
Merge pull request #240 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v3.1.0
  • Loading branch information
asjohnston-asf authored Oct 23, 2023
2 parents 7821194 + 41bd416 commit 1870920
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ on:

jobs:
call-changelog-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
call-create-jira-issue-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,29 @@ on:

jobs:
call-version-info-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3

distribute:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: mamba-org/provision-with-micromamba@v15
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml

- name: Build distribution
id: build
run: |
python -m build
- name: upload to PyPI.org
uses: pypa/[email protected].8
uses: pypa/[email protected].10
with:
user: __token__
password: ${{ secrets.TOOLS_PYPI_PAK }}
Expand All @@ -41,9 +43,11 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: mamba-org/provision-with-micromamba@v15
- 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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
10 changes: 0 additions & 10 deletions .github/workflows/notify-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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)) }} }
2 changes: 1 addition & 1 deletion .github/workflows/release-template-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
permissions:
pull-requests: write
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
with:
release_prefix: HyP3 SDK
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: push

jobs:
call-flake8-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
with:
local_package_names: hyp3_sdk

call-secrets-analysis-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
2 changes: 1 addition & 1 deletion .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
call-bump-version-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ on:

jobs:
call-pytest-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].2
uses: ASFHyP3/actions/.github/workflows/[email protected].3
with:
local_package_name: hyp3_sdk
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 13 additions & 2 deletions src/hyp3_sdk/hyp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -353,6 +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 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
Expand All @@ -374,7 +379,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:
Expand All @@ -392,6 +398,11 @@ 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 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
"""
Expand Down
4 changes: 3 additions & 1 deletion tests/test_hyp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,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': {
Expand All @@ -290,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,
},
}

Expand Down

0 comments on commit 1870920

Please sign in to comment.