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

Improved SRS Design with args error checking, better types #53

Merged
merged 10 commits into from
Sep 21, 2022

Conversation

smishr
Copy link
Contributor

@smishr smishr commented Sep 6, 2022

No description provided.

@ayushpatnaikgit
Copy link
Member

@smishr can you check where the test is failing?

@@ -2,13 +2,13 @@
function print_short(x)
# write floats in short form
if isa(x[1], Float64)
x = round.(x, sigdigits = 3)
x = round.(x, sigdigits=3)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is the formatter's doing. In that case, let's keep the style like this - without spaces around equal signs for argument values - but this should be a different PR. Also, this needs to be done in all the files in order to keep consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep the formatter reduces the space around = signs

src/SurveyDesign.jl Show resolved Hide resolved
src/SurveyDesign.jl Show resolved Hide resolved
weights = popsize ./ sampsize
popsize = first(popsize) |> UInt
else
error("If popsize not given then either sampling weights or sampling probabilities must be given")
Copy link
Contributor

Choose a reason for hiding this comment

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

"If popsize is not given ..."

data[!, :probs] = probs
# add frequency weights column to `data`
data[!, :weights] = 1 ./ data[!, :probs]
else # else weights were specified
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove "else" from the comment

src/SurveyDesign.jl Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2022

Codecov Report

Merging #53 (862b236) into design_update (aa0715a) will decrease coverage by 11.53%.
The diff coverage is 28.82%.

@@                Coverage Diff                 @@
##           design_update      #53       +/-   ##
==================================================
- Coverage          55.26%   43.73%   -11.54%     
==================================================
  Files                 12       12               
  Lines                266      327       +61     
==================================================
- Hits                 147      143        -4     
- Misses               119      184       +65     
Impacted Files Coverage Δ
src/svymean.jl 20.00% <10.71%> (-30.00%) ⬇️
src/SurveyDesign.jl 25.71% <32.39%> (+1.83%) ⬆️
src/svytotal.jl 52.94% <40.00%> (+9.19%) ⬆️
src/svyquantile.jl 52.38% <100.00%> (-29.44%) ⬇️
src/svyhist.jl 57.89% <0.00%> (-36.85%) ⬇️
src/svydesign.jl 38.59% <0.00%> (-7.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ayushpatnaikgit
Copy link
Member

Shall we merge this?

@smishr
Copy link
Contributor Author

smishr commented Sep 21, 2022

Shall we merge this?

yes

@ayushpatnaikgit ayushpatnaikgit merged commit 06f9bbd into xKDR:design_update Sep 21, 2022
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.

4 participants