Skip to content

Commit

Permalink
Make R CMD check pass (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx committed Mar 25, 2024
1 parent 20eb2e5 commit 74fd107
Show file tree
Hide file tree
Showing 212 changed files with 1,874 additions and 328 deletions.
3 changes: 3 additions & 0 deletions .codegen.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"Rscript -e \"devtools::install_dev_deps('.')\""
],
"post_generate": [
"gsed -i -- 's/\\[Deprecated, use run_id instead\\]/Deprecated, use run_id instead./g' **/*.R",
"gsed -i -- 's/\\[MLflow endpoint\\]/MLflow endpoint/g' **/*.R",
"gsed -i -- \"s/\\['timestamp asc'\\]/timestamp asc/g\" **/*.R",
"Rscript -e \"devtools::document()\""
]
}
Expand Down
13 changes: 9 additions & 4 deletions .codegen/service.R.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
#' @importFrom stats runif
NULL

{{range .Methods}}{{.Comment "#' " 80}}{{if .Request}}
{{range .Methods}}{{.Comment "#' " 80}}
#' @param client Required. Instance of DatabricksClient()
{{if .Request}}
{{if and .Wait (not .IsCrudRead)}}#'
#' @description
#' This is a long-running operation, which blocks until {{.Service.TitleName}} on Databricks reach
#' {{range $i, $s := .Wait.Success}}{{if $i}} or {{end}}{{.Content}}{{end}} state with the timeout of {{.Wait.Timeout}} minutes, that you can change via `timeout` parameter.
#' By default, the state of Databricks {{.Service.TitleName}} is reported to console. You can change this behavior
#' by changing the `callback` parameter.
{{end}}#' @param client Required. Instance of DatabricksClient()
#'{{range .Request.Fields}}
#' @param {{.SnakeName}} {{if .Required}}Required. {{end}}{{.Summary}}{{end}}
#' @param timeout Time to wait for the operation to complete in minutes.
#' @param callback Function to report the status of the operation. By default, it reports to console.
{{end}}
{{if .Request.RequiredFields}}#'
{{end}}#'{{range .Request.Fields}}
#' @param {{.SnakeName}} {{if .Required}}Required. {{end}}{{with .Summary}}{{.}}{{else}}This field has no description yet.{{end}}{{end}}
{{end}}{{if .Pagination}}#'
#' @return `data.frame` with all of the response pages.
{{end}}#'
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ deps:
@echo "✅ Installing dependencies"
@Rscript -e "if (!require(devtools)) install.packages('devtools', repos = 'https://cran.rstudio.com')"
@Rscript -e "devtools::install_dev_deps('.')"

gen: # invoked by Databricks employees
@echo "✅ Regenerating files from OpenAPI"
@oac
@Rscript -e "devtools::document()"

tarball:
@echo "✅ Building tarball"
Expand All @@ -20,7 +15,7 @@ test:
fmt:
@Rscript .codegen/format.R

check: gen
check:
@echo "✅ run R CMD check on packages"
@set -e ; \
cleanup () { rm *.tar.gz; rm -fr *.Rcheck; } ; \
Expand Down
11 changes: 10 additions & 1 deletion R/account_access_control_proxy.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions R/alerts.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion R/apps.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions R/artifact_allowlists.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion R/automatic_cluster_update.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions R/catalogs.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions R/clean_rooms.R

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 74fd107

Please sign in to comment.