xKDR / Survey.jl

Analysis of complex surveys
https://xkdr.github.io/Survey.jl/
GNU General Public License v3.0
50 stars 19 forks source link

Refactor SurveyDesign and add in-place constructor #320

Open EngPeterAtef opened 3 months ago

EngPeterAtef commented 3 months ago

This PR closes issue #232 This commit introduces a significant refactor to the SurveyDesign struct in the SurveyDesign.jl file. A new in-place constructor function, SurveyDesign!, has been added to allow for direct manipulation of the passed AbstractDataFrame. This change aims to enhance the flexibility and efficiency of survey design creation by providing an option to modify the data frame in place.

Additionally, minor formatting adjustments were made to improve code readability and consistency across the file. These include alignment of default parameter values and minor adjustments to spacing and line breaks.

The introduction of the SurveyDesign! function follows the Julia convention of using the ! suffix to indicate functions that modify their arguments in place. This change is expected to make the API more intuitive for users familiar with Julia conventions.

Overall, this refactor and the addition of the in-place constructor enhance the library's usability and maintainability.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.22%. Comparing base (6b90210) to head (980fd51).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #320 +/- ## ========================================== - Coverage 87.50% 87.22% -0.28% ========================================== Files 15 15 Lines 272 274 +2 ========================================== + Hits 238 239 +1 - Misses 34 35 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

EngPeterAtef commented 3 months ago

@ayushpatnaikgit can you please review?

ayushpatnaikgit commented 3 months ago

Hi, The test coverage seems to be going down, could you please take a look into that?