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

Replace width/height in future AreaDefinition with "shape" argument #533

Merged
merged 4 commits into from
Aug 15, 2023

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jul 18, 2023

This was discussed in a previous PR regarding cleaning up AreaDefinitions. The basic idea is to reduce the number of arguments passed to an AreaDefinition to keep the interface a little cleaner and simpler. This PR does this by grouping the width and height arguments into a single "shape" tuple.

This also makes it easier to create AreaDefinitions with more than 2 dimensions in the long long term.

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Passes git diff origin/main **/*py | flake8 --diff
  • Fully documented

@djhoese djhoese added this to the v2.0 milestone Jul 18, 2023
@djhoese djhoese requested a review from mraspaud July 18, 2023 02:39
@djhoese djhoese self-assigned this Jul 18, 2023
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #533 (3cb9861) into main (82b9373) will increase coverage by 0.00%.
Report is 7 commits behind head on main.
The diff coverage is 91.66%.

@@           Coverage Diff           @@
##             main     #533   +/-   ##
=======================================
  Coverage   94.25%   94.26%           
=======================================
  Files          82       82           
  Lines       13030    13059   +29     
=======================================
+ Hits        12282    12310   +28     
- Misses        748      749    +1     
Flag Coverage Δ
unittests 94.26% <91.66%> (+<0.01%) ⬆️

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

Files Changed Coverage Δ
pyresample/test/test_resamplers/test_nearest.py 100.00% <ø> (ø)
pyresample/utils/rasterio.py 62.50% <50.00%> (ø)
pyresample/area_config.py 90.58% <100.00%> (ø)
pyresample/future/geometry/area.py 100.00% <100.00%> (ø)
pyresample/test/conftest.py 98.47% <100.00%> (+0.01%) ⬆️
pyresample/test/test_geometry/test_area.py 99.22% <100.00%> (+<0.01%) ⬆️

... and 3 files with indirect coverage changes

@coveralls
Copy link

coveralls commented Jul 18, 2023

Coverage Status

coverage: 93.84% (-0.02%) from 93.864% when pulling 3cb9861 on djhoese:feature-areadef-shape into 82b9373 on pytroll:main.

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, just one small improvement idea

pyresample/future/geometry/area.py Show resolved Hide resolved
@mraspaud mraspaud merged commit dafbb34 into pytroll:main Aug 15, 2023
23 of 24 checks passed
@djhoese djhoese deleted the feature-areadef-shape branch August 15, 2023 20:15
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.

3 participants