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

Code refinement #3

Merged
merged 4 commits into from
May 10, 2024
Merged

Code refinement #3

merged 4 commits into from
May 10, 2024

Conversation

jakubnowicki
Copy link
Member

  • Fix code style.
  • Remove redundant dependencies.
  • Update functions documentation

Copy link
Member

@DeepanshKhurana DeepanshKhurana left a 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"
Copy link
Member

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[`%>%`],
Copy link
Member

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?

Copy link
Member Author

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.

@jakubnowicki jakubnowicki merged commit d373978 into main May 10, 2024
1 check passed
@jakubnowicki jakubnowicki deleted the code-refinement branch May 10, 2024 10:20
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