-
Notifications
You must be signed in to change notification settings - Fork 0
🐛 🧪 fix test bug #12
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
🐛 🧪 fix test bug #12
Conversation
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.
Pull Request Overview
Fixes typos in test code where baseline parameters were referenced incorrectly.
- Use
baseline$beta_j0_hum
instead ofmodel$params$beta_j0_hum
- Correct
b1
assignments to usebaseline$b_1_j
in two test blocks
@@ -14,14 +14,14 @@ testthat::test_that("beta_j_seasonality matches", { | |||
time_names <- seq(as.Date(model$params$date_start), as.Date(model$params$date_stop), 1) | |||
location_names <- model$params$location_name | |||
|
|||
beta_j0_hum <- model$params$beta_j0_hum | |||
beta_j0_hum <- baseline$beta_j0_hum |
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.
The test was previously pulling beta_j0_hum
from model$params
which is incorrect; it should reference baseline$beta_j0_hum
as intended.
Copilot uses AI. Check for mistakes.
beta_jt_hum_model <- model$patches$beta_jt_human | ||
beta_jt_hum_expected <- matrix(NA_real_, nrow = length(time_names), ncol = length(location_names)) | ||
|
||
# Baseline Fourier seasonality terms | ||
a1 <- baseline$a_1_j | ||
a2 <- baseline$a_2_j | ||
b1 <- baseline$a_1_j | ||
b1 <- baseline$b_1_j |
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.
Fixed a typo where b1
was assigned from baseline$a_1_j
; it should use baseline$b_1_j
to match the model definition.
Copilot uses AI. Check for mistakes.
@@ -388,7 +388,7 @@ testthat::test_that("spatial hazard calculations match", { | |||
|
|||
a1 <- baseline$a_1_j | |||
a2 <- baseline$a_2_j | |||
b1 <- baseline$a_1_j | |||
b1 <- baseline$b_1_j |
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.
Similarly, this b1
assignment in the spatial hazard test was pulling from a_1_j
by mistake; updated to baseline$b_1_j
.
Copilot uses AI. Check for mistakes.
A couple of typos in tests.