From 5d9d8f284ec0c86c6ffe2a5ec8d6ac5f43cf7f15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 14:23:15 +0000 Subject: [PATCH 1/3] Bump ruff from 0.12.9 to 0.12.10 in the pip-deps group Bumps the pip-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.12.9 to 0.12.10 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.12.9...0.12.10) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip-deps ... Signed-off-by: dependabot[bot] --- requirements-static.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-static.txt b/requirements-static.txt index 6d5c5e5..6cf968c 100644 --- a/requirements-static.txt +++ b/requirements-static.txt @@ -1,4 +1,4 @@ -ruff==0.12.9 +ruff==0.12.10 mypy==1.17.1 lxml-stubs types-shapely From 957c782d585c6a7755f3929a31117625848d08dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 15:37:32 +0000 Subject: [PATCH 2/3] Bump ruff from 0.12.10 to 0.12.11 in the pip-deps group Bumps the pip-deps group with 1 update: [ruff](https://github.com/astral-sh/ruff). Updates `ruff` from 0.12.10 to 0.12.11 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.12.10...0.12.11) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip-deps ... Signed-off-by: dependabot[bot] --- requirements-static.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-static.txt b/requirements-static.txt index 6cf968c..aa45271 100644 --- a/requirements-static.txt +++ b/requirements-static.txt @@ -1,4 +1,4 @@ -ruff==0.12.10 +ruff==0.12.11 mypy==1.17.1 lxml-stubs types-shapely From 17e30e4581423fe7df7546a87281664ad82a62a7 Mon Sep 17 00:00:00 2001 From: Andrew Johnston Date: Thu, 4 Sep 2025 12:37:39 -0800 Subject: [PATCH 3/3] remove unproductive prep_rtc.validate_slc function --- CHANGELOG.md | 5 +++++ src/hyp3_opera_rtc/prep_rtc.py | 16 ---------------- tests/test_prep_rtc.py | 3 +-- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e669970..68b140d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.1.9] + +### Fixed +- Removed unproductive `prep_rtc.validate_slc` function. Fixes https://github.com/ASFHyP3/hyp3-OPERA-RTC/issues/102. + ## [0.1.8] ### Fixed diff --git a/src/hyp3_opera_rtc/prep_rtc.py b/src/hyp3_opera_rtc/prep_rtc.py index ccfcdd8..d3fd76b 100644 --- a/src/hyp3_opera_rtc/prep_rtc.py +++ b/src/hyp3_opera_rtc/prep_rtc.py @@ -96,21 +96,6 @@ def parse_response_for_burst_params(response: dict) -> tuple[str, str]: return source_slc, f't{opera_burst_id.lower()}' -def validate_slc(granule: str) -> str: - pol = granule.split('_')[4][2:4] - if pol in {'VH', 'HV'}: - raise ValueError(f'{granule} has polarization {pol}, must be VV or HH') - - response = query_cmr( - (('short_name', 'SENTINEL-1*'), ('options[short_name][pattern]', 'true'), ('granule_ur', f'{granule}-SLC')) - ) - granule_exists = bool(response['items']) - if not granule_exists: - raise ValueError(f'Granule does not exist: {granule}') - - return granule - - def query_cmr(params: tuple) -> dict: response = requests.get(CMR_URL, params=params) response.raise_for_status() @@ -157,7 +142,6 @@ def prep_rtc( if co_pol_granule.endswith('BURST'): source_slc, opera_burst_id = get_burst_params(co_pol_granule) else: - validate_slc(co_pol_granule) source_slc, opera_burst_id = co_pol_granule, None safe_path = download_file(get_download_url(source_slc), directory=str(input_dir), chunk_size=10485760) diff --git a/tests/test_prep_rtc.py b/tests/test_prep_rtc.py index a1fe826..345d6ef 100644 --- a/tests/test_prep_rtc.py +++ b/tests/test_prep_rtc.py @@ -89,6 +89,5 @@ def test_get_cross_pol_name(): @pytest.mark.skip -def test_get_granule_params(): +def test_get_burst_params(): prep_rtc.get_burst_params('S1_146160_IW1_20241029T095958_VV_592B-BURST') - prep_rtc.validate_slc('S1A_IW_SLC__1SDV_20250704T124517_20250704T124544_059934_0771EA_C208')