-
Notifications
You must be signed in to change notification settings - Fork 16
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
Change pRojects to allow the use of the checkpoint package #32
Conversation
Hey @jonmcalder, what do you think of this change? Do you think anything else needs doing on it? |
I approve! I'll review in more detail this evening when I've got time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createTrainingProject()
needs to be updated, since it still includes:
# Installation dir
usePackrat <- !methods::hasArg("packrat")
if (!usePackrat)
usePackrat <- list(...)[["packrat"]]
installDir <- ifelse(usePackrat, name, .libPaths())
and then further on:
if (usePackrat) {
packrat::snapshot(name)
packrat::restore(name)
}
This results in an error when trying to create a training project with the new gadget/template.
Position: right | ||
Parameter: packagedeps | ||
Widget: SelectInput | ||
Label: Which reproducibility package fields to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would:
a) shorten this label (e.g. just Reproducibility
), since a long line messes up the alignment in the template UI
b) group it with the other dropdowns by positioning the check boxes to the right
c) the same applies (both label and alignment) to all the other templates
Still looks pretty terrible, but slightly less terrible 😄
This also improves additional package handling and removing a package dep 🎉
Thanks for the feedback! Note in 1cf5ece I also improved arg (imo anyway ;) ) handling ...
|
@stephlocke silly question, should |
Sure, I think we can make "breaking" type changes like this, esp as this only does package setup |
Suggested packages aren't always installed so this prevents the reproducibility oriented package availability checks from triggering
@maelle this was getting to the same error on master but I think the checkpoint code could help you fix things so I've now merged it in |
Ok, will look next week probably. I think that #60 and also letting the function clean and say what was wrong will help, because clearly something went wrong inside |
When I first setup pRojects I put in a boolean flag for the use of packrat. Since then I'd been considering allowing checkpoint, especially as packrat can really get on my nerves!
This change amended the function inputs to have
packagedeps
notpackrat
as an argument and amended some code.To avoid changing expected behaviours, the functions still use
packrat
by default.