Please wait for some discussion of your report before making a Pull Request.
Describe the bugcreate_compendium("/home/UserName/DeleteThisRrtoolsPackage") from GitHub (d091ec1) does one of two things:
If you use the function while RStudio is inside a project (e.g., "DeleteThisDockerPackage")
Writes into "DeleteThisDockerPackage" directory (possibly over files) and only creates .gitignore, .Rbuildignore, DESCRIPTION, NAMESPACE, and DeleteThisRrtoolsPackage.Rproj in /home/UserName/DeleteThisRrtoolsPackage
If you use the function while RStudio is NOT inside a project (e.g., from working directory (getwd()): /home/UserName)
Error: Path '/home/UserName/' does not appear to be inside a project or package.
In addition: Warning message:
In path_file(base_path) : restarting interrupted promise evaluation
I think this stems from rrtools/R/core_create_compendium.R lines 21-22, where setwd(pkgname) is commented:
# move us into the new project
# setwd(pkgname)
To Reproduce
Outside a project:
Launch Docker container, docker run -e PASSWORD=<YOUR_PASS> -p 8787:8787 rocker/verse:3.6.3
Login to localhost:8787 on your browser with username: rstudio and password: <YOUR_PASS>
Enter remotes::install_github("benmarwick/rrtools") in the RStudio console
Enter rrtools::create_compendium("/home/rstudio/DeleteThisRrtoolsPackage") in the RStudio console
Inside a project (after the above "Outside a project"):
Click Project: (None) in the upper right of RStudio IDE
Click New Project > New Directory > R Package
Name it "DeleteThisDockerPackage" and click Create New Package
Enter rrtools::create_compendium("/home/rstudio/DeleteThisRrtoolsPackage") in the RStudio console
Expected behaviorrrtools::create_compendium() should put all rrtools template files into the new rrtools package directory and leave the starting directory untouched.
Please wait for some discussion of your report before making a Pull Request.
Describe the bug
create_compendium("/home/UserName/DeleteThisRrtoolsPackage")
from GitHub (d091ec1
) does one of two things:.gitignore
,.Rbuildignore
,DESCRIPTION
,NAMESPACE
, andDeleteThisRrtoolsPackage.Rproj
in/home/UserName/DeleteThisRrtoolsPackage
getwd()
):/home/UserName
)I think this stems from
rrtools/R/core_create_compendium.R
lines 21-22, wheresetwd(pkgname)
is commented:To Reproduce
Outside a project:
docker run -e PASSWORD=<YOUR_PASS> -p 8787:8787 rocker/verse:3.6.3
localhost:8787
on your browser with username:rstudio
and password:<YOUR_PASS>
remotes::install_github("benmarwick/rrtools")
in the RStudio consolerrtools::create_compendium("/home/rstudio/DeleteThisRrtoolsPackage")
in the RStudio consoleInside a project (after the above "Outside a project"):
Project: (None)
in the upper right of RStudio IDENew Project > New Directory > R Package
Create New Package
rrtools::create_compendium("/home/rstudio/DeleteThisRrtoolsPackage")
in the RStudio consoleExpected behavior
rrtools::create_compendium()
should put allrrtools
template files into the newrrtools
package directory and leave the starting directory untouched.