Skip to content

Commit

Permalink
Merge pull request #625 from dbekaert/dev
Browse files Browse the repository at this point in the history
v0.4.7
  • Loading branch information
jlmaurer authored Feb 20, 2024
2 parents 38eab39 + 835bfda commit 85a26cd
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions test/test_s1_orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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())
)
16 changes: 6 additions & 10 deletions tools/RAiDER/s1_orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 85a26cd

Please sign in to comment.