The bdpar project is developed in an architecture for an R package.
In this document you will find a description of this environment and the instructions to know how to contribute correctly to this project.
This project is structured as follows:
The tools that make up the development environment are the following:
Start working on the project is as simple as following the following steps:
sudo apt-get install git
. It is also recommended that you install some Git viewer such as gitk or qgit.With this, it would be enough to start working on the project. If, in addition, you want to be able to execute it locally, you must follow the following instructions.
To build the package it is necessary to have installed the devtools package which allows to build the package in the option to install and restart through the graphic interface.
In the case that the documentation in the code has been added or modified, it will be necessary to choose the option More ...-> Document.
To install the package using Github, it is necessary to have installed the devtools package and use the following command:
devtools::install_github(repo = "miferreiro/bdpar", ref = "master")
The version control model that we will use initially will be very simple since we will only use two branches:
master
: Only commits will be sent to this branch when it reaches a
stable and publishable version (a release). These versions must be tagged with the corresponding version number. develop
: This will be the main branch of work. The commits that are sent must be stable.If you want to do a push to a remote server in which there are commits new ones that we do not have in local, then Git shows an error in which it tells us that we should do a pull before being able to do push.
Since we are not interested in having to add a commit of merge additional, the pull should be done by applying an rebase. For this the command must be used:
git pull --rebase
This command will initiate a rebase process between the local branch and the remote branch. That is, local commit not pushed will happen to have the last remote commit as a parent.
Before doing a pull you should always check the integration server keep going.
In case we are in the middle of a commit (the necessary changes have not been completed to perform a commit) and we wish to download new commits from the central server, we can do it using the commands:
git stash
git pull --rebase
git stash pop
An important element to be able to collaborate is that there is uniformity in the code and other elements that are part of the development. This section serves as a small style guide that should be respected when working on the project.
In order to standardize the source code, the following rules must be respected:
One of the bases of development that we will use in this project is the integrate as soon as possible. For this, the following rules must be followed: Content of the *commits: The commits must be complete in the sense that they should not break the construction. Format: The format of the commits must respect the following rules: * Written in English. * Limit the line size to 80 columns. * First descriptive line of what the commit. * It must be written in the third person of this (e.g. Adds..., Improves..., Modifies..., etc.). * The title should not have a point at the end. * If it is an error, a descriptive phrase is placed. * Body's commit descriptive. With an empty line separating the first line, a text should be written to clearly explain the work done in the commit. Commit frequency: The commits should be done in small steps so that the frequency is high. For this it is advisable to develop in an orderly manner, attacking specific parts. Push frequency: Whenever a commit is done it should be done a push. The only exception to this rule is that we are doing local tests to evaluate a possible solution. In such a case, it is advisable that this be done in an independent branch to avoid sending commits accidentally to the develop* remote branch.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.