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

lazy load station_info only when used #1320 #1840

Merged
merged 1 commit into from Apr 29, 2021

Conversation

akrherz
Copy link
Contributor

@akrherz akrherz commented Apr 29, 2021

Description Of Changes

Presently, the import of metpy.io.station_data causes four station tables to always be loaded, which cascades into making POOCH requests if necessary. This change makes the loading of station table data lazy and only when necessary to fulfill a lookup request. No functional change.

Checklist

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for sending it in!

@dopplershift dopplershift added Area: IO Pertains to reading data Type: Enhancement Enhancement to existing functionality labels Apr 29, 2021
@dopplershift dopplershift added this to the 1.1.0 milestone Apr 29, 2021
@dopplershift dopplershift merged commit 879fdf7 into Unidata:main Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: IO Pertains to reading data Type: Enhancement Enhancement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants