-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix SkyCoord creation from other SkyCoords improperly copying frame attributes #6448
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
|
Hi there @eteq 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labelled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. Everything looks good from my point of view! 👍 |
|
@eteq - it should be possible to do this more easily - for things like slicing, similar problems were found, and this was solved by keeping track of attributes that are not part of the current frame in |
|
Separate but related: for some of our packages, the design has now become sufficiently complicated that I think it might start to make sense to explicitly document design - @astrofrog suggested that in #4821 for modelling (but sadly discussion of where to put it meant that PR was never merged...). This is also useful for users who want to understand the internals. |
|
Thanks for pointing that out @mhvk - definitely better to use that! The commits I pushed up do that, as well as fixing some problems travis failures revealed. (as a related aside... I'm looking forward to not having to support py 2.x any more 😉) @mhvk, also note the last commit (2c458f1), which is a cosmetic change that I think makes it a bit easier to understand what
Quite possibly true. Coordinates has this to some extent in the form of the concept overview, and the coordinates APE but perhaps that's less technical then what you had in mind? The big concern I have with that sort of technical docs is then you have to keep it up-to-date when the code changes, so arguably it's better to use comments for this sort of thing. But there's certainly a happy medium where very-unlikely-to-change bits end up in design docs. |
|
👍 on clarifying the name. But, with no intent to bikeshed, maybe make it OK, will now look at the functional side... |
mhvk
left a comment
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.
This looks all OK - the real change is now nicely minimal!
|
Separately, on a "design document": I indeed was thinking about technical implementation more than overall design. I agree that the risk of any description not being updated is large, and in that respect like the original idea of having it be close to the code (but typeset by sphinx). One perhaps not so silly option is to start using the docstring of each module/file for this purpose (think of the |
|
p.s. The failure looks real but unrelated. |
|
LGTM as well - merge if you're happy @eteq |
|
Is this related in a way to #6462? |
|
Did a quick merge commit - assuming all passes after that, this is ready to merge - whoever sees it first (and has rights) should feel free to hit the button. Re #6448 about the "design document": I like that idea of doing it in the docstrings! It's still potentially worth putting some things in the docs, but I think we want to try to restrict that to things we think are over-arching or require complex diagrams or similar. Maybe we should have an issue to track this(i.e. either docstring or doc tech notes as appropriate), @mhvk? |
|
@eteq - don't we normally rebase to get rid of merge commits? |
|
@eteq - @astrofrog is right, could you please rebase? |
|
@eteq In addition to rebasing to remove the merge commit, can you please fix this failing PEP8 test:
|
…of SkyCoords is given
|
Rebase + blank line done. @astrofrog @bsipocz - The reason for the merge commit being there is that this is what github does when you use it's in-web auto-resolve feature. If it hadn't been for the carriage-return issue, this would have been fine. So I think we should re-consider the "always rebase" policy given how much easier it is to merge things directly from github now with the in-browser conflict resolution. Maybe a discussion item for the CC mtg in a few weeks? |
maybe we need to try to convince github to add a similar button with a rebase on master functionality. I've asked this as a feature already, a long long time ago, maybe if there are more than us it will be implemented. |
|
Maybe worth trying out on a test repo? |
|
as I recall that did a mess, too, can't remember though what it was (e.g. merge blindly after a rebase is only useful in a few very clear situation). Definitely a +1 to discuss at CC mtg. |
|
Merging now as this got approved and no need to wait for the osx build (the rest is passing). |
|
Thanks @eteq! |
Fix SkyCoord creation from other SkyCoords improperly copying frame attributes
|
@astrofrog - Sadly that rebase option is not even available when there is a merge conflict: |


This PR fixes part of the problem reported in #6446 : when you create a
SkyCoordfrom a list of otherSkyCoords, it turns out that all the frame attributes get set to their default values instead of being left un-set. That's a bug in how the frame attributes get copied over, and this PR fixes it.Fixes #6446 (although note there is sort of a second bug in #6446 ... but that's the topic of #6447)
cc @larrybradley @adrn @taldcroft