Skip to content

register tune_args() and tunable() methods unconditionally #193

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

Merged
merged 4 commits into from
Feb 16, 2023

Conversation

simonpcouch
Copy link
Contributor

Closes #192. :)

@simonpcouch
Copy link
Contributor Author

Seemed okay from my end, but worth double checking that this is indeed still the case with the changes in tidymodels/recipes#1087:

workflows/R/generics.R

Lines 14 to 16 in cce255e

# This also has the side effect of loading recipes, ensuring that its
# S3 methods for `required_pkgs()` are registered
if (!is_installed("recipes")) {

@simonpcouch simonpcouch requested a review from hfrick February 15, 2023 16:16
Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

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

Why is required_pkgs() part of this PR? 🤔

re tune_args() and tunable(): When I moved them here, I originally also (re)exported the generic but @DavisVaughan suggested not to do that. IIRC, the reasoning was that you only really call those functions once you are in {tune} but not when you have only {workflows} loaded. #123 (comment)

I think this still holds so I'd remove the @export tag from the imported generics (not the methods, of course)

@DavisVaughan
Copy link
Member

I would not re-export any of the generics

Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

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

Looks great!

As an additional comment, not part of this PR: there are tests for tune_args() and tunable() methods in extratests:

do you think it's worth consolidating them with the tests here?

@simonpcouch
Copy link
Contributor Author

Certainly worth looking into. :) Just opened up a separate issue, thanks!

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRAN failure with upcoming changes to utils::packageVersion()
4 participants