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

[Future Spherical Class] Add SArc #478

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

ghiggi
Copy link
Contributor

@ghiggi ghiggi commented Nov 17, 2022

This PR implements the new SArc class

  • Tests added
  • Tests passed
  • Passes git diff origin/main **/*py | flake8 --diff

@ghiggi ghiggi marked this pull request as draft November 17, 2022 14:11
@ghiggi ghiggi changed the title Add legacy Arc code and tests [Future Spherical Class] Add SArc Nov 17, 2022
@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #478 (6f338fd) into main (6ff3568) will increase coverage by 0.35%.
The diff coverage is 99.43%.

❗ Current head 6f338fd differs from pull request most recent head a681248. Consider uploading reports for the commit a681248 to get more accurate results

@@            Coverage Diff             @@
##             main     #478      +/-   ##
==========================================
+ Coverage   94.27%   94.62%   +0.35%     
==========================================
  Files          78       76       -2     
  Lines       12838    13701     +863     
==========================================
+ Hits        12103    12965     +862     
- Misses        735      736       +1     
Flag Coverage Δ
unittests 94.62% <99.43%> (+0.35%) ⬆️

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

Impacted Files Coverage Δ
pyresample/future/spherical/arc.py 95.93% <95.93%> (ø)
pyresample/future/spherical/__init__.py 100.00% <100.00%> (ø)
pyresample/future/spherical/point.py 100.00% <100.00%> (ø)
pyresample/spherical.py 92.63% <100.00%> (-0.04%) ⬇️
pyresample/test/test_sgeom/test_arc.py 100.00% <100.00%> (ø)
pyresample/test/test_sgeom/test_point.py 100.00% <100.00%> (ø)
pyresample/test/conftest.py 98.01% <0.00%> (-0.39%) ⬇️
pyresample/geometry.py 87.40% <0.00%> (-0.15%) ⬇️
pyresample/test/test_kd_tree.py 97.31% <0.00%> (-0.05%) ⬇️
pyresample/test/test_dask_ewa.py 98.94% <0.00%> (-0.01%) ⬇️
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@coveralls
Copy link

coveralls commented Nov 17, 2022

Coverage Status

Coverage increased (+0.4%) to 94.174% when pulling 6f338fd on ghiggi:feature-sarc into 952cec6 on pytroll:main.

@ghiggi ghiggi marked this pull request as ready for review November 17, 2022 19:09
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.

I have a couple code cleanup suggestions, but otherwise this looks good to me. I assume all the math is correct.

pyresample/future/spherical/point.py Outdated Show resolved Hide resolved
pyresample/future/spherical/point.py Outdated Show resolved Hide resolved
pyresample/future/spherical/point.py Show resolved Hide resolved
pyresample/spherical.py Outdated Show resolved Hide resolved
pyresample/spherical.py Outdated Show resolved Hide resolved
pyresample/test/test_sgeom/test_arc.py Outdated Show resolved Hide resolved
class TestSArc(unittest.TestCase):
"""Test SArc class."""

# TODO: Fixtures defined here?
Copy link
Member

Choose a reason for hiding this comment

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

You could define these as fixtures in the class, but considering this module is specific to testing the SArc class maybe it would be better to define them outside the class. But also...if we assume these classes/instances are immutable then you could also leave them like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will clean out the unit test when I will finalize it after the SPolygon behaviour.
I am not sure yet of all the behaviour ... and the current code helps me to work line by line

pyresample/test/test_sgeom/test_arc.py Outdated Show resolved Hide resolved
pyresample/test/test_sgeom/test_arc.py Outdated Show resolved Hide resolved
pyresample/test/test_sgeom/test_point.py Show resolved Hide resolved
ghiggi and others added 5 commits November 18, 2022 08:00
Co-authored-by: David Hoese <david.hoese@ssec.wisc.edu>
Co-authored-by: David Hoese <david.hoese@ssec.wisc.edu>
Co-authored-by: David Hoese <david.hoese@ssec.wisc.edu>
Co-authored-by: David Hoese <david.hoese@ssec.wisc.edu>
@djhoese
Copy link
Member

djhoese commented Nov 18, 2022

Looks like some of the github suggestions from my comments or your other recent changes have messed a few things up. Pre-commit and stickler and the website building are all mad.

@ghiggi
Copy link
Contributor Author

ghiggi commented Nov 18, 2022

@djhoese I think now the code is ready for another round of review ;)

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.

One more suggestion/question, sorry.

pyresample/future/spherical/arc.py Show resolved Hide resolved
pyresample/future/spherical/arc.py Outdated Show resolved Hide resolved
@djhoese
Copy link
Member

djhoese commented Nov 18, 2022

Looks like one of the tests is failing with the unstable dependencies. Not sure what's up with that.

@djhoese djhoese added this to the v2.0 milestone Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants