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

Port tests to new interface #124

Merged
merged 10 commits into from
Dec 9, 2024
Merged

Port tests to new interface #124

merged 10 commits into from
Dec 9, 2024

Conversation

richfitz
Copy link
Member

@richfitz richfitz commented Dec 6, 2024

This ports most tests over.

  • multinomial tests will require another PR, as the interface there is quite different (multinomial draws take vector args and return vector values)
  • the pointer bits still remain, but I might remove that
  • the comparison tests with the new interface remain for now

This PR allows @edknock to get the tests set up for Weibull and LogNormal though

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (e6af121) to head (f74bc48).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
- Coverage   99.52%   98.54%   -0.99%     
==========================================
  Files          73       73              
  Lines        5891     5909      +18     
==========================================
- Hits         5863     5823      -40     
- Misses         28       86      +58     

☔ 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 December 6, 2024 13:21
@richfitz richfitz requested a review from weshinsley December 6, 2024 13:21
Copy link
Contributor

@weshinsley weshinsley 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 - a couple of unimportant things I spotted...

@@ -488,6 +502,7 @@ test_that("multinomial algorithm is correct", {
size <- 20
n <- 5

r <- monty_rng$new(seed = 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't think this gets used?

tests/testthat/test-rng.R Outdated Show resolved Hide resolved
tests/testthat/test-rng.R Outdated Show resolved Hide resolved
tests/testthat/test-rng.R Outdated Show resolved Hide resolved
@richfitz richfitz merged commit 6c95da7 into main Dec 9, 2024
9 of 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