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

About add_package_checks() #74

Closed
pat-s opened this issue Aug 4, 2018 · 10 comments
Closed

About add_package_checks() #74

pat-s opened this issue Aug 4, 2018 · 10 comments
Assignees
Milestone

Comments

@pat-s
Copy link
Member

pat-s commented Aug 4, 2018

The function is pretty magical as it does a lot of stuff in the background.

For non-experienced users it might lead to confusion whats going on actually.

Combined with the possible danger of specifying steps twice #68 (comment), one option would be to omit this function and explicitly place all its steps in the template?

If not, we should probably warn in prepare_all_stages if certain steps (e.g. build_pkgdown, codecov, update_packages) are defined multiple times?

@pat-s pat-s changed the title About add_package_checks() About add_package_checks() Aug 4, 2018
@pat-s pat-s mentioned this issue Aug 4, 2018
@krlmlr
Copy link
Collaborator

krlmlr commented Aug 6, 2018

Interesting. I thought most users could just use add_package_checks() in their tic.R, and that this would become the default for package checks. Would make it easier to update the strategy for package checks later too.

The private argument to add_package_checks() complicates matters. I'll see how to get rid of it, perhaps tic.R will need library(tic) but would become self-contained in the result.

@pat-s
Copy link
Member Author

pat-s commented Aug 6, 2018

I thought most users could just use add_package_checks() in their tic.R, and that this would become the default for package checks. Would make it easier to update the strategy for package checks later too.

This is the big advantage of it, yes. I definitely see the point. But I also see the potential to cause confusion. If users want to change something in the default, they have to define all single steps and stages on their own taking care of not duplicating stuff. Or leaving add_package_checks() out completely.
Users unfamiliar with tic who read tic.R and see all the stages/steps stuff might think they know whats going on but will most likely miss add_package_checks() and will be confused where certain steps are coming from.

Even if we take care of the duplication problem, it will cause confusion which step of add_package_checks() is currently really active and which is only a duplicate.

Maybe it would be good to have some other views on it; @maelle maybe?

@krlmlr
Copy link
Collaborator

krlmlr commented Aug 6, 2018

We need to communicate that users should use either use add_package_checks() or add_step(step_rcmdcheck()) etc., but not both. The semantics of add_package_checks() are documented in ?DSL , and the function's contents should look like it can be copy-pasted directly to a tic.R file for further editing (which it currently doesn't but will do).

@maelle
Copy link
Member

maelle commented Aug 7, 2018

It could be like goodpractice::gp that uses a default list of checks by default, but one can pass a different list?

@krlmlr
Copy link
Collaborator

krlmlr commented Aug 12, 2018

Need to think about it a bit. I like the idea of check templates, which consist of adding one or more steps added to one or more stages. Let's break down add_package_checks().

@krlmlr
Copy link
Collaborator

krlmlr commented Aug 12, 2018

The add_package_checks() macro got much leaner now, essentially only including step_rcmdcheck() call and a call to run coverage checks.

This function adds value, though: the user doesn't need to think about which stage(s) to add the step(s) to. I think the way forward here is to provide an add_rcmdcheck() and an add_covr() function and have add_package_checks() call these.

@pat-s
Copy link
Member Author

pat-s commented Aug 13, 2018

The add_package_checks() macro got much leaner now, essentially only including step_rcmdcheck() call and a call to run coverage checks.

What about build_pkgdown()?

@pat-s pat-s added this to the v1.0.0 (CRAN) milestone Aug 13, 2018
@krlmlr
Copy link
Collaborator

krlmlr commented Aug 13, 2018

add_build_pkgdown() ?

@maelle
Copy link
Member

maelle commented Aug 13, 2018

A step involving lintr? cf r-lib/lintr#340 (comment)

@krlmlr
Copy link
Collaborator

krlmlr commented Mar 31, 2019

As discussed today: TicStepWithPackageDeps should be a step (perhaps step_install_deps()), not a base class. The add_package_checks() macro includes this step, but it's not included by default with step_rcmdcheck().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants