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

BUG: fix SkyView witdth and height input validation #2757

Merged
merged 1 commit into from Feb 15, 2024

Conversation

ycopin
Copy link
Contributor

@ycopin ycopin commented Jun 24, 2023

My 1st PR, don't hesitate to feedback.

closes #2756

@codecov
Copy link

codecov bot commented Jun 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d2373a5) 66.79% compared to head (b138a77) 66.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2757      +/-   ##
==========================================
+ Coverage   66.79%   66.81%   +0.01%     
==========================================
  Files         237      237              
  Lines       18316    18316              
==========================================
+ Hits        12234    12237       +3     
+ Misses       6082     6079       -3     

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

Copy link
Contributor

@keflavich keflavich left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! Nice first PR.

size_deg = "{0},{1}".format(width.to(u.deg).value,
height.to(u.deg).value)
elif width and height:
elif width is not None and height is not None:
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we instead check for Quantity inputs here? E.g. based on the docstring we are expecting Quantities or Nones, but not integers.

Copy link
Contributor

Choose a reason for hiding this comment

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

the code allows float or integer arguments to be interpreted as degrees, which matches the skyview web api. But I agree, it would be better to require a qty explicitly

@bsipocz bsipocz changed the title Fixes issue #2756. BUG: fix SkyView witdth and height input validation Jul 25, 2023
@bsipocz bsipocz added this to the v0.4.7 milestone Jul 25, 2023
@bsipocz
Copy link
Member

bsipocz commented Feb 15, 2024

I need to rebase this to retrigger CI (I see some testing issues when looking at this branch locally, but I'm fairly certain it's all unrelated to this PR and in fact have been fixed since this is open).

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Thank you @ycopin!

I'll add a changelog entry when cutting a release, and while we commented on checking for quantity input, I would not hold this PR up on it, especially as the VO backend refactoring in #2849 may remove the whole logic anyway.

@bsipocz bsipocz merged commit 893eae2 into astropy:main Feb 15, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SkyView.get_images: boolean comparison of a quantity raises a ValueError in astropy 5.3
3 participants