golem
golem copied to clipboard
Add a mechanism to help not add all files in rsconnect deployment
This is a feature request to help users of golem and prevent sending heavy bundles when deploying.
Currently, golem suggests to use rsconnect::deployApp()
but it says nothing about which files should be deployed. And the fact is all the files and folder are not necessary for a fully functionning app.
I am thinking about:
- All the development only files and folder that golem creates like
dev
- All the files and folder helpful for package development but not for run (
tests
,data-raw
, ...) - Everything that is in
.Rbuildignore
should not be needed when deployed.
The only mechanism I know in rsconnect
is a file manifest or a appFiles
argument. There is no .rsconnectIgnore
. This could also be a feature request in rsconnect to have possibility to ignore some files instead of explicitly indicate them. Golem could then build on that.
For now, it would be either be
- Just documentation to suggest that some files and folder are not required to be deploy
- Using a file manifest to explictily state the files and folder that need to be deployed. As golem standardize the project folders, it could be easy
For example, in a
files_to_deploy.txt
inst/app
R
app.R
DESCRIPTION
NAMESPACE
and rsconnect::deployApp(appFileManifest = "files_to_deploy.txt")
(Note: Example to be tested but should work)
What do you think ?
I think having a .rsconnectIgnore file would be a great addition to the reconnect package
Putting this on-hold as there is (to my knowledge) no mechanism to handle that at RSconnect level.
I wonder if app.R
and the files_to_deploy.txt
app manifest file could actually be stored in dev
instead of the parent package directory?
Not on hold anymore, see https://github.com/rstudio/rsconnect/pull/502
TODO :
- [ ]
add_rscignore_file()
that will add the files that do no need to be deployed to Connect:- [ ] Check that the
{rsconnect}
version is >= 0.8.25, skip the file writting if it is not - [ ] to ignore:
dev/
,man/
,LICENSE
,LICENCE
,NEWS
,NEWS.md
,README.(md|Rmd|HTML)
,Vignette
,tests
(maybe others)
- [ ] Check that the
- [ ] Run
add_rscignore_file()
ingolem::add_rstudioconnect_file()