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

Address CRAN comments #69

Open
8 tasks done
statnmap opened this issue Feb 20, 2023 · 1 comment
Open
8 tasks done

Address CRAN comments #69

statnmap opened this issue Feb 20, 2023 · 1 comment

Comments

@statnmap
Copy link
Member

statnmap commented Feb 20, 2023

Validation criteria

  • No Missing Rd-tags for pipe.Rd: \value

#73 PR has been merged into main
Screenshot 2023-02-20 at 16 46 31

  • check_as_cran should not write in the user's home filespace

#74

image
image

  • \dontrun{} are replaced by \donttest{}

  • There is no remaining "data/iris.rda" at the root of the dev package (added during unit tests)
    image
    image

Context

  • If there are references describing the methods in your package, please
    add these in the description field of your DESCRIPTION file in the form
    authors (year) doi:...
    authors (year) arXiv:...
    authors (year, ISBN:...)
    or if those are not available: https:...
    with no space after 'doi:', 'arXiv:', 'https:' and angle brackets for
    auto-linking. (If you want to add a title as well please put it in
    quotes: "Title")

  • Please add \value to .Rd files regarding exported methods and explain
    the functions results in the documentation. Please write about the
    structure of the output (class) and also what the output means. (If a
    function does not return a value, please document that too, e.g.
    \value{No return value, called for side effects} or similar)
    Missing Rd-tags:
    pipe.Rd: \value

  • \dontrun{} should only be used if the example really cannot be executed
    (e.g. because of missing additional software, missing API keys, ...) by
    the user. That's why wrapping examples in \dontrun{} adds the comment
    ("# Not run:") as a warning for the user. Does not seem necessary.
    Please replace \dontrun with \donttest.

Please unwrap the examples if they are executable in < 5 sec, or replace
dontrun{} with \donttest{}.

  • 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()). This is not allowed by CRAN policies.
    Please omit any default path in writing functions. In your
    examples/vignettes/tests you can write to tempdir(). -> R/check_as_cran.R
@ArthurData ArthurData added this to the v0.1.0 Release on CRAN milestone Feb 20, 2023
@ArthurData ArthurData self-assigned this Feb 20, 2023
ArthurData added a commit that referenced this issue Feb 20, 2023
tags: chore

What?

- Change version

Why?

- New dev

Issue #69
ArthurData added a commit that referenced this issue Feb 20, 2023
tags: doc

What?

- run `usethis::use_pipe()`

Why?

- missing tags

issue #69
@ArthurData ArthurData linked a pull request Feb 20, 2023 that will close this issue
ArthurData added a commit that referenced this issue Feb 20, 2023
tags: chore

What?

- Change version

Why?

- New dev

Issue #69
ArthurData added a commit that referenced this issue Feb 20, 2023
tags: doc

What?

- run `usethis::use_pipe()`

Why?

- missing tags

issue #69
ArthurData added a commit that referenced this issue Mar 1, 2023
What?

- check_dir has default param

Why?

 - not write in user's home

Issue Address  CRAN comments #69
@statnmap statnmap assigned statnmap and unassigned ArthurData Mar 3, 2023
statnmap added a commit that referenced this issue Mar 3, 2023
tags: fix, doc

Why?

- URL need to be presented as reference in roxygen documentation

What?

- Use @references

issue #69
statnmap added a commit that referenced this issue Mar 3, 2023
tags: feat, doc, test

Why?

- Need to create some packages to produce examples in function

What?

- create_example_pkg() can be used for exported examples

issue #69
statnmap added a commit that referenced this issue Mar 3, 2023
tags: fix, feat

Why?

- CRAN require all directories created not to be inside current user workspace

What?

- Create a temp directory

issue #69
@statnmap
Copy link
Member Author

statnmap commented Mar 15, 2023

CRAN_comments.md

## R CMD check results

* Tested on GitHub Actions, {rhub} and Win-devel and Mac-release
* Fixed the previous error on submission concerning the number of CPU used.

0 errors | 0 warnings | 1 note

* There is one note because this is a new package.

## Address CRAN comments

- If there are references describing the methods in your package, please
add these in the description field of your DESCRIPTION file in the form
authors (year) doi:...
authors (year) arXiv:...
authors (year, ISBN:...)
or if those are not available: https:...
with no space after 'doi:', 'arXiv:', 'https:' and angle brackets for
auto-linking. (If you want to add a title as well please put it in
quotes: "Title")
=> We added link to CRAN GitHub mirror as `@references` where URL was presented.

- Please add \value to .Rd files regarding exported methods and explain
the functions results in the documentation. Please write about the
structure of the output (class) and also what the output means. (If a
function does not return a value, please document that too, e.g.
\value{No return value, called for side effects} or similar)
Missing Rd-tags:
pipe.Rd: \value
=> @return tag was added to the R script

- \dontrun{} should only be used if the example really cannot be executed
(e.g. because of missing additional software, missing API keys, ...) by
the user. That's why wrapping examples in \dontrun{} adds the comment
("# Not run:") as a warning for the user. Does not seem necessary.
Please replace \dontrun with \donttest.
Please unwrap the examples if they are executable in < 5 sec, or replace
\dontrun{} with \donttest{}.
=> We keep the use of \dontrun in majority in our examples. There are required in our function documentation because we cannot let open the possibility that checks may be run on the \donttest as we know they will fail. Indeed, we run checks inside checks which make it difficult to account for the side-effects on CRAN machines. The real use by package users will be on a direct use. 


- 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()). This is not allowed by CRAN policies.
Please omit any default path in writing functions. In your
examples/vignettes/tests you can write to tempdir(). -> R/check_as_cran.R
=> In `check_as_cran`, we set `check_dir = tempfile()` and `scratch = tempfile()` by default so that it does not write in the User's home filespace.

@ArthurData ArthurData assigned ArthurData and unassigned statnmap Apr 25, 2023
statnmap added a commit that referenced this issue Jun 19, 2023
tags: feat, doc, test

Styler does not like cat("cat('')"). Deal with multilines

issue #69
statnmap added a commit that referenced this issue Jun 19, 2023
statnmap added a commit that referenced this issue Jun 19, 2023
tags: doc

- Explain each dontrun call to have an effect either on users workspace or running local check, which won't be possible during CRAN checks.

issue #69
statnmap added a commit that referenced this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants