Skip to content

1462 Add ScalarType to Code examples in the documentation#1546

Merged
kilianvolmer merged 16 commits into
mainfrom
2026_04_doc
May 11, 2026
Merged

1462 Add ScalarType to Code examples in the documentation#1546
kilianvolmer merged 16 commits into
mainfrom
2026_04_doc

Conversation

@annawendler
Copy link
Copy Markdown
Member

@annawendler annawendler commented Apr 22, 2026

Changes and Information

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

  • Adjust code examples regarding changes of floating point template parameter
  • Update documentation for installing Python packages

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 within the code (Doxygen) for new functionality has been added in the code.
  • Appropriate external documentation (ReadTheDocs) for new functionality has been added to the online documentation and checked in the preview.
  • 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).

Closes #1462

@annawendler annawendler marked this pull request as draft April 22, 2026 06:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates C++ documentation (and one example) to use ScalarType consistently in code examples after the floating-point template parameter changes introduced in #1018, addressing issue #1462.

Changes:

  • Replace hard-coded double template arguments/usages in many model documentation snippets with ScalarType.
  • Align selected model-/parameter-template usages in documentation with the current templated APIs.
  • Update cpp/examples/ode_secirvvs.cpp to use ScalarType and Model<ScalarType>.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/source/cpp/models/osir.rst Update simulation/time-series examples to use ScalarType.
docs/source/cpp/models/oseirv.rst Switch model instantiation and time-related variables to ScalarType.
docs/source/cpp/models/oseirdb.rst Update contact pattern and simulation snippets to ScalarType.
docs/source/cpp/models/oseir.rst Update contact pattern and simulation snippets to ScalarType.
docs/source/cpp/models/osecirvvs.rst Update vaccination/contact/NPI/simulation examples to ScalarType.
docs/source/cpp/models/osecirts.rst Update contact/NPI/simulation examples to ScalarType.
docs/source/cpp/models/osecir.rst Update contact pattern and simulation snippets to ScalarType.
docs/source/cpp/models/omseirs4.rst Update simulation time variables to ScalarType.
docs/source/cpp/models/lsecir2d.rst Update LCT-SECIR-2D type definitions and examples to use ScalarType.
docs/source/cpp/models/lsecir.rst Update LCT-SECIR type definitions and examples to use ScalarType.
docs/source/cpp/models/iseir.rst Update IDE-SEIR initialization snippets to use ScalarType.
docs/source/cpp/models/isecir.rst Update IDE-SECIR flows/contact/output snippets to use ScalarType.
docs/source/cpp/models/glsecir.rst Update GLCT-SECIR type/parameter examples to use ScalarType.
cpp/examples/ode_secirvvs.cpp Switch example simulation parameters and model template arg to ScalarType.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/source/cpp/models/isecir.rst Outdated
Comment thread docs/source/cpp/models/isecir.rst Outdated
Comment thread docs/source/cpp/models/lsecir2d.rst Outdated
Comment thread docs/source/cpp/models/lsecir.rst Outdated
Comment thread docs/source/cpp/models/oseir.rst Outdated
Comment thread docs/source/cpp/models/osecir.rst Outdated
Comment thread docs/source/cpp/models/oseirdb.rst Outdated
@annawendler annawendler marked this pull request as ready for review May 7, 2026 14:40
@annawendler annawendler requested a review from kilianvolmer May 11, 2026 12:39
Comment thread docs/source/python/python_packages.rst Outdated
Copy link
Copy Markdown
Contributor

@kilianvolmer kilianvolmer left a comment

Choose a reason for hiding this comment

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

Great, we can merge this as soon as the CI ran through.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.42%. Comparing base (33c572a) to head (30f044e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1546      +/-   ##
==========================================
- Coverage   97.45%   97.42%   -0.04%     
==========================================
  Files         190      190              
  Lines       15963    15966       +3     
==========================================
- Hits        15557    15555       -2     
- Misses        406      411       +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kilianvolmer kilianvolmer merged commit 46f65b5 into main May 11, 2026
64 checks passed
@kilianvolmer kilianvolmer deleted the 2026_04_doc branch May 11, 2026 16: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.

Add ScalarType to Code examples in the documentation

5 participants