ENH: improving error messaging for invalid SIAv2 inputs - #693
Conversation
8bae10a to
6469682
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #693 +/- ##
==========================================
+ Coverage 84.00% 84.02% +0.01%
==========================================
Files 80 80
Lines 8522 8524 +2
==========================================
+ Hits 7159 7162 +3
+ Misses 1363 1362 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
msdemlei
left a comment
There was a problem hiding this comment.
I trust this is a UI improvement and approve of it as such. However, even a quick glance at the SkyCoord docs in astropy did not reveal the logic of pos.size<4 to me (it doesn't help that my version of the astropy docs doesn't even mention the size attribute). I also couldn't locate the place where an appropriately-sized SkyCoord would turn into a polygon (if that's what it is). So: I'd say a comment is in order here. But perhaps I'm just being particularly dense here.
While you're editing this: Could you add the missing "been" in _validate_pos' docstring?
Feel free to merge, though.
|
Yes, the |
I'll go ahead with this, with the known caveat that this may only land in 1.7.1 as I plan to follow-up on our discussion in #692 and add a default small radius for v1.8 |
This keeps bugging me, so while we think about possible workarounds in #692, I would just make the error message more descriptive than the current one propagated from astropy:
Technically this is an API change as we change the error type from TypeError to ValueError but I feel this is still backportable improvement (no user code should have try/excepted on this TypeError).