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

Rethink how we manage the dependency with r2dii.match #351

Closed
maurolepore opened this issue Jul 30, 2021 · 3 comments · Fixed by #455
Closed

Rethink how we manage the dependency with r2dii.match #351

maurolepore opened this issue Jul 30, 2021 · 3 comments · Fixed by #455
Assignees
Labels
ADO Maintenance Day! upkeep maintenance, infrastructure, and similar

Comments

@maurolepore
Copy link
Contributor

maurolepore commented Jul 30, 2021

Relates to #352

As of 2021-07-30 I see an error with debian-clang-devel at
https://cran.r-project.org/web/checks/check_results_r2dii.analysis.html

This particular error ultimately comes from an issue in stringdist, and the
maintainer seems to be working on it. However, this also makes me think
we are handling the dependency with r2dii.match in an odd way.

We new only suggest r2dii.match but we enforce it in examples. This is
contradictory. If we want to enforce r2dii.match then we should likley
add it to Imports -- not Suggests. Or if we want users to opt out of
installing r2dii.match, then we should not throw an error if it's not
installed.

Given we expect users of r2dii.analysis to indeed use r2dii.match, I think
the simplest more reasanable soluiton is to add r2dii.match to Imports.

Alternatively we could keep r2dii.match in Suggests and either a) not
run the example where it's needed, or b) export a dataset from r2dii.analysis
that bypasses the need for r2dii.match.

@maurolepore maurolepore self-assigned this Jul 30, 2021
@maurolepore maurolepore changed the title Fix CRAN check ERROR with debian-clang-devel Rethink how we manage the dependency with r2dii.match Jul 30, 2021
@jdhoffa jdhoffa assigned jdhoffa and unassigned maurolepore Jan 26, 2024
@jdhoffa
Copy link
Member

jdhoffa commented Jan 31, 2024

Relates to #352

As of 2021-07-30 I see an error with debian-clang-devel at https://cran.r-project.org/web/checks/check_results_r2dii.analysis.html

This particular error ultimately comes from an issue in stringdist, and the maintainer seems to be working on it. However, this also makes me think we are handling the dependency with r2dii.match in an odd way.

We new only suggest r2dii.match but we enforce it in examples. This is contradictory. If we want to enforce r2dii.match then we should likley add it to Imports -- not Suggests. Or if we want users to opt out of installing r2dii.match, then we should not throw an error if it's not installed.

Given we expect users of r2dii.analysis to indeed use r2dii.match, I think the simplest more reasanable soluiton is to add r2dii.match to Imports.

Alternatively we could keep r2dii.match in Suggests and either a) not run the example where it's needed, or b) export a dataset from r2dii.analysis that bypasses the need for r2dii.match.

Hey @maurolepore long time no talk!

Doing a bit of spring cleaning on these packages, and I attempted to move the r2dii.match from Suggests to Imports, but R CMD check started complaining about "depending on r2dii.match but not importing or using any functions from it".

In your experience, what would be a good way to proceed here? I tend to agree that it shouldn't be a hard dependency since we aren't actually using any functions in any of the source code (e.g. I think r2dii.match should stay in Suggests even if examples assume it is installed)... Would an approach be to wrap the example in a if statement that checks if the package is installed first?

Relates to #461

@jdhoffa jdhoffa reopened this Jan 31, 2024
@jdhoffa jdhoffa added upkeep maintenance, infrastructure, and similar ADO Maintenance Day! labels Jan 31, 2024
@maurolepore
Copy link
Contributor Author

maurolepore commented Jan 31, 2024

Yeah, sounds like a good case to list it under Suggests and use it conditionally -- maybe with @examplesIf?

I see a mention to @examplesIf here: https://r-pkgs.org/vignettes.html#sec-vignettes-eval-option

And here are some examples in the wild

https://github.com/search?q=org%3Atidyverse+%22%40examplesIf%22&type=code

#' @examplesIf rlang::is_installed("tidyr", version = "1.0.0")
#' ...

@jdhoffa
Copy link
Member

jdhoffa commented Feb 1, 2024

Thanks @maurolepore :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADO Maintenance Day! upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants