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

Globe instances default to WGS84 only if no args were passed #1588

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vlas-sokolov
Copy link

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?

@SciTools-assistant SciTools-assistant added the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Jun 19, 2020
@vlas-sokolov
Copy link
Author

Oops, just realised I had to fill in the CLA. Filled and signed.

@SciTools-assistant SciTools-assistant removed the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Jun 20, 2020
Copy link
Member

@QuLogic QuLogic left a 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.

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
Copy link
Member

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?

Copy link
Author

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?

Copy link
Member

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.

Copy link
Author

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.

@QuLogic
Copy link
Member

QuLogic commented Aug 27, 2020

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.

@vlas-sokolov
Copy link
Author

Got it, I'll investigate. Any pointers as to where that doc note should get added?

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

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.

5 participants