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

Remove Hmisc dependency #273

Closed
wants to merge 10 commits into from
Closed

Remove Hmisc dependency #273

wants to merge 10 commits into from

Conversation

ntorresd
Copy link
Member

This PR removes Hmisc as a dependency. So far, we were using Hmisc::binconf to compute the binomial confidence interval according to the Clopper-Pearson method. As pointed out by @Bisaloo in #174, this is a very heavy dependency to be used only for this purpose.

Now, the binomial confidence interval is computed by means of dependencies already present in the packages, namely purrr and stats. I adapted the code from this post to our needs and it yields similar results as before.

@ntorresd ntorresd changed the base branch from main to cran-fixes January 21, 2025 21:18
Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

1 similar comment
Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (eeda3af) to head (83407b1).

Additional details and impacted files
@@             Coverage Diff              @@
##           cran-fixes      #273   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files               6         6           
  Lines            1015      1017    +2     
============================================
+ Hits             1015      1017    +2     

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

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link
Member

@Bisaloo Bisaloo left a comment

Choose a reason for hiding this comment

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

Visual control indicates this change returns the same value as in main, as desired.

It might however be good to add a snapshot test on prepare_serosurvey_for_plotting() to formally confirm this here and in future changes. What do you think?

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

1 similar comment
Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

@ntorresd
Copy link
Member Author

ntorresd commented Jan 27, 2025

Visual control indicates this change returns the same value as in main, as desired.

It might however be good to add a snapshot test on prepare_serosurvey_for_plotting() to formally confirm this here and in future changes. What do you think?

Thanks a lot for the review and your suggestions, @Bisaloo! Regarding the snapshot test, I would rather have a direct comparison of the results with a benchmark obtained using Hmisc::binconf(); I did this in this branch. Let me know if you agree with this test so I can bring it here. I also found some warnings in the tests regarding the function purrr::lift_vd() that I used to replace Hmisc::binconf(), it seems like it's deprecated... do you know any workaround this?

Btw, do you know how to fix the problem with pandoc that is causing the R-CMD checks to fail for some Ubuntu distributions? I'm sure I've encountered this before, but I don't remember how (if) I solved it.

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

@Bisaloo
Copy link
Member

Bisaloo commented Jan 28, 2025

Regarding the snapshot test, I would rather have a direct comparison of the results with a benchmark obtained using Hmisc::binconf(); I did this in this branch. Let me know if you agree with this test so I can bring it here

Yes, sounds good.

I also found some warnings in the tests regarding the function purrr::lift_vd() that I used to replace Hmisc::binconf(), it seems like it's deprecated... do you know any workaround this?

#274 contains a proposal for an alternative. Please double check before integrating it in case I missed anything.

Btw, do you know how to fix the problem with pandoc that is causing the R-CMD checks to fail for some Ubuntu distributions? I'm sure I've encountered this before, but I don't remember how (if) I solved it.

I cannot find mentions of pandoc in the CI failure logs. Could you link to the specific log / line you're referencing please?

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 0 new dependencies (direct and indirect)
  • Adds 0 new system dependencies
  • Removes 7 existing dependencies (direct and indirect)
  • Removes 1 existing system dependencies

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

@ntorresd
Copy link
Member Author

Clean version in #277.

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.

3 participants