GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pygmt.datasets.load_*: Add autocompletion support for the 'resolution' parameter by seisman · Pull Request #3260 · GenericMappingTools/pygmt

Conversation

@seisman

@seisman seisman commented May 19, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Description of proposed changes

This PR adds type hints to the resolution parameter of the load_** functions, so that editors can autocomplete the resolution parameter.

Preview:https://pygmt-dev--3260.org.readthedocs.build/en/3260/api/generated/pygmt.datasets.load_earth_relief.html

image
  • Pros: autocompletion for the resolution parameter.
  • Cons: The function definition is much longer.

@GenericMappingTools/pygmt-maintainers What do you think?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@seisman
Datasets: Add type hints for the resolution parameter
5b3c5fc
@seisman

seisman commented May 23, 2024

Copy link
Copy Markdown
Member Author

Ping @GenericMappingTools/pygmt-maintainers for comments.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

seisman
seisman commented May 23, 2024
View reviewed changes
Comment thread pygmt/datasets/earth_relief.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

seisman added 2 commits May 23, 2024 23:10
@seisman
Update more functions
9625b75
@seisman
Merge branch 'main' into typing/resolution
e82bbaf
@seisman seisman added enhancement Improving an existing feature needs review This PR has higher priority and needs review. labels May 23, 2024
@seisman seisman changed the title POC: Datasets: Add type hints for the resolution parameter Datasets: Add type hints for the resolution parameter May 23, 2024
@seisman
seisman marked this pull request as ready for review May 23, 2024 15:12
@seisman seisman added this to the 0.13.0 milestone May 23, 2024
michaelgrund
michaelgrund approved these changes May 24, 2024
View reviewed changes
@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 May 24, 2024
yvonnefroehlich
yvonnefroehlich approved these changes May 24, 2024
View reviewed changes

@yvonnefroehlich yvonnefroehlich left a comment

Copy link
Copy Markdown
Member

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.

I thinks the autocompletion for the resolution parameter is an improvement, as the available resolutions differ between the datasets.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pygmt/datasets/earth_magnetic_anomaly.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pygmt/datasets/earth_relief.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@seisman @yvonnefroehlich
Update pygmt/datasets/earth_magnetic_anomaly.py
88a7dd3
Co-authored-by: Yvonne Fröhlich <[email protected]>
@seisman seisman changed the title Datasets: Add type hints for the resolution parameter pygmt.datasets.load_*: Add autocompletion support for the 'resolution' parameter May 24, 2024
@seisman
seisman merged commit 897444a into main May 25, 2024
@seisman
seisman deleted the typing/resolution branch May 25, 2024 00:35
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label May 25, 2024
weiji14 added a commit that referenced this pull request Sep 28, 2024
@weiji14
Add type hints to resolution and region parameters
e6c2964
Following changes at #3260 and #3272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@michaelgrund michaelgrund michaelgrund approved these changes
@yvonnefroehlich yvonnefroehlich yvonnefroehlich approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement Improving an existing feature

Projects

None yet

Milestone

0.13.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@seisman @michaelgrund @yvonnefroehlich
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.