KevCaz's Website

rcites 1.3.0 is now available on CRAN 🎉. This was mainly a maintenance release following up on a recent issue in vcr (see Overview of fixes for upcoming v1.2) but I also took the opportunity to improve the set_token() function. Now the user has up to five attempts to set up the token when set_token() is called, after that error is triggered (previously the error was triggered after the first failed attempt).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# 5 attempts max 
R> set_token()
! No token has been provided yet.

Enter your token without quotes:
! No token has been provided yet.
Enter your token without quotes:
! No token has been provided yet.
Enter your token without quotes:
! No token has been provided yet.
Enter your token without quotes:
! No token has been provided yet.
Enter your token without quotes:
Error in set_token() : Token still not set after 5 attempts.

# Setting the token
R> set_token()
! No token has been provided yet.

Enter your token without quotes: 92bs29b839bs
✔ Token stored for the session.

This change made the submission to CRAN harder because I had examples within the tag \donttest that were using set_token() and the package is actually tested with the --run-donttest tag. The worst problem was an infinite while loop in an early version of the code 😱. Lesson learned, some examples must be put within the \dontrun tag and before submitting to CRAN, it is worth testing your package with the --run-donttest tag, in my case, all I had to do was:

1
2
R CMD build rcites
R CMD check --as-cran --run-donttest rcites_1.3.0.tar.gz