... | ... | @@ -234,3 +234,84 @@ EITHER from GitLab |
|
|
- Assign to the project coordinator
|
|
|
- Click on "Submit merge request"
|
|
|
```
|
|
|
### Tester steps
|
|
|
|
|
|
6+7-
|
|
|
|
|
|
```
|
|
|
· Run /shared/earth/software/scripts/test-s2dverification branch_name
|
|
|
· If you run it from within the s2dverification GIT repository, the clone will be skipped
|
|
|
· If any error raises please tell the developer
|
|
|
· An R session will open where you can load the new version of the package with library(name_of_the_package)
|
|
|
· If you want to test from Rstudio you can load an installation that the test script has generated (see script notifications)
|
|
|
```
|
|
|
|
|
|
8- When the tests are performed and passed approve the MR with an approval comment (write :+1: in a message in the MR discussion)
|
|
|
|
|
|
### Coordinator steps
|
|
|
|
|
|
9- Validate and perform the merge clicking on “Accept Merge Request”, with “Remove source-branch” marked.
|
|
|
|
|
|
```
|
|
|
- It is important before accepting the merge request to run the test script on the branch which is going to be merged.
|
|
|
- Even at that stage conflicts could appear. In that case, solve them meeting the developers involved.
|
|
|
- After merging and removing a branch from GitLab, carefully delete the branch from your local Git repository with git branch -D branch_name
|
|
|
```
|
|
|
|
|
|
### Steps to build and check a package manually
|
|
|
|
|
|
Set the following environment variables with the commands
|
|
|
|
|
|
```sh
|
|
|
_R_CHECK_RD_XREFS_=false
|
|
|
export _R_CHECK_RD_XREFS_
|
|
|
```
|
|
|
|
|
|
You can place the commands above in your .bashrc file if you develop in this package frequently.
|
|
|
|
|
|
Go to the repository directory and build the package tarball with the command
|
|
|
|
|
|
```sh
|
|
|
R CMD build --resave-data /path/to/repository
|
|
|
```
|
|
|
|
|
|
This will create a .tar.gz file in the current directory (repository main folder) with the source files compressed, ready to install.
|
|
|
|
|
|
Check that the tarball is installable with the command
|
|
|
|
|
|
```sh
|
|
|
R CMD check --no-examples /path/to/tarball.tar.gz
|
|
|
```
|
|
|
|
|
|
This will advice you if there is any problem with the added changes and will run the example code in the '.Rd' files. Also will generate in your current directory the folder 's2dverification.Rcheck', that contains the log files of a set of tests to ensure the tarball will be installable. This folder also contains the folder 's2dverification' with an installation of the package and the file 's2dverification-manual.pdf', a handsome user manual generated automatically from the files in the folder 'man'. A copy of it is being kept in the project main folder.
|
|
|
|
|
|
If you wish, for tidy purposes, you can run the two previous commands in the project main folder. The tarball and the .Rcheck folder will be generated there breaking the package structure, but will be ignored when you push the changes to the repository.
|
|
|
|
|
|
If you wish, you can enable the execution of the example code removing the parameter '–no-examples':
|
|
|
|
|
|
```sh
|
|
|
R CMD check /path/to/tarball.tar.gz
|
|
|
```
|
|
|
|
|
|
The example execution takes a long time, but it is run at least before every release to CRAN.
|
|
|
|
|
|
Optionally you can start R and load the installation of the package in the 's2dverification.Rcheck' repository with the command
|
|
|
|
|
|
```r
|
|
|
library(s2dverification, lib.loc = '/path/to/s2dverification.Rcheck/')
|
|
|
```
|
|
|
|
|
|
and check that the modified functionalities work properly again.
|
|
|
|
|
|
### Steps to add a new function to a package
|
|
|
|
|
|
* Put the code of the function in a file named 'FunctionName.R' and place it in the `R` folder.
|
|
|
* Make sure the code of the function follows the style rules (information below header, history, …).
|
|
|
* Load the function with source() in an R session.
|
|
|
* Type prompt(FunctionName). This will generate an .Rd file in the working directory.
|
|
|
* Place the .Rd file into 'man' folder.
|
|
|
* Fill in the .Rd file with the function documentation. Most of the text in this file should coincide with the text in the comments below the function header.
|
|
|
|
|
|
### Reminder
|
|
|
|
|
|
Each function in the folder `R` has a corresponding .Rd file in the `man` folder, and the text in the .Rd will be used to generate the user manual and will appear when you type `?FunctionName`. |