Repository navigation
Adjust RotatedSunFrame to rely on supported Astropy machinery - #4691
Conversation
|
Thanks for the PR @adrn! 👍 |
|
You are correct that – unlike But, I'd like to understand why The frame class it creates dynamically (e.g., Pending discussion, I'm changing this PR to draft status. |
|
I've also changed the labels since it's unavoidably an API change (formally speaking) due to a different class inheritance, and I worry that getting the frame attributes sorted out will ripple out to more disruptive changes to the API. |
|
Hmm, upon further thought, I'm not sure why the current implementation of |
How should we deal with this on the LTS? |
|
2.0 will work again once astropy/astropy#11101 is merged. This PR isn't necessary for 2.0 (as far as I know). |
The about-to-be-merged astropy/astropy#11099 updates the descriptor implementation in such a way that this "hack" no longer works, so something definitely needs to be fixed with Amusingly, astropy/astropy#11099 also "fixes" the problem with this PR where |
|
@adrn I've pushed some significant changes to this PR. Since the design intent of, e.g., |
|
Kicking Azure |
|
The PR now preserves all API associated with
Given the niche impacts of these inheritance changes, I think this PR is acceptable to backport to 2.0. |
|
Kicking RTD |
| members = {'__doc__': f'{RotatedSunFrame.__doc__}\n{framecls.__doc__}'} | ||
|
|
||
| # Subclass the metaclass for the RotatedSunFrame from the base frame's metaclass | ||
| class RotatedSunMeta(framemeta): |
There was a problem hiding this comment.
horray for one less metaclass in the world 😛
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport 2.0
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 99bb3c9db151b9ad8fb735a82ce8c69ba03be3eb ac6fd83c8aedb7f01e0761f19bcdc0e4fe42aedf d263dc03b998849601b82b3f539b9b9631385c55
# Create a new branch with these backported commits.
git checkout -b backport-4691-to-2.0
# Push it to GitHub.
git push --set-upstream origin backport-4691-to-2.0
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backportThen, create a pull request where the |
Edit by @ayshih: This PR makes changes to
RotatedSunFrameso that it relies on supported (versus unsupported) Astropy machinery for its frame attributes (base,duration,rotation_model, and no others). This is important for being compatible with Astropy 4.3 at the same time as older versions of Astropy, and minimizing the potential for future Astropy changes to breakRotatedSunFrame.Sunpy uses
RotatedSunFramea little differently than astropy usesSkyOffsetFrame, so, in order for the tests to pass, and forRotatedSunFrameto subclass fromBaseCoordinateFrame, I had to copy over the frame-specific representation information of the frame class passed in toRotatedSunFrame. See also my comments in astropy/astropy#11096