Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Nov 20, 2023
1 parent 6d78b58 commit deddc8a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions vignettes/collaboration.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sha <- gert::git_commit("initial", author = user, committer = user,
if (gert::git_branch(repo = path_git) == "master") {
gert::git_branch_move("master", "main", repo = path_git)
}
gert::git_clone(path_git, path_alice)
gert::git_clone(path_git, path_bob)
gert::git_clone(path_git, path_server)
Expand Down Expand Up @@ -172,7 +172,7 @@ Bob can now query for packets available on the server:

```{r, as = "bob", inwd = path_bob}
orderly2::orderly_metadata_extract(
name = "data",
name = "data",
options = list(allow_remote = TRUE, pull_metadata = TRUE))
```

Expand Down
4 changes: 2 additions & 2 deletions vignettes/common.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
## user, so be sure not to define functions here that they might want
## to use.
##
## Typically, include this in the Rmd with
## Typically, include this in the Rmd within a block like:
##
## ```{r, include = FALSE}
## source("common.R")
## ...
## ```

dir_tree <- function(path, sub = ".", ...) {
Expand Down
12 changes: 6 additions & 6 deletions vignettes/dependencies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ writeLines(c(
'd <- readRDS("data.rds")',
'png("analysis.png")',
"plot(y ~ x, d)",
'dev.off()'),
"dev.off()"),
file.path(path, "src", "analysis", "orderly.R"))
```

Expand Down Expand Up @@ -91,22 +91,22 @@ orderly2::orderly_init(path)
fs::dir_create(file.path(path, "src", "data"))
writeLines(c(
'orderly2::orderly_parameters(cyl = NULL)',
'd <- mtcars[mtcars$cyl == cyl, ]',
"orderly2::orderly_parameters(cyl = NULL)",
"d <- mtcars[mtcars$cyl == cyl, ]",
'saveRDS(d, "data.rds")'),
file.path(path, "src", "data", "orderly.R"))
fs::dir_create(file.path(path, "src", "analysis"))
writeLines(c(
'orderly2::orderly_parameters(cyl = NULL)',
'orderly2::orderly_dependency(',
"orderly2::orderly_parameters(cyl = NULL)",
"orderly2::orderly_dependency(",
' "data",',
' "latest(parameter:cyl == this:cyl)",',
' "data.rds")',
'd <- readRDS("data.rds")',
'png("analysis.png")',
"plot(mpg ~ disp, d)",
'dev.off()'),
"dev.off()"),
file.path(path, "src", "analysis", "orderly.R"))
```

Expand Down
6 changes: 3 additions & 3 deletions vignettes/introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ writeLines(c(
'd <- readRDS("incoming.rds")',
'png("analysis.png")',
"plot(y ~ x, d)",
'dev.off()'),
"dev.off()"),
file.path(path, "src", "analysis", "orderly.R"))
```

Expand Down Expand Up @@ -181,7 +181,7 @@ Let's add some additional annotations to the previous reports:
```{r, include = FALSE}
code_data <- readLines(file.path(path, "src", "incoming_data", "orderly.R"))
writeLines(c(
'orderly2::orderly_strict_mode()',
"orderly2::orderly_strict_mode()",
'orderly2::orderly_resource("data.csv")',
'orderly2::orderly_artefact("Processed data", "data.rds")',
"",
Expand Down Expand Up @@ -309,7 +309,7 @@ writeLines(c(
'd <- read.csv("data.csv")',
'png("analysis.png")',
"plot(y ~ x, d)",
'dev.off()'),
"dev.off()"),
file.path(path, "src", "use_shared", "orderly.R"))
r_output(readLines(file.path(path, "src/use_shared/orderly.R")))
```
Expand Down
21 changes: 11 additions & 10 deletions vignettes/plugins.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ writeLines(c(
"License: CC0",
"Title: Orderly Database Example Plugin",
"Description: Simple example of an orderly plugin.",
"Authors@R: person('Orderly Authors', role = c('aut', 'cre'), email = '[email protected]')",
"Authors@R: person('Orderly Authors', role = c('aut', 'cre'),",
" email = '[email protected]')",
"Imports: orderly2"),
file.path(path_pkg, "DESCRIPTION"))
Expand Down Expand Up @@ -296,30 +297,30 @@ Taking this a step further, we can also specify a [schema](https://json-schema.o
dir.create(file.path(path_pkg, "inst"), FALSE, TRUE)
path_schema <- file.path(path_pkg, "inst", "schema.json")
writeLines(c(
'{',
"{",
' "$schema": "http://json-schema.org/draft-07/schema#",',
'',
"",
' "type": "object",',
' "additionalProperties": {',
' "type": "object",',
' "properties": {',
' "query": {',
' "type": "string"',
' },',
" },",
' "rows": {',
' "type": "number"',
' },',
" },",
' "cols": {',
' "type": "array",',
' "items": {',
' "type": "character"',
' }',
' }',
' },',
" }",
" }",
" },",
' "required": ["query", "rows", "cols"],',
' "additionalProperties": false',
' }',
'}'),
" }",
"}"),
path_schema)
json_output(readLines(path_schema))
```
Expand Down

0 comments on commit deddc8a

Please sign in to comment.