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

Restructures into a R-package #1

Closed
wants to merge 4 commits into from
Closed

Restructures into a R-package #1

wants to merge 4 commits into from

Conversation

sk-sahu
Copy link
Contributor

@sk-sahu sk-sahu commented Jul 27, 2020

  • Restructures individual R-Scripts into a R-package
  • Adds CI/CD test for R-CMD check

@sk-sahu sk-sahu changed the title Converts into a R-package Restructures into a R-package Jul 27, 2020
Copy link
Contributor

@cgpu cgpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this one @sk-sahu.

I have a few notes keeping in mind that we want to use best practices in package development to not have to migrate to another package structure in the future.

  • For many reasons, including compatibility with other packages eg packagedown, having out of the box best practices in DESCRIPTION and depends etc, I would prefer we would use the usethis::create_package function for generating the skeleton of the package instead of manually adding the necessary files.
  • for functions and variable names it would be better to use snake_case instead of camelCase
    this is suggested by many but here's a snippet from the Advanced R book.)
    This is taken care of from the linting action see below:
    image

Variable and function names should be lowercase. Use an underscore () to separate words within a name. Generally, variable names should be nouns and function names should be verbs.

  • we should take into account linting, can be from the lintr R package. For this I added an action but I have set it up only to give warnings and not fail the test. We should strive complying to best practices with a pinch of salt if sth is not possible to be changed.
  • One more from Hadley Wickam's best practices, the name of the R package should not have a dash:

Unfortunately, this means you can’t use either hyphens or underscores, i.e., '-' or '', in your package name

Avoid using both upper and lower case letters: doing so makes the package name hard to type and even harder to remember. For example, I can never remember if it’s Rgtk2 or RGTK2 or RGtk2.

The repo therefore should be renamed to sth else eg. cloudosr or sth that respects naming conventions, open to more intuitive names.

@cgpu cgpu mentioned this pull request Aug 3, 2020
@sk-sahu
Copy link
Contributor Author

sk-sahu commented Aug 3, 2020

Closing this PR as another PR #3 is opened with implementing above suggestions.

@sk-sahu sk-sahu closed this Aug 3, 2020
@sk-sahu sk-sahu deleted the rlib-sangram branch August 3, 2020 12:09
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.

None yet

2 participants