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

Use @exportS3Method for S3 registration #103

Merged
merged 3 commits into from Apr 3, 2024

Conversation

jcheng5
Copy link
Contributor

@jcheng5 jcheng5 commented Apr 2, 2024

If requiring R >=3.6.0 is OK, I think you can use this simpler way of registering S3 methods whose generics live in Suggests/Enhances packages.

@jcheng5 jcheng5 mentioned this pull request Apr 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.09%. Comparing base (96f41d5) to head (79c0fdd).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #103   +/-   ##
=======================================
  Coverage   99.09%   99.09%           
=======================================
  Files           8        8           
  Lines         551      551           
=======================================
  Hits          546      546           
  Misses          5        5           

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

Copy link
Owner

@shikokuchuo shikokuchuo left a comment

Choose a reason for hiding this comment

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

Thanks so much! I'll happily take the R 3.6 dependency for this simplification.

The previous code may have looked horrendous, but is actually extracted straight from the base registerS3method() / registerS3methods(). I suspect it is the registering of the onLoad hooks that may have ended up being a bit invasive.

In any case, this is a much cleaner solution.

@shikokuchuo shikokuchuo merged commit 6c2a41f into shikokuchuo:main Apr 3, 2024
7 checks passed
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.

None yet

3 participants