astropy icon indicating copy to clipboard operation
astropy copied to clipboard

Calculate WCSAxes TickLabel pixel coords at draw time

Open dstansby opened this issue 4 years ago • 3 comments

Description

This is part of solving https://github.com/astropy/astropy/issues/12568. Instead of calculating tick and tick-label coordinates before draw time, which in general is not a safe thing to do, calculate them at draw time. This involves not using the pixel argument to add() - I think I've found the best way to deprecate this in the least API breaking way?

Fixes #<Issue Number>

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • [ ] Do the proposed changes actually accomplish desired goals?
  • [ ] Do the proposed changes follow the Astropy coding guidelines?
  • [ ] Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • [ ] Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • [ ] Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see "When to rebase and squash commits".
  • [ ] Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the Extra CI label.
  • [ ] Is a change log needed? If yes, did the change log check pass? If no, add the no-changelog-entry-needed label. If this is a manual backport, use the skip-changelog-checks label unless special changelog handling is necessary.
  • [ ] Is a milestone set? Milestone must be set but astropy-bot check might be missing; do not let the green checkmark fool you.
  • [ ] At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate backport-X.Y.x label(s) before merge.

dstansby avatar Dec 23 '21 18:12 dstansby

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

github-actions[bot] avatar Dec 23 '21 18:12 github-actions[bot]

Hi humans :wave: - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

github-actions[bot] avatar May 24 '22 05:05 github-actions[bot]

I've rebased this, and I think it's ready for review.

dstansby avatar May 31 '22 08:05 dstansby

Hello @dstansby :wave:! It looks like you've made some changes in your pull request, so I've checked the code again for style.

There are no PEP8 style issues with this pull request - thanks! :tada:

Comment last updated at 2022-09-08 16:22:10 UTC

pep8speaks avatar Sep 04 '22 13:09 pep8speaks

The failing figure test means we will probably need to update the reference images, I can try and do this week.

astrofrog avatar Sep 04 '22 15:09 astrofrog

I checked the test failure and it was a very minor change in tick labels so I've updated the hashes.

astrofrog avatar Sep 08 '22 16:09 astrofrog

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v5.0.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 47dc553b03a7445c4c328fc03719963373e4fdc1
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #12630: Calculate WCSAxes TickLabel pixel coords at draw time'
  1. Push to a named branch:
git push YOURFORK v5.0.x:auto-backport-of-pr-12630-on-v5.0.x
  1. Create a PR against branch v5.0.x, I would have named this PR:

"Backport PR #12630 on branch v5.0.x (Calculate WCSAxes TickLabel pixel coords at draw time)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

lumberbot-app[bot] avatar Sep 08 '22 17:09 lumberbot-app[bot]