Comments (12)
related to usethis::use_template
that I used e.g for lockedev::use_ld_github
https://github.com/lockedata/lockedev/blob/master/R/use_ld_contributing.R
from starters.
I'm wondering whether we should encourage such templates to be stored in a package, because of usethis::use_template()
using files from packages + because of ease of installation (e.g. if I create such templates for Locke Data, easy for folks to install it).
It'd be a nearly empty packages with templates below inst/.
from starters.
You can only make people use a package if you have a createTemplatePackageProject() fn ;)
Ultimately, yes I see teams adding extensions to pRojects in their own packages, but I would like the solution to enable referencing a template file so that folks can get started more quickly when they're not yet an adept package developer
from starters.
But to get started more quickly one can rely on usethis
/pRojects
defaults anyway?
from starters.
yeah
from starters.
but I'd create a templating function like you say and maybe at the stage of creating the template package one could indicate a directory where the templates live at the moment. 😉
from starters.
so I see the future use of the things like createBasicProject() being like:
createBasicProject(..., templates_dir = system.file("templates", pkg="pRojects"), config_dir = system.file("defaults", pkg="pRojects"))
Then when people make their own templates or wanna provide config they can either point to a dir on their machines or if they build a package they can refer to their own inst/ dir
from starters.
what's config as opposed to templates? packrat values, etc?
Ideally if one has a package, one could indicate that so I'd make the argument "path_or_package", if it corresponds to an installed package, then I'd use it as a package.
from starters.
config might be whoami info or values to fill in licenses with or boilerplate yaml etc
if one had a package (say lockeutils
) I feel like they'd have a function that wraps our existing stuff but provides different default values or contents to them e.g.
createLDAnalysisProject = function(...){
createAnalysisProject(..., templates_dir = system.file("templates", pkg="lockeutils"), config_dir = system.file("defaults", pkg="lockeutils"))
}
from starters.
ah yes that's another way to imagine what the template package actually is. 🤔
it'd be lockedev
😉
from starters.
To be tackled once the "rest" is more stable.
from starters.
So I'm still not sure about just having a folder. I'd much rather rely on a package. Several elements to keep in mind.
- the package could be created by a function from
starters
to help. This function would not rely oncreatePackageProject()
I guess because it won't need any R file. - there are several lines in
starters
using templates. If there is a custom template for README.Rmd but not for something else, how do we deal with this? Ideally the package holding the custom templates would also hold non custom templates. - the package name would be used as an argument.
- this issue will mean a lot of work because we e.g. use
usethis::create_package()
so for customizing DESCRIPTION and .Rproj we'll need to change thestarters
code. So not an issue to be solved soon.
from starters.
Related Issues (20)
- start_here() function HOT 1
- packrat / Travis HOT 1
- Explore ghactions HOT 2
- Github token: Error: The 'path' is not in a git repository HOT 10
- Error: object 'github' not found HOT 8
- What is checkpoint supposed to do? HOT 7
- Add docker HOT 8
- Document the fact that gh-pages sites are public
- Make a starter shiny package template HOT 4
- start_here() Not providing default code HOT 7
- check what's said about training projects in docs
- Get rid of packrat when renv is released? HOT 3
- What happens on Travis for package projects if there's no pkgdown config file
- Ideas of screencasts HOT 3
- In vignette, add example of repos created with starters HOT 1
- improve docs of external_setup
- GitHub actions HOT 1
- Error: Conflict (HTTP 409). Failed to activate repo on Travis CI HOT 6
- Switch to GH actions for now
- Github Issue for Initialization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starters.