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

Allow output(x) <- TRUE syntax #136

Merged
merged 8 commits into from
Jan 17, 2025
Merged

Allow output(x) <- TRUE syntax #136

merged 8 commits into from
Jan 17, 2025

Conversation

richfitz
Copy link
Member

This PR restores support for odin1's old syntax for outputting a variable that was used in an intermediate calculation. We can write:

x <- a + 2
output(x) <- TRUE

and also use x within calculations in the graph This was very fiddly to get right in the end, but the overall implementation seems ok. Doubtless there will be corner cases to catch.

This only affects ODE models so won't affect many people, but is required to support the deterministic malaria model, which is my target to support for replacing odin1

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7fc9c2c) to head (ffd4a45).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #136   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         3504      3546   +42     
=========================================
+ Hits          3504      3546   +42     

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

@richfitz richfitz marked this pull request as ready for review January 16, 2025 09:07
@richfitz richfitz requested a review from weshinsley January 16, 2025 09:07
R/parse_system.R Outdated Show resolved Hide resolved
vignettes/functions.Rmd Outdated Show resolved Hide resolved
@richfitz richfitz merged commit 875cfb8 into main Jan 17, 2025
10 checks passed
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.

2 participants