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

Fix some warnings in test #594

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

Conversation

vandalt
Copy link

@vandalt vandalt commented Sep 20, 2024

This fixes two warnings I saw when running tests:

  1. Deprecation warning for ax.plot_date: fixed by using ax.plot with datetime64 instead
  2. Warnings about non-rotation transforms when calculating Sun and Moon separations. Fixed by adding origin_mismach="ignore" to those two calculations. There is already a comment about this before both instances and removing the warning avoids end users seeing it and wondering if something is wrong with how they specified coordinates.

Fix #603

This removes the warnings about non-rotation transform.
There is a comment before both instances to warn future editors.
@pllim
Copy link
Member

pllim commented Dec 4, 2024

separation() got an unexpected keyword argument 'origin_mismatch'

The problem with this is that astroplan pins to too old of minversion of astropy etc. So we either have to bump minversion or do a version check.

Would love to see this clean up go in!

Also would have to un-ignore the relevant warnings here:

astroplan/setup.cfg

Lines 54 to 57 in bf5e26d

# Can remove ignore when you bump astropy minversion high enough
ignore:distutils Version classes are deprecated:DeprecationWarning
# deprecated in Matplotlib 3.9 and will be removed in 3.11. Use plot instead.
ignore:The plot_date function was deprecated

Thanks!

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.

Replace deprecated plot_date
2 participants