Skip to content

add back-compatibility alias for get_webbpsf_data_path#964

Merged
BradleySappington merged 1 commit intospacetelescope:developfrom
mperrin:alias_get_webbpsf_data_path
Feb 20, 2025
Merged

add back-compatibility alias for get_webbpsf_data_path#964
BradleySappington merged 1 commit intospacetelescope:developfrom
mperrin:alias_get_webbpsf_data_path

Conversation

@mperrin
Copy link
Collaborator

@mperrin mperrin commented Feb 20, 2025

Whoops, looks like one function got missed or overlooked accidentally in the repo migration: The function webbpsf.utils.get_webbpsf_data_path() doesn't simply work via the sys.modules redirect, because the function name changed to get_stpsf_data_path(). The lack of this function breaks at least some existing legacy code, in the webbpsf_ext repo.

This PR addresses that by manually adding an alias for that to the stpsf namespace, such that calls to webbpsf.utils.get_webbpsf_data_path() will correctly invoke stpsf.utils.get_stpsf_data_path().

@mperrin mperrin added the bug Something isn't working label Feb 20, 2025
@mperrin mperrin self-assigned this Feb 20, 2025
Copy link
Collaborator

@BradleySappington BradleySappington left a comment

Choose a reason for hiding this comment

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

Good solution, keeps everything consolidated and still running the same code

@BradleySappington BradleySappington merged commit 95b37d2 into spacetelescope:develop Feb 20, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants