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

Make CartoPy import more robust #1577

Merged
merged 1 commit into from Nov 20, 2020
Merged

Conversation

dopplershift
Copy link
Member

@dopplershift dopplershift commented Nov 20, 2020

Description Of Changes

Instead of just importing cartopy.feature, explicitly import the two names we need. The result is that on older Cartopy, where Scaler is unavailable, we fail cleanly (and not interrupting users) as if CartoPy is not installed rather than failing hard when creating our map features--which allows users with old CartoPy to still use e.g. SkewT.

No tests because there's no obvious way to do so.

Checklist

Instead of just importing cartopy.feature, explicitly import the two
names we need. The result is that on older Cartopy, where Scaler is
unavailable, we fail as if CartoPy is not installed rather than failing
when creating our map features--which allows users with old CartoPy to
still use e.g. SkewT.

No tests because there's not obvious way to do so.
@dopplershift dopplershift added Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality labels Nov 20, 2020
@dopplershift dopplershift added this to the 1.0 milestone Nov 20, 2020
@dopplershift dopplershift added Area: Infrastructure Pertains to project infrastructure (e.g. CI, linting) Type: Bug Something is not working like it should and removed Type: Enhancement Enhancement to existing functionality labels Nov 20, 2020
@dopplershift dopplershift merged commit c880e64 into Unidata:master Nov 20, 2020
@dopplershift dopplershift deleted the fix-1550 branch November 20, 2020 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Infrastructure Pertains to project infrastructure (e.g. CI, linting) Area: Plots Pertains to producing plots Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crashing with CartoPy 0.14.1
2 participants