Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ 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.7]

### Fixed

- Fix lineage statement replacement to keep ISO XML file formatted the same as original file

## [0.1.6]

### Added
Expand Down
2 changes: 1 addition & 1 deletion requirements-static.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruff==0.12.7
ruff==0.12.9
mypy==1.17.1
lxml-stubs
types-shapely
Expand Down
12 changes: 10 additions & 2 deletions src/hyp3_opera_rtc/upload_rtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,17 @@ def update_xml_with_asf_lineage(xml_path: Path) -> None:
lineage = lineage_search[0]
version = hyp3_opera_rtc.__version__
assert lineage.text is not None
lineage.text = f'{lineage.text.replace("JPL", "ASF")} via HyP3 OPERA-RTC v{version}'

iso_tree.write(str(xml_path))
old_lineage = lineage.text
new_lineage = f'{old_lineage.replace("JPL", "ASF")} via HyP3 OPERA-RTC v{version}'

with xml_path.open('r') as f:
xml_text = f.read()

updated_xml = xml_text.replace(old_lineage, new_lineage)

with xml_path.open('w') as f:
f.write(updated_xml)


def main() -> None:
Expand Down
Loading
Loading