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

RXR-2224: fix indexing issue iov bins #108

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Conversation

roninsightrx
Copy link
Contributor

@roninsightrx roninsightrx commented Aug 26, 2024

It was creating an array that was unneccessarily large due to a typo.
With this update, the behavior is only harmless when the requested number of bins is lower then the number of bins that were originally defined for the model. However, if the number of requested iov bins is higher than defined for the model, it would lead to a runtime error at the C++ level, since it would try to use a vector element that is not defined.
I have changed the behavior now to throw a warning for the harmless case, and an error (at the R level) for the problematic case. Have updated documentation as well. No C++ level errors should occur anymore.

@roninsightrx
Copy link
Contributor Author

roninsightrx commented Dec 20, 2024

It seems the failure of CI for pkgdown is due to the bug described here. I'm not gonna spend time trying to figure out a workaround, will just try to see if it passes next week once all CRAN servers are up-to-date.

Update 12/21: issue seems fixed now, build is passing.

@@ -20,7 +20,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated, but they have a newer version of the script available. We're using it in the other action already.

@@ -11,7 +11,7 @@ Authors@R: c(
person("Jordan", "Brooks", email = "[email protected]", role = "aut"),
person("InsightRX", role = c("cph", "fnd")))
Depends: R (>= 4.0.0)
Imports: Rcpp (>= 0.12.9), BH, data.table, stringr, MASS,
Imports: Rcpp (>= 1.0.13), BH, data.table, stringr, MASS,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated, saw that we hadn't updated this version requirement (we did in LinkingTo)

Copy link
Contributor

@mccarthy-m-g mccarthy-m-g left a comment

Choose a reason for hiding this comment

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

Looks good! I linked this to #107 for you as well.

@roninsightrx roninsightrx merged commit 4fe24fb into master Dec 20, 2024
3 checks passed
@roninsightrx roninsightrx deleted the RXR-2224-fix-warning branch December 20, 2024 21:45
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.

warning thrown from c++ level when supplied number of IOV bins is lower than specified for model
2 participants