diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc4d13e32..7acedf67d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,13 +12,13 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.3 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.11.0 with: python_version: '3.10' call-docker-ghcr-workflow: needs: call-version-info-workflow - uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.8.3 + uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.11.0 with: version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }} release_branch: main diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 369b918a5..3c605126a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -13,6 +13,6 @@ on: jobs: call-changelog-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.3 + uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.11.0 secrets: USER_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labeled-pr.yml b/.github/workflows/labeled-pr.yml index 103ae29a7..66ba502e7 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.3 + uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.11.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 310ea6db4..4747db67e 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.3 + uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.11.0 with: release_prefix: RAiDER develop_branch: dev diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index f2328e9c7..62356a60a 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -7,7 +7,7 @@ on: jobs: call-bump-version-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.3 + uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.11.0 with: user: dbekaert email: bekaertdavid@gmail.com diff --git a/CHANGELOG.md b/CHANGELOG.md index 598687cb8..145b0cb76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ 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.4.7] +### Fixed +* [617](https://github.com/dbekaert/RAiDER/issues/617) - RAiDER created `.netrc` is too permissive +* [622](https://github.com/dbekaert/RAiDER/issues/617) - RAiDER's call to sentineleof needs to have missions and times have same length. + ## [0.4.6] ### Added diff --git a/test/test_s1_orbits.py b/test/test_s1_orbits.py index 2c7c8c8e6..424b333a2 100644 --- a/test/test_s1_orbits.py +++ b/test/test_s1_orbits.py @@ -94,7 +94,9 @@ def test_get_orbits_from_slc_ids(mocker): assert orbit_files == [Path('foo.txt')] assert eof.download.download_eofs.call_count == 1 eof.download.download_eofs.assert_called_with( - [ '20150621T120220', '20150621T120232'], ['S1A'], save_dir=str(Path.cwd()) + [ '20150621T120220', '20150621T120232'], + ['S1A'] * 2, + save_dir=str(Path.cwd()) ) orbit_files = s1_orbits.get_orbits_from_slc_ids( @@ -104,7 +106,7 @@ def test_get_orbits_from_slc_ids(mocker): assert orbit_files == [Path('bar.txt'), Path('fiz.txt')] assert eof.download.download_eofs.call_count == 2 eof.download.download_eofs.assert_called_with( - ['20201115T162313', '20201115T162340', '20201203T162353', '20201203T162420'], - ['S1A', 'S1B'], + ['20201115T162313', '20201203T162353', '20201115T162340', '20201203T162420'], + ['S1B', 'S1A'] * 2, save_dir=str(Path.cwd()) ) diff --git a/tools/RAiDER/s1_orbits.py b/tools/RAiDER/s1_orbits.py index 3aaa278a0..18b852f43 100644 --- a/tools/RAiDER/s1_orbits.py +++ b/tools/RAiDER/s1_orbits.py @@ -29,7 +29,7 @@ def ensure_orbit_credentials() -> Optional[int]: # netrc needs a netrc file; if missing create an empty one. if not netrc_file.exists(): - netrc_file.touch() + netrc_file.touch(mode=0o600) netrc_credentials = netrc.netrc(netrc_file) if ESA_CDSE_HOST in netrc_credentials.hosts: @@ -55,14 +55,10 @@ def get_orbits_from_slc_ids(slc_ids: List[str], directory=Path.cwd()) -> List[Pa """ _ = ensure_orbit_credentials() - missions = {slc_id[0:3] for slc_id in slc_ids} - start_times = {re.split(r'_+', slc_id)[4] for slc_id in slc_ids} - stop_times = {re.split(r'_+', slc_id)[5] for slc_id in slc_ids} - - orb_files = eof.download.download_eofs( - sorted(list(start_times | stop_times)), - sorted(list(missions)), - save_dir=str(directory) - ) + missions = [slc_id[0:3] for slc_id in slc_ids] + start_times = [re.split(r'_+', slc_id)[4] for slc_id in slc_ids] + stop_times = [re.split(r'_+', slc_id)[5] for slc_id in slc_ids] + + orb_files = eof.download.download_eofs(start_times + stop_times, missions * 2, save_dir=str(directory)) return orb_files