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

Removed redundant rand for test model #507

Merged
merged 2 commits into from
Jul 28, 2023
Merged

Removed redundant rand for test model #507

merged 2 commits into from
Jul 28, 2023

Conversation

yebai
Copy link
Member

@yebai yebai commented Jul 28, 2023

This rand function is redundant with

function Base.rand(
rng::Random.AbstractRNG, ::Type{NamedTuple}, model::MatrixvariateAssumeDemoModels
)
# Get template values from `model`.
retval = model(rng)
vals = (s=retval.s, m=retval.m)
# Fill containers with realizations from prior.
for i in LinearIndices(vals.s)
vals.s[i] = rand(rng, InverseGamma(2, 3))
vals.m[i] = rand(rng, Normal(0, sqrt(vals.s[i])))
end
return vals
end

@yebai yebai requested a review from JaimeRZP July 28, 2023 12:08
@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Pull Request Test Coverage Report for Build 5691744443

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 75.47%

Totals Coverage Status
Change from base Build 5680643312: 0.2%
Covered Lines: 2086
Relevant Lines: 2764

💛 - Coveralls

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.16% 🎉

Comparison is base (8440c61) 75.30% compared to head (371b962) 75.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #507      +/-   ##
==========================================
+ Coverage   75.30%   75.47%   +0.16%     
==========================================
  Files          23       23              
  Lines        2770     2764       -6     
==========================================
  Hits         2086     2086              
+ Misses        684      678       -6     
Files Changed Coverage Δ
src/test_utils.jl 84.65% <ø> (+1.41%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

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

LGTM!:)

@yebai yebai enabled auto-merge July 28, 2023 18:17
@yebai yebai added this pull request to the merge queue Jul 28, 2023
Merged via the queue into master with commit 2a1019b Jul 28, 2023
12 of 13 checks passed
@yebai yebai deleted the hg/fix-rand branch July 28, 2023 18:43
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