-
Notifications
You must be signed in to change notification settings - Fork 1
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
Code refinement #3
Conversation
jakubnowicki
commented
May 10, 2024
- Fix code style.
- Remove redundant dependencies.
- Update functions documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works as expected. Besides a minor comment about the pipe operator, LGTM. Thank you for the improvements in code quality 🙏🏼
@@ -30,7 +30,7 @@ get_access_token <- function() { | |||
#' Simple function to make an API url | |||
#' @param host Character. Default CONNECT_SERVER set as an envvar | |||
#' @param endpoint Character. Default is "content" | |||
#' @param versioned Logical. Whether to use versioned API. Default is FALSE | |||
#' @param version Logical. Whether to use versioned API. Default is "v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense grammatically as well as logically. Thanks for this change!
jsonlite[fromJSON], | ||
dplyr[filter], | ||
glue[glue] | ||
magrittr[`%>%`], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Elkem had an older R version at first so we used %>%
instead of |>
. What do you think about changing all the pipes to the modern one and removing the magrittr
dependency entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep it, magrittr
will be there as the dependency of dplyr
, so this way we can extend the backwards compatibility with no cost.