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

import GriddedPSFModel from photutils.psf #755

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

braingram
Copy link
Contributor

This PR updates the remaining GriddedPSFModel imports from photutils to prefer importing from the psf submodule to avoid deprecation warnings issued when importing from the top level photutils module.

The modifications here are equivalent to the existing try/except found in gridded_library.py:

# Before doing anything else, check that we have GriddedPSFModel
try:
from photutils.psf import GriddedPSFModel
except ImportError:
try:
from photutils import GriddedPSFModel
except ImportError:
raise ImportError("This method requires photutils >= 0.6")

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
webbpsf/gridded_library.py 76.92% <100.00%> (ø)
webbpsf/utils.py 57.93% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

Copy link
Collaborator

@obi-wan76 obi-wan76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@BradleySappington
Copy link
Collaborator

@braingram - please rebase to get the CI legacy test fix

@BradleySappington BradleySappington merged commit c8c10ad into spacetelescope:develop Oct 23, 2023
@braingram braingram deleted the dep_warnings branch October 23, 2023 22:03
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.

3 participants