-
Notifications
You must be signed in to change notification settings - Fork 220
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
TYP: Add type hints support for pygmt.datasets.load_sample_data #2859
Conversation
def load_sample_data( | ||
name: Literal[ | ||
"bathymetry", | ||
"earth_relief_holes", | ||
"fractures", | ||
"hotspots", | ||
"japan_quakes", | ||
"mars_shape", | ||
"maunaloa_co2", | ||
"notre_dame_topography", | ||
"ocean_ridge_points", | ||
"rock_compositions", | ||
"usgs_quakes", | ||
], | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far in line 313 (currently) or 324 (after this PR):
pygmt/pygmt/datasets/samples.py
Lines 311 to 315 in 09f2452
Parameters | |
---------- | |
name : str | |
Name of the dataset to load. | |
was not changed to
name
Analogous as done for data_source
in PR #2849.
pygmt/pygmt/datasets/earth_relief.py
Lines 77 to 81 in 09f2452
for all resolutions except ``"15s"`` which is ``"pixel"`` only. | |
data_source | |
Select the source for the Earth relief data. Available options are: | |
Or was this intended because the list of available input names is a bit longer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 10a7ce4. Now it looks like:
Yes, it's a little bit longer, but I feel it's still acceptable.
Description of proposed changes
Address #2812.
Preview: https://pygmt-dev--2859.org.readthedocs.build/en/2859/api/generated/pygmt.datasets.load_sample_data.html#pygmt.datasets.load_sample_data
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version