Closed corybrunson closed 3 years ago
In both branches (coverage
and coverage2
), rPref
is in Imports in DESCRIPTION; shouldn't this guarantee that rPref will be installed? (line 198 in persistence.R checks if it's installed)
A side note: if uncertain about whether a package is available, I've seen 2 ways of handling it - first, by checking utils::installed.packages()
, as is done here; second, by using requireNamespace(..., quietly = TRUE)
as shown here in the Suggests bullet. Any idea which is better or if they're equivalent?
Hm. No idea on the second question; clearly i'm new to this sort of concern! But good call on the first. I'll see what happens when i demote rPref—i don't know if checks will fail.
By the way, why is ripserr imported rather than also only suggested?
Good catch, I think it'd be better to move ripserr to Suggests as well and check if it's installed w/in vignettes (or wherever it's being used).
Actually, i think vignettes can use packages without qualification if they're suggested rather than imported. For example, the "Labeling small strata" vignette in ggalluvial calls ggrepel and ggfittext, both of which are only Suggests
in the DESCRIPTION. I believe this does cause issues if you try to build vignettes but don't have these packages installed.
So, if OK with you, i'll just move risperr to Suggests
and see if problems arise. Shall we do that in a separate branch after these PRs are resolved?
I see, good to know! Yes, that sounds like an appropriate plan. This PR looks good to me, approving changes now, merge at your convenience. Will look at #25 after this is merged. Thanks!
Helpfully, when i deleted the coverage
branch, the destination of this PR changed from there to main
.
@rrrlw oh no, i misinterpreted you! I should have merged this commit first. What do you think of the changes just merged in #25 ? It won't be much work to undo them but i know it's now harder to compare them.
Here's a comparison of the merge to the most recent commit before it—something i was not sure how to do until just now: https://github.com/rrrlw/ggtda/compare/5b2694d..4397d16
All good, just looked over and it looks okay; this one is also good to merge, thanks!
I personally think this solution is better. We don't need 100% coverage, and this commit allows coverage of both pareto calculators without making the underlying code too strange.
This is a sub-branch of
coverage
, so the PR is directed there. Accepting both PRs will (theoretically) end with this commit inmain
.