-
-
Notifications
You must be signed in to change notification settings - Fork 2k
EarthLocation touchup's, mostly in documentation #2346
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
Conversation
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.
Add a one-line description to this attribute.
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.
Hmm, embarrassing that I missed the new one! But now corrected.
|
The available ellipsoids are listed in two docstrings, but no reference is given. Maybe expose via |
|
You're very close to 100% test coverage for this class ... might as well cover these two lines: 220 and 255? Does it make sense to have PS: sorry if I'm pointing out things that have been discussed already ... I haven't followed the coordinates discussions in the past months ... feel free to ignore me. |
|
This error message is a bit cryptic, no? The reason is How about adding an |
|
@cdeil - it is worrying how many things get caught by another review... Anyway, I think I implemented all your suggestions (except that I refer to |
|
p.s. I did not have an |
|
IMO explicit is better than implicit and the current initialisation API should be changed:
@mhvk Is renaming Otherwise this PR addresses all the comments I made, so 👍 to merging it, but someone that knows coordinates and the plans with this class well should still review it. @eteq? |
|
@cdeil - changing the initialisation goes a bit beyond the "touch-up" I hoped to do here -- we had quite a bit of discussion in #1928 and I would like to keep the option to initialise with geodetic coordinates. However, if there is an alternative that would easily allow that and is clearer, do let me know!. Short of that, would it help to explicitly list the initialisation parameters in the class docstring? |
|
My suggestion was to remove the current For my taste there's too much magic going on trying to guess user inputs in There was a discussion on astropy-dev on how to input quantities, and I think the conclusion (at least the last people that spoke up) was to only accept Playing with But @mhvk, I completely agree that these fundamental questions whether |
|
@cdeil - I agree that subclassing from Your comments got me thinking again about [1] https://github.com/eteq/astropy/tree/coordinates-ape5 |
EarthLocation touchup's, mostly in documentation
|
@eteq I'll leave the creation of new issues / PRs on this to you and @mhvk ... I really haven't followed the coordinates work and don't think it would be very useful for me to make an issue trying to describe some small part of this work. But I promise to complain again before if @mhvk Thanks for listening to my comments from the peanut gallery. |
|
Sounds like a plan! |
|
@cdeil, @eteq - I've looked a little more and now are tending the other way again, thinking that really it is nice if one can initialize with angles directly; it is after all pretty unambiguous, and much of coordinates seem to work similarly (though this is changing somewhat). But I wondered if at least an update of the class docstring would help, as it would explain the parameters expected by default. What do you think of the following? (Note that unlike, e.g., |
|
@mhvk - I like the idea, but its a bit confusing that you say Also, in this form |
|
@mhvk As I said, I'd prefer to resolve the ambiguities in the initialisation by only allowing initialisation from geodetic coordinates via |
Mostly dots at the ends of sentences in the documentation, but also removed
__eq__,__ne__(not needed anymore given #2328), and madeellipsoida private properly, ensuring that it gets passed on when slices are made.This is still pending discussion whether the arguments to the
from_geodeticclass method should have the long names; see #1928.