Skip to content

Commit

Permalink
Merge pull request #266 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v2.1.3
  • Loading branch information
forrestfwilliams authored Jan 31, 2025
2 parents 54de4fd + 13ec754 commit ac3f829
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# These owners will be requested for review when someone opens a pull request.
* @ASFHyP3/plugins
* @ASFHyP3/Tools
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.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.15.0
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/reusable-create-jira-issue.yml@v0.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.15.0
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
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 @@ -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.14.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.14.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.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.15.0
with:
release_prefix: HyP3 ISCE2
secrets:
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,12 +5,12 @@ on: push
jobs:
call-secrets-analysis-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.14.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.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.15.0

call-mypy-workflow:
# Docs: https://github.com/ASFHyP3/actions
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.14.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.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.15.0
with:
local_package_name: hyp3_isce2
python_versions: >-
["3.10", "3.11"]
call-version-info-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.14.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.14.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
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).

## [2.1.3]
### Changed
- Updated download URLs for Sentinel-1 AUX_CAL files.

## [2.1.2]
### Added
- Added `mypy` type checker to the [`static-analysis`](https://github.com/ASFHyP3/hyp3-isce2/blob/develop/.github/workflows/static-analysis.yml) workflow.
Expand Down
11 changes: 3 additions & 8 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
community a harassment-free experience for everyone.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
and healthy community.

## Our Standards

Expand Down Expand Up @@ -61,7 +56,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement by emailing the
development team at [[email protected]](mailto:[email protected]).
ASF APD/Tools team at [[email protected]](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,7 @@ warn_redundant_casts = true
warn_unreachable = true
strict_equality = true
check_untyped_defs = true
install_types = true
non_interactive = true
pretty = true
disable_error_code = ["import-untyped"]
4 changes: 2 additions & 2 deletions src/hyp3_isce2/burst.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import asf_search
import numpy as np
import requests
from isceobj.Sensor.TOPS.Sentinel1 import Sentinel1
from isceobj.TopsProc.runMergeBursts import multilook
from isceobj.Sensor.TOPS.Sentinel1 import Sentinel1 # type: ignore[import-not-found]
from isceobj.TopsProc.runMergeBursts import multilook # type: ignore[import-not-found]
from lxml import etree
from shapely import geometry

Expand Down
2 changes: 1 addition & 1 deletion src/hyp3_isce2/insar_tops.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from shutil import copyfile, make_archive

from hyp3lib.util import string_is_true
from isceobj.TopsProc.runMergeBursts import multilook
from isceobj.TopsProc.runMergeBursts import multilook # type: ignore[import-not-found]
from s1_orbits import fetch_for_scene

from hyp3_isce2 import packaging, slc, topsapp
Expand Down
4 changes: 2 additions & 2 deletions src/hyp3_isce2/insar_tops_burst.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from shutil import copyfile, make_archive
from typing import Optional

import isce # noqa
import isce # noqa: F401
from burst2safe.burst2safe import burst2safe
from hyp3lib.util import string_is_true
from isceobj.TopsProc.runMergeBursts import multilook
from isceobj.TopsProc.runMergeBursts import multilook # type: ignore[import-not-found]
from osgeo import gdal
from s1_orbits import fetch_for_scene

Expand Down
26 changes: 13 additions & 13 deletions src/hyp3_isce2/merge_tops_bursts.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@

import asf_search
import isce
import isceobj
import isceobj # type: ignore[import-not-found]
import lxml.etree as ET
import numpy as np
from contrib.Snaphu.Snaphu import Snaphu
from contrib.Snaphu.Snaphu import Snaphu # type: ignore[import-not-found]
from hyp3lib.util import string_is_true
from isceobj.Orbit.Orbit import Orbit
from isceobj.Planet.Planet import Planet
from isceobj.Sensor.TOPS.Sentinel1 import Sentinel1
from isceobj.TopsProc.runIon import maskUnwrap
from isceobj.TopsProc.runMergeBursts import mergeBox, mergeBursts2
from iscesys.Component import createTraitSeq
from iscesys.Component.ProductManager import ProductManager
from mroipac.filter.Filter import Filter
from mroipac.icu.Icu import Icu
from isceobj.Orbit.Orbit import Orbit # type: ignore[import-not-found]
from isceobj.Planet.Planet import Planet # type: ignore[import-not-found]
from isceobj.Sensor.TOPS.Sentinel1 import Sentinel1 # type: ignore[import-not-found]
from isceobj.TopsProc.runIon import maskUnwrap # type: ignore[import-not-found]
from isceobj.TopsProc.runMergeBursts import mergeBox, mergeBursts2 # type: ignore[import-not-found]
from iscesys.Component import createTraitSeq # type: ignore[import-not-found]
from iscesys.Component.ProductManager import ProductManager # type: ignore[import-not-found]
from mroipac.filter.Filter import Filter # type: ignore[import-not-found]
from mroipac.icu.Icu import Icu # type: ignore[import-not-found]
from osgeo import gdal
from shapely import geometry
from stdproc.rectify.geocode.Geocodable import Geocodable
from zerodop.geozero import createGeozero
from stdproc.rectify.geocode.Geocodable import Geocodable # type: ignore[import-not-found]
from zerodop.geozero import createGeozero # type: ignore[import-not-found]

import hyp3_isce2
import hyp3_isce2.burst as burst_utils
Expand Down
4 changes: 2 additions & 2 deletions src/hyp3_isce2/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def get_product_name(
lons, lats = footprint.exterior.coords.xy

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

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

lat_lims = [lat_string(lat) for lat in [np.min(lats), np.max(lats)]]
lon_lims = [lon_string(lon) for lon in [np.min(lons), np.max(lons)]]
Expand Down
10 changes: 7 additions & 3 deletions src/hyp3_isce2/s1_auxcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import requests


S1A_AUX_URL = 'https://sar-mpc.eu/download/55282da1-679d-4ecf-aeef-d06b024451cf'
S1B_AUX_URL = 'https://sar-mpc.eu/download/3c8b7c8d-d3de-4381-a19d-7611fb8734b9'
S1A_AUX_URL = 'https://sar-mpc.eu/files/S1A_AUX_CAL_20241128.zip'
S1B_AUX_URL = 'https://sar-mpc.eu/files/S1B_AUX_CAL_20241128.zip'


def _download_platform(url: str, aux_cal_dir: Path):
Expand All @@ -38,7 +38,11 @@ def _download_platform(url: str, aux_cal_dir: Path):

content = BytesIO(response.content)
with zipfile.ZipFile(content) as zip_file:
zip_file.extractall(aux_cal_dir)
for zip_info in zip_file.infolist():
# remove leading directories, i.e. extract S1A/AUX_CAL/2019/02/28/foo.SAFE/* to foo.SAFE/*
if not zip_info.is_dir() and '.SAFE/' in zip_info.filename:
zip_info.filename = '/'.join(zip_info.filename.split('/')[5:])
zip_file.extract(zip_info, aux_cal_dir)


def download_aux_cal(aux_cal_dir: Union[str, Path] = 'aux_cal'):
Expand Down
6 changes: 3 additions & 3 deletions src/hyp3_isce2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from pathlib import Path
from typing import Optional

import isceobj
import isceobj # type: ignore[import-not-found]
import numpy as np
from isceobj.Util.ImageUtil.ImageLib import loadImage
from iscesys.Component.ProductManager import ProductManager
from isceobj.Util.ImageUtil.ImageLib import loadImage # type: ignore[import-not-found]
from iscesys.Component.ProductManager import ProductManager # type: ignore[import-not-found]
from osgeo import gdal, osr


Expand Down
2 changes: 1 addition & 1 deletion tests/test_merge_tops_bursts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from unittest.mock import patch

import asf_search
import isceobj # noqa: I100
import isceobj # type: ignore[import-not-found]
import lxml.etree as ET
import numpy as np
import pytest
Expand Down
12 changes: 10 additions & 2 deletions tests/test_s1_auxcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ def test_download_aux_cal(tmp_path):
"""
aux_cal_dir = tmp_path / 'aux_cal'
s1_auxcal.download_aux_cal(aux_cal_dir)
assert (aux_cal_dir / 'S1A_AUX_CAL_V20190228T092500_G20210104T141310.SAFE').exists()
assert (aux_cal_dir / 'S1B_AUX_CAL_V20190514T090000_G20210104T140612.SAFE').exists()

assert (aux_cal_dir / 'S1A_AUX_CAL_V20150722T120000_G20151125T104733.SAFE/data/s1a-aux-cal.xml').exists()
assert (aux_cal_dir / 'S1A_AUX_CAL_V20150722T120000_G20151125T104733.SAFE/manifest.safe').exists()
assert (aux_cal_dir / 'S1A_AUX_CAL_V20150722T120000_G20151125T104733.SAFE/support/s1-object-types.xsd').exists()
assert (aux_cal_dir / 'S1A_AUX_CAL_V20150722T120000_G20151125T104733.SAFE/support/s1-aux-cal.xsd').exists()

assert (aux_cal_dir / 'S1B_AUX_CAL_V20160422T000000_G20160701T144618.SAFE/data/s1b-aux-cal.xml').exists()
assert (aux_cal_dir / 'S1B_AUX_CAL_V20160422T000000_G20160701T144618.SAFE/manifest.safe').exists()
assert (aux_cal_dir / 'S1B_AUX_CAL_V20160422T000000_G20160701T144618.SAFE/support/s1-object-types.xsd').exists()
assert (aux_cal_dir / 'S1B_AUX_CAL_V20160422T000000_G20160701T144618.SAFE/support/s1-aux-cal.xsd').exists()
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from unittest.mock import patch

import isceobj # noqa
import isceobj # type: ignore[import-not-found]
import numpy as np
from osgeo import gdal

Expand Down

0 comments on commit ac3f829

Please sign in to comment.