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

Fix bug in centroids natural earth feature test #768

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

peanutfun
Copy link
Member

@peanutfun peanutfun commented Aug 10, 2023

Changes proposed in this PR:

  • Correctly pass a list to the function
  • Correctly check consistency of input arrays (allclose could also throw errors if the arrays had a wrong size, but this was not accounted for)

The original test incorrectly checked for a ValueError: The natural_earth method would return a string (which was iterable), and a ValueError was thrown because a file could not be read from a single character...

This PR fixes the broken pipeline in develop

PR Author Checklist

PR Reviewer Checklist

* Pass argument as list.
* Make sure `allclose` does not throw a broadcasting error.
@peanutfun
Copy link
Member Author

@emanuel-schmid The pipeline error message (see https://github.com/CLIMADA-project/climada_python/runs/15783776821) only occurs for cartopy v0.22, because the cartopy functions now return a PosixPath, rather than a string. Was cartopy automatically updated on Jenkins? I could replicate the error after updating cartopy to v0.22. For v0.21, everything works well.

@emanuel-schmid emanuel-schmid merged commit bf30646 into develop Aug 10, 2023
@emanuel-schmid
Copy link
Collaborator

🙌

@emanuel-schmid emanuel-schmid deleted the bugfix/centroids-natural-earth-test branch August 10, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants