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

Fix shortcut for prime meridian checks #551

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Oct 18, 2023

This shortcut exists in the code to avoid having to convert a CRS to a PROJ.4 dict if it isn't needed. I'm not sure how or why, but .prime_meridian is not an integer, it is an object, and comparing it to == 0 will always give False from what I'm seeing. I should have always been using .prime_meridian.longitude.

I'm not exactly sure how to test this as it is just a performance thing (avoid unnecessary conversions). The end result should have always been the same.

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

@djhoese djhoese added the bug label Oct 18, 2023
@djhoese djhoese self-assigned this Oct 18, 2023
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #551 (9c73232) into main (c0025ed) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #551   +/-   ##
=======================================
  Coverage   94.25%   94.26%           
=======================================
  Files          82       82           
  Lines       13076    13076           
=======================================
+ Hits        12325    12326    +1     
+ Misses        751      750    -1     
Flag Coverage Δ
unittests 94.26% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
pyresample/utils/proj4.py 100.00% <100.00%> (+1.13%) ⬆️

@coveralls
Copy link

Coverage Status

coverage: 93.84% (+0.008%) from 93.832% when pulling 9c73232 on djhoese:bugfix-geodetic-crs-pm into c0025ed on pytroll:main.

@djhoese djhoese merged commit 9e2acad into pytroll:main Oct 23, 2023
21 checks passed
@djhoese djhoese deleted the bugfix-geodetic-crs-pm branch October 23, 2023 18:59
@djhoese
Copy link
Member Author

djhoese commented Oct 23, 2023

This was a pretty simple PR so just merging to get it off of my TODO list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants