Skip to content

Commit

Permalink
Merge pull request #73 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v0.9.3
  • Loading branch information
williamh890 authored Jan 27, 2025
2 parents bd0830a + 35b0a4e commit 9d62bfc
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ on:
jobs:
call-changelog-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.15.0
2 changes: 1 addition & 1 deletion .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ on:
jobs:
call-labeled-pr-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.15.0
2 changes: 1 addition & 1 deletion .github/workflows/release-checklist-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
call-release-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.15.0
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 @@ -8,7 +8,7 @@ on:
jobs:
call-release-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.15.0
with:
release_prefix: HyP3 SRG
release_branch: main
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on: push
jobs:
call-secrets-analysis-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.15.0

call-ruff-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.15.0

call-mypy-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@v0.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@v0.15.0
2 changes: 1 addition & 1 deletion .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
call-bump-version-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.15.0
with:
user: tools-bot
email: [email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ on:
jobs:
call-pytest-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.15.0
with:
local_package_name: hyp3_srg
python_versions: >-
["3.10", "3.11", "3.12", "3.13"]
call-version-info-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.15.0
with:
python_version: "3.10"

call-docker-ghcr-workflow:
needs: call-version-info-workflow
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.15.0
with:
version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }}
release_branch: main
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ 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).

## [0.9.3]

### Removed
* Removed ability to pass [0, 0, 0, 0] as bounds

## [0.9.2]

### Added
Expand Down Expand Up @@ -46,7 +51,7 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.6.0]

### Changed
* Orbit files are now retrieved using `fetch_for_scene` from `s1_orbits`.
* Orbit files are now retrieved using `fetch_for_scene` from `s1_orbits`.
* ESA Credentials are no longer needed.

## [0.5.2]
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ warn_unused_ignores = true
warn_unreachable = true
strict_equality = true
check_untyped_defs = true
install_types = true
non_interactive = true
pretty = true
disable_error_code = ["import-untyped"]
5 changes: 3 additions & 2 deletions src/hyp3_srg/back_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create_product(work_dir) -> Path:
input_granules = [x.with_suffix('').name for x in work_dir.glob('S1*.SAFE')]
with open(parameter_file, 'w') as f:
f.write('Process: back-projection\n')
f.write(f"Input Granules: {', '.join(input_granules)}\n")
f.write(f'Input Granules: {", ".join(input_granules)}\n')

# We don't compress the data because SLC data is psuedo-random
with zipfile.ZipFile(zip_path, 'w', compression=zipfile.ZIP_STORED) as z:
Expand Down Expand Up @@ -126,9 +126,10 @@ def back_project(
bboxs.append(granule_bbox)
granule_orbit_pairs.append((granule_path, orbit_path))

if bounds is None or bounds == [0, 0, 0, 0]:
if bounds is None:
bounds = unary_union(bboxs).buffer(0.1).bounds
assert bounds is not None # Return type annotation for unary_union is incorrect

dem_path = dem.download_dem_for_srg(bounds, work_dir)
utils.create_param_file(dem_path, dem_path.with_suffix('.dem.rsc'), work_dir)

Expand Down
4 changes: 2 additions & 2 deletions src/hyp3_srg/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ def create_time_series_product_name(
latest_granule = start_dates[-1]

def lat_string(lat):
return ('N' if lat >= 0 else 'S') + f"{('%.1f' % abs(lat)).zfill(4)}".replace('.', '_')
return ('N' if lat >= 0 else 'S') + f'{("%.1f" % abs(lat)).zfill(4)}'.replace('.', '_')

def lon_string(lon):
return ('E' if lon >= 0 else 'W') + f"{('%.1f' % abs(lon)).zfill(5)}".replace('.', '_')
return ('E' if lon >= 0 else 'W') + f'{("%.1f" % abs(lon)).zfill(5)}'.replace('.', '_')

return '_'.join(
[
Expand Down

0 comments on commit 9d62bfc

Please sign in to comment.