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

Start refactoring pytroll schedule #72

Merged
merged 20 commits into from
Mar 7, 2023

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Nov 28, 2022

This PR starts refactoring pytroll schedule. Still a lot to do, but let's start with this.

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Merging #72 (26eb6ff) into main (5f2cb59) will decrease coverage by 7.76%.
The diff coverage is 53.89%.

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   46.61%   38.85%   -7.76%     
==========================================
  Files          15       15              
  Lines        2525     2082     -443     
==========================================
- Hits         1177      809     -368     
+ Misses       1348     1273      -75     
Impacted Files Coverage Δ
trollsched/compare.py 0.00% <0.00%> (ø)
trollsched/writers.py 7.00% <7.00%> (ø)
trollsched/schedule.py 17.13% <20.40%> (+1.97%) ⬆️
trollsched/utils.py 22.64% <33.33%> (+7.82%) ⬆️
trollsched/boundary.py 69.79% <64.17%> (+1.18%) ⬆️
trollsched/satpass.py 64.37% <66.66%> (+1.15%) ⬆️
trollsched/__init__.py 100.00% <100.00%> (ø)
trollsched/spherical.py 35.71% <100.00%> (-42.53%) ⬇️
trollsched/tests/__init__.py 100.00% <100.00%> (+55.55%) ⬆️
trollsched/tests/test_satpass.py 99.41% <100.00%> (+3.74%) ⬆️
... and 4 more

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

@mraspaud
Copy link
Member Author

@avalentino do you want to check if this fixes your issues?

@mraspaud mraspaud self-assigned this Feb 17, 2023
@avalentino
Copy link
Contributor

avalentino commented Feb 18, 2023

@mraspaud yes, all tests pass on debian-sid.
There are few warnings anyway:

$ python3 -m pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack
rootdir: /home/antonio/projects/forks/pytroll-schedule
plugins: doctestplus-0.12.1, remotedata-0.4.0, cov-4.0.0
collected 16 items                                                                                                                    

trollsched/tests/test_satpass.py .........                                                                                      [ 56%]
trollsched/tests/test_schedule.py .......                                                                                       [100%]

========================================================== warnings summary ===========================================================
../../../../../usr/lib/python3/dist-packages/llvmlite/binding/ffi.py:159
  /usr/lib/python3/dist-packages/llvmlite/binding/ffi.py:159: DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    _lib_handle = importlib.resources.path(pkgname, _lib_name)

trollsched/tests/test_satpass.py: 12 warnings
  /usr/lib/python3/dist-packages/pyresample/boundary.py:124: PendingDeprecationWarning: 'AreaDefBoundary' will be removed in the future. Use the Swath/AreaDefinition 'boundary' method instead!.
    warnings.warn("'AreaDefBoundary' will be removed in the future. " +

trollsched/tests/test_schedule.py::TestTools::test_conflicting_passes
  /home/antonio/projects/forks/pytroll-schedule/trollsched/tests/test_schedule.py:51: DeprecationWarning: Please use assertEqual instead.
    self.assertEquals(

trollsched/tests/test_schedule.py::TestTools::test_conflicting_passes
  /home/antonio/projects/forks/pytroll-schedule/trollsched/tests/test_schedule.py:53: DeprecationWarning: Please use assertEqual instead.
    self.assertEquals(

trollsched/tests/test_schedule.py::TestUtils::test_fermi
  /home/antonio/projects/forks/pytroll-schedule/trollsched/tests/test_schedule.py:62: DeprecationWarning: Please use assertEqual instead.
    self.assertEquals(fermia(0.25), 0.875)

trollsched/tests/test_schedule.py::TestUtils::test_fermi
  /home/antonio/projects/forks/pytroll-schedule/trollsched/tests/test_schedule.py:63: DeprecationWarning: Please use assertEqual instead.
    self.assertEquals(fermib(0.25), 0.5)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================= 16 passed, 17 warnings in 115.41s (0:01:55) =============================================

@mraspaud
Copy link
Member Author

@mraspaud yes, all tests pass on debina-sid. There are few warnings anyway:

Thanks a lot for the feedback, I'll try fixing the warnings too before we merge this.

@mraspaud mraspaud merged commit 380752d into pytroll:main Mar 7, 2023
@mraspaud mraspaud deleted the feature-subtract-passes branch March 7, 2023 15:41
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.

numpy 1.24.0 np.bool removed needs cleanup Test failure with PyResample 1.23
3 participants