Skip to content

Conversation

sschildhauer
Copy link
Collaborator

I am creating a default print methods for sr_model using the S3 object system. The default print provides the mean value of the posterior distribution for each parameter and all stratification iso_type combinations.

Copy link

codecov bot commented Jul 9, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
26 1 25 0
View the top 1 failed test(s) by shortest run time
print.sr_model::results_are_consistent_with_printed_output_for_sr_model_class
Stack Traces | 0.27s run time
Snapshot of code has changed:
old[3:10] vs new[3:10]
  Output
    An sr_model with the following median values:
    
-     Stratification Iso_type       alpha    shape       t1       y0      y1
+     Stratification Iso_type       alpha    shape      t1       y0       y1
-   1          typhi HlyE_IgA 0.001788800 1.538820 6.235540 2.405515 342.565
+   1          typhi HlyE_IgA 0.000869201 1.587970 6.41418 2.486935 317.1110
-   2      paratyphi HlyE_IgA 0.001272495 1.614535 3.700500 2.406050 153.787
+   2      paratyphi HlyE_IgA 0.001556295 1.561960 3.90369 2.852925 191.8805
-   3          typhi HlyE_IgG 0.001140990 1.346445 7.025800 2.073250 252.156
+   3          typhi HlyE_IgG 0.001337480 1.304980 5.88293 1.805900 297.7720
-   4      paratyphi HlyE_IgG 0.001742340 1.321350 4.370495 1.537045 288.325
+   4      paratyphi HlyE_IgG 0.001432405 1.386685 4.72698 2.330555 272.8455

* Run `testthat::snapshot_accept('print.sr_model')` to accept the change.
* Run `testthat::snapshot_review('print.sr_model')` to interactively review the change.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link

github-actions bot commented Jul 9, 2025

📖 https://ucd-serg.github.io/serodynamics/preview/pr114
Preview documentation for this PR (at commit 9f2fd61)

@sschildhauer
Copy link
Collaborator Author

I am a little confused with the warning/error I am getting here. It looks like there is a scoping issue relating to the base dataset when using dplyr, but when I fix the issue the tests are producing a warning. It seems like the solution might be in conflicting with each other. Grateful for any help!

@sschildhauer sschildhauer requested a review from d-morrison August 4, 2025 09:22
@sschildhauer
Copy link
Collaborator Author

Hi Ezra,

I am having a harder time with this PR. I am not totally sure why one of the tests is not passing. Can you take a look when you have time? Also would be happy to hop on a quick chat to discuss.

Thank you,
Sam

@sschildhauer
Copy link
Collaborator Author

Hi Ezra,

I am having a harder time with this PR. I am not totally sure why one of the tests is not passing. Can you take a look when you have time? Also would be happy to hop on a quick chat to discuss.

Thank you, Sam

It looks like the test snap is recording different values than what are produced when going through github reviews. I am not totally sure why this would be happening -- maybe the median() command is being processed differently in the github reviews. @d-morrison Any pointers are greatly appreciated here!

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