Skip to content

GMTDataArrayAccessor: Simplify the codes for the grid registration and gtype during initialization #3483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Oct 3, 2024

Description of proposed changes

Instead of using the complicated if-else and try-except statements, this PR refactors the codes by initializing grid registration and gtype to the default values first and then see if we can determine their values using grdinfo.

The original codes were added in #500 and #2009.

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Oct 3, 2024
@seisman seisman added this to the 0.14.0 milestone Oct 3, 2024
@seisman seisman force-pushed the refactor/accessor branch from 3eb1b30 to 0ef8b0c Compare October 3, 2024 13:11
@seisman seisman requested a review from a team October 5, 2024 15:31
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Oct 6, 2024
@seisman
Copy link
Member Author

seisman commented Oct 6, 2024

Will merge in 24 hours.

Co-authored-by: Yvonne Fröhlich <[email protected]>
@seisman seisman merged commit bc675ca into main Oct 7, 2024
4 of 5 checks passed
@seisman seisman deleted the refactor/accessor branch October 7, 2024 03:11
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants