Nothing Special   »   [go: up one dir, main page]

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

update roxygen skeleton with return+examples #22

Merged
merged 4 commits into from
Jul 20, 2019
Merged

update roxygen skeleton with return+examples #22

merged 4 commits into from
Jul 20, 2019

Conversation

zkamvar
Copy link
Contributor
@zkamvar zkamvar commented Jul 19, 2019

Prelude

Thank you for helping out DoGe!

By contributing to DoGe you agree to the following statements (Replace [ ] with [x] with those you agree with):

Why this PR?

This provide the return and examples fields, which are both good practice, necessary for package development, and are the defaults provided by RStudio's shortcut.

By the way, I really like how this plugin "just works" ^_^

@kkoomen
Copy link
Owner
kkoomen commented Jul 19, 2019

Hi,

Please make sure to follow the contribution guidelines and provide/update tests. If you want I can do the tests for you.

Can you more explain about @examples? I don't think this is needed when not developing a package. I'm not familiar with R itself. I just learned the syntax of it so that DoGe can support it, but I don't know anything of the community and how people tend to write their code.

Didn't realize that playground wasn't tests 😳
@zkamvar
Copy link
Contributor Author
zkamvar commented Jul 20, 2019

Please make sure to follow the contribution guidelines and provide/update tests. If you want I can do the tests for you.

Sorry about that! I'm a bit new to developing and testing vim plugins, and I accidentally updated the playground instead of the actual tests! 😅

I attempted to update the tests in a6b048b, but they still don't pass and I'm not quite sure how to load the development plugin to use the playground.

Can you more explain about @examples? I don't think this is needed when not developing a package. I'm not familiar with R itself. I just learned the syntax of it so that DoGe can support it, but I don't know anything of the community and how people tend to write their code.

Certainly. The examples is just an open field for adding quick examples of how the function should run. They aren't strictly necessary when not developing a package, but it is good practice to include at least one small example. Besides, it's what RStudio includes by default for their doc skeleton, so I figured, why not? ᕕ( ᐛ )ᕗ

@kkoomen
Copy link
Owner
kkoomen commented Jul 20, 2019

I attempted to update the tests in a6b048b, but they still don't pass and I'm not quite sure how to load the development plugin to use the playground.

No worries. I'll fix the tests for you.

Certainly. The examples is just an open field for adding quick examples of how the function should run. They aren't strictly necessary when not developing a package, but it is good practice to include at least one small example. Besides, it's what RStudio includes by default for their doc skeleton, so I figured, why not? ᕕ( ᐛ )ᕗ

Okay, I'll add it for now since you're ATM the only one requesting some changes for the R language.

@kkoomen
Copy link
Owner
kkoomen commented Jul 20, 2019

I've fixed the tests. You were almost there. I did change

"#' @examples",
"#' # TODO",

into

"#' @examples",
"#' TODO",

where I remove the additional # in front of the "#' # TODO", into "#' TODO",. I assume this is not how it should be (if I am, let me know).

@kkoomen kkoomen self-assigned this Jul 20, 2019
@kkoomen kkoomen added the feature New feature or request label Jul 20, 2019
@kkoomen kkoomen merged commit c627054 into kkoomen:master Jul 20, 2019
@zkamvar
Copy link
Contributor Author
zkamvar commented Jul 20, 2019

Thank you for the help!

Regarding the comment in front of the TODO: either way works!

Regarding the indentation of examples: it is not necessary. For example, the ggplot2 package does not indent the examples:

#' @examples
#' aes(x = mpg, y = wt)
#' aes(mpg, wt)
#'
#' # You can also map aesthetics to functions of variables
#' aes(x = mpg ^ 2, y = wt / cyl)

@kkoomen
Copy link
Owner
kkoomen commented Jul 20, 2019

Your contribution has been released as v1.5.3.

Feel free to submit any new issues if you experience any unwanted behaviour in the future. Thanks for your contribution.

@zkamvar zkamvar deleted the znk-add-to-r branch July 20, 2019 15:37
@zkamvar
Copy link
Contributor Author
zkamvar commented Jul 20, 2019

Thank you for making this plugin with clear documentation and also for being patient!

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

Successfully merging this pull request may close these issues.

2 participants