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

Refactor steps in blending code #453

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

sidekock
Copy link
Contributor

See #443

sidekock and others added 30 commits November 18, 2024 11:28
Co-authored-by: mats-knmi <[email protected]>
….velocity_perturbations = [] in __initialize_random_generators
sidekock and others added 6 commits December 19, 2024 17:21
* Use seed for all rng to make a test run completely deterministic

* fix probmatching test and some copy paste oversights

* Add test for vel_pert_method

* Change the test so that it actually runs the lines that need to be covered
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 72.22222% with 10 lines in your changes missing coverage. Please review.

Project coverage is 84.31%. Comparing base (a7dae54) to head (4fb784e).

Files with missing lines Patch % Lines
pysteps/nowcasts/steps.py 72.22% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #453      +/-   ##
==========================================
+ Coverage   84.26%   84.31%   +0.05%     
==========================================
  Files         160      160              
  Lines       13067    13250     +183     
==========================================
+ Hits        11011    11172     +161     
- Misses       2056     2078      +22     
Flag Coverage Δ
unit_tests 84.31% <72.22%> (+0.05%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sidekock
Copy link
Contributor Author

Both visual tests and assert statements give the same conclusion: the output is exactly the same!

@sidekock
Copy link
Contributor Author

@dnerini The codecov check is failing but the only things it is actuary failing on in the deepcopys I have done in the code and on the timing which does not seem worth it to write tests for as this is a very basic subtraction. Would it be able to disable it for these things or how does this work? I know you where able to do it for the re-factoring of the steps nowcasting.

Copy link
Contributor

@RubenImhoff RubenImhoff left a comment

Choose a reason for hiding this comment

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

Hi @sidekock and @mats-knmi,

Thanks a lot for your work here! I'm sorry I was not around the past days to answer some questions and think along. However, this looks great! With the large number of changes, it is becoming difficult to check everything thoroughly, so at least I'm happy to see that it gives exactly the same results. I think a to do for a new PR could be updating the documentation, but that is probably easier and cleaner once this PR is pushed.

To further reduce memory usage, both this array and the ``velocity_models`` array
can be given as float32. They will then be converted to float64 before computations
to minimize loss in precision.
# TODO: compare old and new version of the code, run a benchmark to compare the two
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this TODO still necessary? I can imagine we'd like to have this done prior to merging this PR.

@dnerini
Copy link
Member

dnerini commented Jan 21, 2025

@dnerini The codecov check is failing but the only things it is actuary failing on in the deepcopys I have done in the code and on the timing which does not seem worth it to write tests for as this is a very basic subtraction. Would it be able to disable it for these things or how does this work? I know you where able to do it for the re-factoring of the steps nowcasting.

@sidekock we can simply ignore the failing check and merge whenever you feel it's ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants