Developers Guide"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Contributions are appreciated and can take various forms, such as:

Please review the following documents before making changes to the codebase.

Environment Setup

To contribute to the project, it's recommended to have your own local copy of GPCERF on your Github account. As a result, please fork the project. Then open your terminal (or Gitbash for Windows, Anaconda prompt, ...) and run the following command (brackets are not included):

git clone git@github.com:[your user name]/GPCERF.git

Now, you can modify the codebase and track your changes. Consider creating a new branch to work on the codebase. Refer to the following instructions for git branching.

Git Branching Model

While you can choose any branch name for your personal repository, maintaining consistency and understanding who's working on what is crucial. In this project, we follow the convention that is proposed by Vincent Driessen in his A successful Git branching model post.

Here is the summary of the branches:

Where to submit pull requests?

Submit all pull requests to base repository: NSAPH-Software/GPCERF and base: develop branch.

Pull request checklist

Reporting bugs

Please report potential bugs by creating a new issue or sending us an email. Please include the following information in your bug report:

Style Guide

In this project, we follow the tidyverse style guide.

Summary

Names

Spaces and Indentation

#Acceptable:
z <- x + y

#Not recommended:
z<-x+y # (no space)
z<- x+y
z<-x +y
#Acceptable:
a <- matrix(c(1:100), nrow = 5)

#Not recommended:
a <- matrix(c(1:100),nrow = 5) # (no space after comma)
a <- matrix( c(1:100), nrow = 5 ) # (extra space after and before parentheses)
a<-matrix(c(1:100), nrow = 5) # (no space around unary operator <- )
#Acceptable:
# This is a comment

#Not recommended:
#This is a comment
#    This is a comment (more than one space after #)
## This is a comment (multiple #)
###    This is a comment (multiple # and more than one space)
#Acceptable:
x <- (z + y)

#Not recommended:
x <- ( z + y ) # (unnecessary space)
x <- (z + y )
x <- ( z + y)
#Acceptible
if (x > 2) {
  print(x)
}

# Not recommended
if(x > 2){
  print(x)
}

Other notes

Notes on SuperLearner

In this package we create a customized wrapper for the SuperLearner internal libraries. Please read Notes on SL Wrappers for more details.

Logger

Use the logger to examine the internal process. By default, the level is set to "INFO", writing messages to the "GPCERF.log" file. To change the log file location and level, use the update_logger function.



Try the GPCERF package in your browser

Any scripts or data that you put into this service are public.

GPCERF documentation built on June 22, 2024, 11:30 a.m.