Skip to content

Conversation

rogerkuou
Copy link
Member

@rogerkuou rogerkuou commented Jul 14, 2025

Add functionalities to read res file metadata generated by doris v4 or v5.

Example files and file strutures are included as test data files under tests/data/metadata)

@rogerkuou rogerkuou requested a review from Copilot July 15, 2025 18:16
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionalities to read metadata files from DORIS v4 and v5 corregistration software outputs. The implementation includes a new read_metadata function that can parse metadata from .res files generated by both DORIS versions, handling different file formats and patterns.

  • Add read_metadata function to parse DORIS v4/v5 metadata files with configurable drivers
  • Define regular expression patterns and metadata key configurations for both DORIS versions
  • Include comprehensive test coverage for both DORIS v4 and v5 metadata reading scenarios

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sarxarray/_io.py Implements main metadata reading functionality with driver-specific parsers
sarxarray/conf.py Defines regex patterns and metadata key configurations for DORIS v4/v5
sarxarray/init.py Exports the new read_metadata function
tests/test_io.py Adds comprehensive test cases for metadata reading functionality
docs/data_loading.md Documents usage examples for both DORIS versions
.github/workflows/sonarcloud.yml Updates CI workflow to include test coverage
Comments suppressed due to low confidence (1)

docs/data_loading.md:86

  • The variable name 'tsx_folder' is inconsistent with the defined 'stack_folder' variable above. It should be 'stack_folder.glob()' for consistency.
res_file_list = list(tsx_folder.glob('???????/slave.res'))

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rogerkuou rogerkuou marked this pull request as ready for review July 15, 2025 18:19
@rogerkuou rogerkuou requested a review from fnattino July 15, 2025 18:25
@rogerkuou
Copy link
Member Author

@fnattino sorry for the delay! Can you help me review this PR?

This is regarding reading two types of metadata from Doris. I included the examples in test/data/metadata

Copy link
Contributor

@fnattino fnattino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rogerkuou, very nicely written and documented, very clear! I have left a couple of suggestions. Maybe these things do not make sense in the optics of the people that will actually make use of it, so feel free to discard any comment..

@rogerkuou
Copy link
Member Author

Hi @fnattino, I adapted most of your comments. Can you give another look when you have time? Thanks a lot for your review!

@rogerkuou rogerkuou requested a review from fnattino July 18, 2025 14:25
Copy link
Contributor

@fnattino fnattino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very minor (and probably un-necessary 🙂) suggestion - feel free to merge otherwise!

Copy link

@rogerkuou rogerkuou merged commit afdc397 into main Jul 21, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants