How to Write and Contribute Designs
Source:../vignettes/How_to_Write_and_Contribute_Designs.Rmd
How_to_Write_and_Contribute_Designs.Rmd
This guide provides instructions for contributing static design objects to the library at DeclareDesign.org/library. Please note, designs should be submitted as .Rmd
files (vignettes), and will not be added to the CRAN version of the DesignLibrary
.
First, install DeclareDesign
in R
:
install.packages("DeclareDesign")
A design is an object of class design
, created by concatenating a series of declare_*
calls using the +
operator in DeclareDesign
.
Contributing designs
Your design should be submitted to DesignLibrary
as an .Rmd
vignette located in the vignette subfolder of the github repository: see here.
You should submit your design via a pull request to https://github.com/DeclareDesign/DesignLibrary/. This will typically involve forking the repository, creating a new branch, adding your design to the vignettes folder, and then submitting a pull request to the DeclareDesign/DesignLibrary
repository.
When you submit the pull request, you should see a pull request template, which contains a checklist. This checklist covers additional points addressed below.
Meta-data
In order for your design to appear on the table at DeclareDesign.org/library, you will need to add some meta-data about your design to the overview.csv
file located at DesignLibrary/inst/extdata.
You should add a row with:
- the name of your design under
design
- leave
designer
blank - put the name of the vignette file without the
.Rmd
extension undervignette
- add any keywords under
keywords
, separated by commas - leave
shiny
blank - you can put your name under
author
- and a link to your website or twitter handle under
author_url
External data
Very often, more complicated designs will rely on external data. If your design requires external data to run, please make sure that it is sourced into your vignette through a publicly accessible URL. We will not accept any objects in a pull request aside from an .Rmd
file.
If in doubt…
Just post an issue and we’ll get right on it.