Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN policy: authentication #22

Open
jburkhardt opened this issue Sep 19, 2019 · 1 comment
Open

CRAN policy: authentication #22

jburkhardt opened this issue Sep 19, 2019 · 1 comment

Comments

@jburkhardt
Copy link
Collaborator

You write information messages to the console that cannot be easily
suppressed.
Instead of print()/cat() rather use message()/warning() or
if(verbose)cat(..) if you really have to write text to the console.
(except for print() and summary() functions

Please ensure that your functions do not write by default or in your
examples/vignettes/tests in the user's home filespace (including the
package directory and getwd()). That is not allowed by CRAN policies.
Please only write/save files if the user has specified a directory in
the function themselves. Therefore please omit any default path =
getwd() in writing functions.
In your examples/vignettes/tests you can write to tempdir().
f.i.: authenticate()

You can unwrap the example of authenticate if there is no need for a
token for the function. If it takes longer than 5s, wrap it in \donttest.

When creating the examples please keep in mind that the structure
would be desirable:
\examples{
examples for users and checks:
executable in < 5 sec
\dontshow{
examples for checks:
executable in < 5 sec together with the examples above
not shown to users
}
\donttest{
further examples for users; not used for checks
(f.i. data loading examples, or time consuming functions )
}
\dontrun{
not used by checks, not used by example()
adds the comment ("# Not run:") as a warning for the user.
cannot run (e.g. because of missing additional software,
missing API keys, ...)
}
if(interactive()){
functions not intended for use in scripts,
or are supposed to only run interactively
(f.i. shiny)
}
}

@jburkhardt
Copy link
Collaborator Author

use input list instead of readline()
list containing: - client_id
- client_secret
- developer_token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant