We welcome any kind of contribution to our software, from simple comment or question to a full fledged pull request. Please read and follow our Code of Conduct.
A contribution can be one of the following cases:
The sections below outline the steps in each case.
inst/NEWS.Rd
are updated;DESCRIPTION
file;In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request.
We loosely follow the tidyverse style guide, but do not enforce every rule strictly.
For instance, we prefer =
instead of <-
as the default assignment operator.
When in doubt about what style to use, don't hesitate to get in touch.
Some general guidelines that we try to adhere to:
If you are a first time contributor, don't worry about coding style too much. We will help you get things in shape.
We currently have three sources for documenting the package:
pkgdown
package).The reference manual gets the information from the .Rd documents within the man
folder in the package repository. Therefore, updating the information in those
files will automatically update the reference manual. Note that most of the GGIR
functions are not intended for direct interaction with the user, as such, the
documentation of most arguments is centralized in the details section of man/GGIR.Rd.
If you for example want to add an extra parameter to params_247
then this should
be documented there. Further, you should not forget to include the new argument in
functions \link{load_params} and \link{check_params}. The pull request template has a
form that will help you check all these points.
The folder vignettes in the GGIR repository contains the .Rmd files. The .Rmd files that do not start with the word 'chapter' are used for the traditional package vignettes as hosted by CRAN. Use these files to edit an existing vignette, or use the structure of any of the vignettes to build up a new one. All .Rmd files which name starts with the word 'chapter' are ignored. These chapter-vignettes are used only for the github.io website (see next section).
To create a new vignette for CRAN
To create a new package vignette for CRAN, please use usethis::use_vignette()
and
make sure the name of the vignette file does not start by "chapter". For example,
if you want to create a new vignette on sleep for CRAN, you may do the following:
usethis::use_vignette(name = "sleep",
title = "How to analyse your sleep data in GGIR")
This would create a new "sleep.Rmd" file within the vignettes folder in the GGIR repository. Then you can edit this file to build up the vignette.
To remove a vignette from CRAN
There are two ways to remove a vignette from CRAN:
^vignettes/GGIRParameters.Rmd
For updating or adding information to the github.io website, we need to use the pkgdown configuration file that can be found in the repositories root directory, as well as with the chapter vignettes discussed above.
General comment: As contributor please NEVER run the command pkgdown::build_site()
.
I (Vincent van Hees) will run this command in the master branch prior to each new
GGIR release. If multiple contributors would be running this command in their own
development branches we risk complex merge conflicts between the many html files
that are auto-generated by this function.
To edit information in an existing chapter
As stated above do NOT run pkgdown::build_site()
.
To add a new chapter
usethis::use_vignette()
and make sure the
name of the vignette starts by "chapter", for example: usethis::use_vignette(name = "chapterSleep",
title = "10. How to analyse your sleep data in GGIR")
As stated above do NOT run pkgdown::build_site()
.
To remove a chapter
As stated above do NOT run pkgdown::build_site()
.
To edit the name of a chapter
Chapter names are defined twice, in the _pkgdown.yml file and in the vignette file itself. You need to make sure both titles match as the first will be used in the drop-down list in the github.io website and the other in the specific page for the chapter.
The last step would be committing and pushing your changes to github and making a pull request as with any other contribution to the package.
GGIR follows the release cycle process described in this document.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.