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 check tweaks #4

Merged
merged 1 commit into from
Mar 27, 2024
Merged

CRAN check tweaks #4

merged 1 commit into from
Mar 27, 2024

Conversation

slager
Copy link
Contributor

@slager slager commented Mar 26, 2024

I was curious about these CRAN check failures:

https://cran.r-project.org/web/checks/check_results_mop.html

 Version: 0.1.1
Check: code files for non-ASCII characters
Result: WARN
  Found the following file with non-ASCII characters:
    NAMESPACE
  Portable packages must use only ASCII characters in their R code and
  NAMESPACE directives, except perhaps in comments.
  Use \uxxxx escapes for other characters.
  Function ‘tools::showNonASCIIfile’ can help in finding non-ASCII
  characters in files.

The CRAN warnings were caused by ˆ instead of ^ in the NAMESPACE file.

When I fixed that character in mop_distance.R and re-ran devtools::document() to regenerate the NAMESPACE file, it fixed the first issue. However, because the regular expression now worked in exportPattern(), two undocumented helper functions were picked up by the permissive regex and added to the NAMESPACE file under exports, which in turn threw warnings in devtools::check because those two functions were not documented. I assume these two helpers were not intended to be documented or exported, so I just deleted the exportPattern() call from mop_distance.R, which resolved all of this.

The newest version of Roxygen2 also required a change to how the overall package was documented:
r-lib/roxygen2#1491

@marlonecobos marlonecobos merged commit 5070571 into marlonecobos:master Mar 27, 2024
5 checks passed
@marlonecobos
Copy link
Owner

Thanks for the fix. This was part of my to-do list. This should solve the warnings.

@slager slager deleted the fix branch March 27, 2024 01:34
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

Successfully merging this pull request may close these issues.

2 participants