Skip to content
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

Add enums GridRegistration and GridType for grid registration and type #3693

Merged
merged 7 commits into from
Dec 19, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Dec 17, 2024

This PR adds the enums GridRegistration and GridType for grid registration and type.

In #3449, we added the enums GridFormat, but we didn't add it to the API documentation, because we didn't find a good way to display the enums (see comments in PR #3449). This PR makes the docs work by adding a new autosummary template for enums.

Preview:

References:

@seisman seisman added the documentation Improvements or additions to documentation label Dec 17, 2024
@seisman seisman added this to the 0.14.0 milestone Dec 17, 2024
@seisman seisman added the needs review This PR has higher priority and needs review. label Dec 18, 2024
@michaelgrund michaelgrund 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 Dec 18, 2024
@weiji14
Copy link
Member

weiji14 commented Dec 19, 2024

Ok with the enum API style, but before approving, I want to check that we actually want to expose the GridFormat enum to users? In #3449 (comment), I thought we decided not to include GridFormat, but document GridRegistration and GridType (suggested in #499 (comment))?

@seisman
Copy link
Member Author

seisman commented Dec 19, 2024

Ok with the enum API style, but before approving, I want to check that we actually want to expose the GridFormat enum to users? In #3449 (comment), I thought we decided not to include GridFormat, but document GridRegistration and GridType (suggested in #499 (comment))?

We don't have to document GridFormat here. I've cherry-picked the changes in #3696 (New enums GridReg and GridType) into this PR so that this PR can be reused.

@seisman seisman added enhancement Improving an existing feature and removed final review call This PR requires final review and approval from a second reviewer documentation Improvements or additions to documentation labels Dec 19, 2024
@seisman seisman changed the title Add enums to the API documentation Add enums GridReg and GridType for grid registration and coordinate system Dec 19, 2024
pygmt/enums.py Outdated
@@ -37,3 +37,21 @@ class GridFormat(IntEnum):
GD = 22 #: Import through GDAL
EI = 23 #: ESRI Arc/Info ASCII Grid Interchange format (ASCII integer)
EF = 24 #: ESRI Arc/Info ASCII Grid Interchange format (ASCII float)


class GridReg(IntEnum):
Copy link
Member Author

Choose a reason for hiding this comment

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

GridReg or GridRegistration?

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer GridRegistration

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, renamed to GridRegistration in this PR.

@seisman seisman changed the title Add enums GridReg and GridType for grid registration and coordinate system Add enums GridRegistration and GridType for grid registration and coordinate system Dec 19, 2024
@seisman seisman changed the title Add enums GridRegistration and GridType for grid registration and coordinate system Add enums GridRegistration and GridType for grid registration and type Dec 19, 2024
@seisman seisman mentioned this pull request Dec 19, 2024
49 tasks
@seisman seisman merged commit 8fab7c3 into main Dec 19, 2024
20 of 21 checks passed
@seisman seisman deleted the doc/enums branch December 19, 2024 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants