Skip to content

Rename min_area() and max_area() methods #1565

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

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Feb 24, 2021

To clarify naming, this PR renames the Scene.min_area() and Scene.max_area() to .coarsest_area() and .finest_area(), respectively. The original naming was causing confusion what was meant: is min_area() the "geographically smallest area in the scene", "area with smallest pixels (highest resolution)" or "area of the data with smallest resolution (highest resolution)"? The new naming introduced in this PR got consensus in Slack, so lets use these. Warnings about the naming changes have been added.

  • Tests adjusted

@pnuu pnuu added enhancement code enhancements, features, improvements component:scene labels Feb 24, 2021
@pnuu pnuu requested review from mraspaud and djhoese February 24, 2021 09:23
@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #1565 (3a78a62) into master (d556c80) will decrease coverage by 0.00%.
The diff coverage is 63.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1565      +/-   ##
==========================================
- Coverage   92.54%   92.53%   -0.01%     
==========================================
  Files         251      251              
  Lines       36761    36768       +7     
==========================================
+ Hits        34022    34025       +3     
- Misses       2739     2743       +4     
Flag Coverage Δ
behaviourtests 4.50% <26.31%> (+<0.01%) ⬆️
unittests 92.68% <63.15%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/resample.py 89.50% <ø> (ø)
satpy/scene.py 91.65% <50.00%> (-0.61%) ⬇️
satpy/tests/test_regressions.py 100.00% <100.00%> (ø)
satpy/tests/test_scene.py 99.72% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d556c80...94c2b14. Read the comment docs.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM.

Should we start using deprecation warnings? (#1554)

@pnuu
Copy link
Member Author

pnuu commented Feb 24, 2021

Sure, I can do that. But as those are not shown by default, practically no-one using this feature would ever see the warning.

@djhoese djhoese added the backwards-incompatibility Causes backwards incompatibility or introduces a deprecation label Feb 24, 2021
Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

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

Besides maybe using a DeprecationWarning, this looks good to me. Now I just need to update my tutorials to use this once this is released.

@ghost
Copy link

ghost commented Feb 24, 2021

DeepCode failed to analyze this pull request

Something went wrong despite trying multiple times, sorry about that.
Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM

@mraspaud mraspaud merged commit bae4793 into pytroll:master Feb 25, 2021
@pnuu pnuu deleted the rename_min_max_area branch February 25, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompatibility Causes backwards incompatibility or introduces a deprecation component:scene enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants