-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Warn about future changes to adaptive defaults #302
Conversation
151d8ad
to
70434a8
Compare
Codecov Report
@@ Coverage Diff @@
## main #302 +/- ##
==========================================
+ Coverage 94.30% 94.36% +0.05%
==========================================
Files 23 23
Lines 720 727 +7
==========================================
+ Hits 679 686 +7
Misses 41 41
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
70434a8
to
76b3d26
Compare
@svank - could you rebase this again? Thanks! |
76b3d26
to
a046349
Compare
@astrofrog Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but could you change 'default' to None as mentioned below?
reproject/adaptive/high_level.py
Outdated
@@ -12,8 +13,9 @@ def reproject_adaptive(input_data, output_projection, shape_out=None, hdu_in=0, | |||
order=None, | |||
return_footprint=True, center_jacobian=False, | |||
roundtrip_coords=True, conserve_flux=False, | |||
kernel='Hann', kernel_width=1.3, sample_region_width=4, | |||
boundary_mode='ignore', boundary_fill_value=0, | |||
kernel='default', kernel_width=1.3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usual way to deal with this is to actually have kernel=None
rather than have 'default'
as a special string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, yes, I like that better. Done
a046349
to
95a95c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me assuming CI passes. Thanks! Do you have any more PRs that should be considered before I go ahead and do a release? (after which we can finalize/merge the ones to actually change the defaults). I was thinking we could perhaps plan to wait a couple of months before the next release (which would change the defaults) just to make sure we give some time for users to see the warnings.
Nope, I'm fresh out of PRs for this next release. Sounds like a plan! |
(One new commit on top of the boundary-handling PR, will rebase later)
This warns the user if the default filter kernel or boundary handling mode is being used.
I set the default values for these two kwargs to
'default'
so we can tell whether the user is relying on the default behavior or explicitly requesting the old behavior. I haven't mentioned the literal value ofdefault
in the docs and intend to stop recognizing it in the same commit that changes the defaults, and I hope this temporarily-valid value ofdefault
doesn't itself need a deprecation period. LMK if there's a better way.