Skip to content

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

Merged
seisman merged 4 commits into
mainfrom
refactor/accessor
Oct 7, 2024
Merged

GMTDataArrayAccessor: Simplify the codes for the grid registration and gtype during initialization#3483
seisman merged 4 commits into
mainfrom
refactor/accessor

Conversation

@seisman

@seismanseisman commented Oct 3, 2024

Copy link
Copy Markdown
Member

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.

@seismanseisman 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
@seismanseisman added this to the 0.14.0 milestone Oct 3, 2024
@seisman
seisman requested a review from a teamOctober 5, 2024 15:31
@seismanseisman 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
Copy Markdown
MemberAuthor

Will merge in 24 hours.

Comment threadpygmt/accessors.py Outdated
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Comment threadpygmt/accessors.py Outdated
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@seisman
seisman merged commit bc675ca into mainOct 7, 2024
@seisman
seisman deleted the refactor/accessor branch October 7, 2024 03:11
@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 7, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenanceBoring but important stuff for the core devsskip-changelogSkip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@seisman@weiji14@yvonnefroehlich