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

catch RuntimeError and raise custom exception for xyxymatch error #204

Merged
merged 5 commits into from
May 18, 2024

Conversation

braingram
Copy link
Contributor

This PR catches the RuntimeError raised by xyxymatch when multiple reference sources match a single source and raises a custom exception.

This change is motivated by the error handling code in jwst and romancal which inspect the error message and can be simplified once the changes in this PR are released.

See the below linked issue for details and why this change is being made in tweakwcs instead of xyxymatch

Closes spacetelescope/stsci.stimage#33

@braingram braingram requested a review from a team as a code owner May 16, 2024 16:35
Copy link

codecov bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 93.74%. Comparing base (fd5641c) to head (f91c66b).
Report is 2 commits behind head on main.

Files Patch % Lines
tweakwcs/matchutils.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #204      +/-   ##
==========================================
- Coverage   93.77%   93.74%   -0.03%     
==========================================
  Files          11       11              
  Lines        1992     1999       +7     
==========================================
+ Hits         1868     1874       +6     
- Misses        124      125       +1     

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

tweakwcs/matchutils.py Outdated Show resolved Hide resolved
tweakwcs/matchutils.py Outdated Show resolved Hide resolved
@braingram
Copy link
Contributor Author

Thanks for the review and suggestions. I included them in the most recent commits.

@braingram braingram requested a review from mcara May 17, 2024 15:56
@mcara mcara merged commit 4571521 into spacetelescope:main May 18, 2024
16 of 19 checks passed
@mcara mcara added this to the Better Awsomeness milestone May 18, 2024
@braingram braingram deleted the custom_exception branch May 18, 2024 11:07
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.

Use custom exception when xyxymatch fails
2 participants