-
Notifications
You must be signed in to change notification settings - Fork 371
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
Globe instances default to WGS84 only if no args were passed #1588
base: main
Are you sure you want to change the base?
Conversation
Oops, just realised I had to fill in the CLA. Filled and signed. |
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.
You may need to rebase to fix CI.
lib/cartopy/tests/test_crs.py
Outdated
assert default_globe.ellipse == 'WGS84' | ||
|
||
eccentric_globe = ccrs.Globe(semimajor_axis=1000, semiminor_axis=500) | ||
assert not eccentric_globe.ellipse # would need revision with #330 |
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.
What does this mean? What kind of revision?
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.
If I understood #330 correctly, when #330 gets implemented, this unit test might start misbehaving, because the .ellipse
attribute might get set with some kind of default or whatever gets passed along from proj4
. The assert
statement would get invalidated in that case and would have to be revised, right?
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.
#330 is the opposite to this test; if you set an ellipse, then the other properties would be correctly returned.
Setting properties that happened to match an ellipse would not return an ellipse.
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 see! I'll simply remove the comment then.
cb55ace
to
80fe033
Compare
It appears there are many tests which expect this default ellipse and will have to add WGS84 explicitly. I guess this could also get a doc note. |
Got it, I'll investigate. Any pointers as to where that doc note should get added? |
Vlas Sokolov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Addresses #564.
As per title, the PR makes Globe instances default to WGS84 only if no args were passed. Regression test added as well. Looked like low-hanging fruit to me - are there some complications here I'm not aware of?