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

1028 Reduce export_input_data_county_timeseries #1029

Conversation

HenrZu
Copy link
Contributor

@HenrZu HenrZu commented May 10, 2024

Changes and Information

Please briefly list the changes (main added features, changed items, or corrected bugs) made:

  • The current code for the function export_input_data_county_timeseries is similar to the functionality in read_input_data_county.
  • This redundancy also increases the susceptibility to errors, as both codes always have to be maintained.
  • More unit tests for the extrapolation process

If need be, add additional information and what the reviewer should look out for in particular:

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
  • New code adheres to coding guidelines
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • Tests are added for new functionality and a local test run was successful (with and without OpenMP)
  • Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added
  • (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.)
  • Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease)
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

@HenrZu HenrZu linked an issue May 10, 2024 that may be closed by this pull request
2 tasks
@HenrZu HenrZu self-assigned this Jun 25, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 98.09524% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.45%. Comparing base (896a04e) to head (49de116).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
cpp/models/ode_secir/parameters_io.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1029    +/-   ##
========================================
  Coverage   96.44%   96.45%            
========================================
  Files         135      135            
  Lines       11286    10817   -469     
========================================
- Hits        10885    10433   -452     
+ Misses        401      384    -17     

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

@HenrZu
Copy link
Contributor Author

HenrZu commented Jun 27, 2024

I have compared the runtime of the new extrapolation function with the old one. The results are almost identical. The result shown are for the secir model.

Num Days 1 5 10 20
New Version 30,3303 42,7880 58,3960 90,1510
Old Version 29,3939 42,1209 57,7696 89,6838

@HenrZu HenrZu requested a review from lenaploetzke July 23, 2024 13:44
Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Thank you for your work!
A review of the tests is actually still missing.
Small explanation for the rather detailed review of the parameters_io files:
I wanted to write similar functionality for another model and found these files quite confusing. Less code duplication, less function arguments and a complete and correct documentation would have helped. That's why I put more emphasis on this.

Please in particular consider combining the functions export_input_data_county_timeseries and read_input_data_county.

cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.h Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secirvvs/parameters_io.h Show resolved Hide resolved
cpp/models/ode_secirvvs/parameters_io.h Show resolved Hide resolved
cpp/models/ode_secirvvs/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secirvvs/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secirvvs/parameters_io.h Outdated Show resolved Hide resolved
Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Nice work :) I like the ideas of the tests. Please change some small things.

cpp/tests/test_odesecir.cpp Outdated Show resolved Hide resolved
cpp/tests/test_odesecir.cpp Outdated Show resolved Hide resolved
cpp/tests/test_odesecir.cpp Outdated Show resolved Hide resolved
cpp/tests/test_odesecir.cpp Outdated Show resolved Hide resolved
cpp/tests/test_odesecir.cpp Show resolved Hide resolved
cpp/tests/test_odesecirvvs.cpp Show resolved Hide resolved
cpp/tests/test_odesecirvvs.cpp Show resolved Hide resolved
cpp/tests/test_odesecirvvs.cpp Show resolved Hide resolved
cpp/tests/test_odesecirvvs.cpp Outdated Show resolved Hide resolved
cpp/tests/test_odesecirvvs.cpp Outdated Show resolved Hide resolved
@HenrZu HenrZu requested a review from lenaploetzke August 28, 2024 10:10
Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Thanks for all the work and for including the review comments. I have just a few more comments (and some of them are optional).

cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.h Outdated Show resolved Hide resolved
cpp/models/ode_secir/parameters_io.cpp Show resolved Hide resolved
@HenrZu HenrZu requested a review from lenaploetzke September 3, 2024 13:49
Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Very good :)

@HenrZu HenrZu merged commit 30c59ab into main Sep 4, 2024
58 checks passed
@HenrZu HenrZu deleted the 1028-export_input_data_county_timeseries-returns-different-values-than-read_input_data_county branch September 4, 2024 06:43
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.

export_input_data_county_timeseries is too similar to read_input_data_county
3 participants