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

Strip factor=None in equivalency converter for spectral density #229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

braingram
Copy link
Contributor

@braingram braingram commented May 9, 2024

Equivalencies are serialized by storing the kwargs:

The factor keyword argument to spectral_density is deprecated in astropy 7.0 which means:

  • any file that contains a spectral_density that was originally created with a factor will produce a warning when loaded
  • these files will be unreadable when factor is removed

This PR strip factor when it's None to avoid the deprecation warning for astropy 7 and only tests factor for astropy versions older than 7.

Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.95%. Comparing base (1c94d94) to head (8f54ebf).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #229   +/-   ##
=======================================
  Coverage   97.94%   97.95%           
=======================================
  Files          54       54           
  Lines        2046     2050    +4     
=======================================
+ Hits         2004     2008    +4     
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@braingram braingram force-pushed the deprecated_factor branch 2 times, most recently from 0049d7c to 28addd8 Compare May 9, 2024 23:21
@pllim

This comment was marked as outdated.

@braingram

This comment was marked as outdated.

@pllim
Copy link
Member

pllim commented May 10, 2024

I am very surprised that factor is used at all. It was discouraged a very long time ago in the API doc.

to avoid deprecation warnings for astropy 7
@braingram braingram changed the title ignore astropy deprecation warning for factor when loading equivalency Strip factor=None in equivalency converter for spectral density May 10, 2024
@braingram braingram marked this pull request as ready for review May 10, 2024 21:18
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.

None yet

2 participants