-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.RData | ||
.Ruserdata | ||
.DS_Store | ||
.Renviron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
box::use( | ||
dplyr[filter], | ||
glue[glue], | ||
httr2[ | ||
request, | ||
req_auth_bearer_token, | ||
req_dry_run, | ||
req_perform, | ||
resp_body_string, | ||
req_user_agent | ||
req_user_agent, | ||
request, | ||
resp_body_string | ||
], | ||
magrittr[`%>%`], | ||
jsonlite[fromJSON], | ||
dplyr[filter], | ||
glue[glue] | ||
magrittr[`%>%`], | ||
) | ||
|
||
#' Simple function to get the access token from environment | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. This makes sense grammatically as well as logically. Thanks for this change! |
||
#' @return url for the API | ||
get_api_url <- function( | ||
host = Sys.getenv("CONNECT_SERVER"), | ||
|
@@ -44,7 +44,7 @@ get_api_url <- function( | |
#' | ||
#' @param app_mode_filter Character. The filter for app_mode in the API | ||
#' response. Default is "shiny". | ||
#' @param url Character. The URL for API endpoint | ||
#' @param endpoint Character. Default is "content" | ||
#' @param dry_run Logical. Whether to dry run the API for debugging. | ||
#' Default is FALSE | ||
#' @export | ||
|
@@ -77,7 +77,7 @@ get_app_list <- function( | |
#' Function to get a list of all jobs for a specific app | ||
#' | ||
#' @param guid Character. The guid for the app in question | ||
#' @param url Character. The URL for API endpoint | ||
#' @param endpoint Character. Default is "content" | ||
#' @param dry_run Logical. Whether to dry run the API for debugging. | ||
#' Default is FALSE | ||
#' @export | ||
|
@@ -112,7 +112,7 @@ get_job_list <- function( | |
#' | ||
#' @param guid Character. The guid for the app in question | ||
#' @param job_key Character. The key for the job in question | ||
#' @param url Character. The URL for API endpoint | ||
#' @param endpoint Character. Default is "content" | ||
#' @param tail Logical. Whether to show the tail only for the logs | ||
#' @param dry_run Logical. Whether to dry run the API for debugging. | ||
#' Default is FALSE | ||
|
@@ -152,7 +152,7 @@ get_job_logs <- function( | |
#' | ||
#' @param guid Character. The guid for the app in question | ||
#' @param job_key Character. The key for the job in quesrtion | ||
#' @param url Character. The URL for API endpoint | ||
#' @param endpoint Character. Default is "content" | ||
#' @param dry_run Logical. Whether to dry run the API for debugging. | ||
#' Default is FALSE | ||
#' @export | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,3 @@ library(reactable) | |
library(rhino) | ||
library(rsconnect) | ||
library(shinycssloaders) | ||
library(usethis) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 themagrittr
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 ofdplyr
, so this way we can extend the backwards compatibility with no cost.