-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add option to not run simulations when converting snapshots #1488
Conversation
+ styler::style
!!! To merge only once this PR is merged into PKSim |
You should run the update dll script to get the CI build versions before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Added a small comment FYI
invisible(rSharp::callStatic("PKSim.R.Api", "RunSnapshot", SnapshotRunOptions)) | ||
}, | ||
error = function(e) { | ||
message <- stringr::str_extract(as.character(e), "(?<=Message: )[^\\n]*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some error messages won't have a message line of format "Message: *". In this case str_extract()
returns in NA resulting in
Error in `convertSnapshot()`:
! NA
✖ An error occured while converting files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I added an if case to handle this.
…b.com/Open-Systems-Pharmacology/OSPSuite-R into convert-snapshot-dont-run-simulations
To test this: