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

align_wcs to raise custom exception when not enough inputs #203

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

mcara
Copy link
Member

@mcara mcara commented Apr 19, 2024

Closes #202

@mcara mcara added the enhancement New feature or request label Apr 19, 2024
@mcara mcara added this to the Better Awsomeness milestone Apr 19, 2024
@mcara mcara requested a review from braingram April 19, 2024 02:05
@mcara mcara self-assigned this Apr 19, 2024
@mcara mcara requested a review from a team as a code owner April 19, 2024 02:05
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.77%. Comparing base (4ab4c69) to head (fd5641c).
Report is 84 commits behind head on main.

❗ Current head fd5641c differs from pull request most recent head ac5cefd. Consider uploading reports for the commit ac5cefd to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
+ Coverage   85.91%   93.77%   +7.85%     
==========================================
  Files           9       11       +2     
  Lines        1754     1992     +238     
  Branches      272        0     -272     
==========================================
+ Hits         1507     1868     +361     
+ Misses        242      124     -118     
+ Partials        5        0       -5     

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

@braingram
Copy link
Contributor

Thanks!

These test could be updated to check for the new exception:

with pytest.raises(ValueError) as e:
align_wcs([tpwcs, tpwcs, tpwcs])
assert e.value.args[0] == ("Too few input images (or groups of images) "
"with non-empty catalogs.")

and this one:
with pytest.raises(ValueError) as e:
align_wcs(tpwcs, refcat=None, fitgeom='shift', match=None)
assert e.value.args[0] == ("Too few input images (or groups of images) "

Copy link
Contributor

@braingram braingram left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcara mcara merged commit adbb5d9 into spacetelescope:main Apr 19, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example custom Exception classes for customizing error handling
2 participants