Skip to content

Commit 85a26cd

Browse files
authored
Merge pull request #625 from dbekaert/dev
v0.4.7
2 parents 38eab39 + 835bfda commit 85a26cd

File tree

8 files changed

+22
-19
lines changed

8 files changed

+22
-19
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ on:
1212

1313
jobs:
1414
call-version-info-workflow:
15-
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.3
15+
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.11.0
1616
with:
1717
python_version: '3.10'
1818

1919
call-docker-ghcr-workflow:
2020
needs: call-version-info-workflow
21-
uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.8.3
21+
uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.11.0
2222
with:
2323
version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }}
2424
release_branch: main

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ on:
1313

1414
jobs:
1515
call-changelog-check-workflow:
16-
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.3
16+
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.11.0
1717
secrets:
1818
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/labeled-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ on:
1212

1313
jobs:
1414
call-labeled-pr-check-workflow:
15-
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.3
15+
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.11.0

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
call-release-workflow:
10-
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.3
10+
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.11.0
1111
with:
1212
release_prefix: RAiDER
1313
develop_branch: dev

.github/workflows/tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
call-bump-version-workflow:
10-
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.3
10+
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.11.0
1111
with:
1212
user: dbekaert
1313
email: bekaertdavid@gmail.com

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

99

10+
## [0.4.7]
11+
### Fixed
12+
* [617](https://github.com/dbekaert/RAiDER/issues/617) - RAiDER created `.netrc` is too permissive
13+
* [622](https://github.com/dbekaert/RAiDER/issues/617) - RAiDER's call to sentineleof needs to have missions and times have same length.
14+
1015
## [0.4.6]
1116

1217
### Added

test/test_s1_orbits.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ def test_get_orbits_from_slc_ids(mocker):
9494
assert orbit_files == [Path('foo.txt')]
9595
assert eof.download.download_eofs.call_count == 1
9696
eof.download.download_eofs.assert_called_with(
97-
[ '20150621T120220', '20150621T120232'], ['S1A'], save_dir=str(Path.cwd())
97+
[ '20150621T120220', '20150621T120232'],
98+
['S1A'] * 2,
99+
save_dir=str(Path.cwd())
98100
)
99101

100102
orbit_files = s1_orbits.get_orbits_from_slc_ids(
@@ -104,7 +106,7 @@ def test_get_orbits_from_slc_ids(mocker):
104106
assert orbit_files == [Path('bar.txt'), Path('fiz.txt')]
105107
assert eof.download.download_eofs.call_count == 2
106108
eof.download.download_eofs.assert_called_with(
107-
['20201115T162313', '20201115T162340', '20201203T162353', '20201203T162420'],
108-
['S1A', 'S1B'],
109+
['20201115T162313', '20201203T162353', '20201115T162340', '20201203T162420'],
110+
['S1B', 'S1A'] * 2,
109111
save_dir=str(Path.cwd())
110112
)

tools/RAiDER/s1_orbits.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def ensure_orbit_credentials() -> Optional[int]:
2929

3030
# netrc needs a netrc file; if missing create an empty one.
3131
if not netrc_file.exists():
32-
netrc_file.touch()
32+
netrc_file.touch(mode=0o600)
3333

3434
netrc_credentials = netrc.netrc(netrc_file)
3535
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
5555
"""
5656
_ = ensure_orbit_credentials()
5757

58-
missions = {slc_id[0:3] for slc_id in slc_ids}
59-
start_times = {re.split(r'_+', slc_id)[4] for slc_id in slc_ids}
60-
stop_times = {re.split(r'_+', slc_id)[5] for slc_id in slc_ids}
61-
62-
orb_files = eof.download.download_eofs(
63-
sorted(list(start_times | stop_times)),
64-
sorted(list(missions)),
65-
save_dir=str(directory)
66-
)
58+
missions = [slc_id[0:3] for slc_id in slc_ids]
59+
start_times = [re.split(r'_+', slc_id)[4] for slc_id in slc_ids]
60+
stop_times = [re.split(r'_+', slc_id)[5] for slc_id in slc_ids]
61+
62+
orb_files = eof.download.download_eofs(start_times + stop_times, missions * 2, save_dir=str(directory))
6763

6864
return orb_files

0 commit comments

Comments
 (0)