Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
hillalex committed Aug 14, 2024
1 parent a65aa0b commit 83ad743
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
^\.Rproj\.user$
^LICENSE\.md$
^\.github$
^LICENSE\.md$
^docker$
^\.github$
^\.idea$
^\uploads$
13 changes: 9 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
Package: serovizr
Title: R API for seroviz app
Title: R API for SeroViz app
Version: 0.0.0
Authors@R:
person("Alex", "Hill", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0009-0003-8104-1890"))
Description:
Description: "R API for SeroViz app."
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Imports:
docopt,
porcelain,
jsonlite,
logger,
Rook
mgcv,
plumber,
porcelain,
Rook,
stringr,
tibble
Remotes:
reside-ic/porcelain,
Suggests:
Expand Down
8 changes: 4 additions & 4 deletions R/api.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ target_get_version <- function() {

target_post_dataset <- function(req, res) {
parsed <- Rook::Multipart$parse(req)
file_body <- read.csv(parsed$file$tempfile)
file_body <- utils::read.csv(parsed$file$tempfile)
filename <- parsed$file$filename
filename <- stringr::str_remove_all(filename, paste0(".", tools::file_ext(filename)))
path <- file.path("uploads", filename)
Expand All @@ -27,7 +27,7 @@ target_post_dataset <- function(req, res) {
return(list(status = "failure", errors = list(error), data = NULL))
}

write.csv(file_body, path, row.names = FALSE)
utils::write.csv(file_body, path, row.names = FALSE)
return(filename)
}

Expand Down Expand Up @@ -85,7 +85,7 @@ read_dataset <- function(name) {
porcelain::porcelain_stop(paste("Did not find dataset with name ", name),
code = "BAD_REQUEST", status_code = 404L)
}
dat <- read.csv(path)
dat <- utils::read.csv(path)
dat$value <- as.numeric(dat$value)
dat
}
Expand All @@ -102,7 +102,7 @@ model_out <- function(dat) {
}
range <- range(dat$day, na.rm = TRUE)
xseq <- range[1]:range[2]
list(x = xseq, y = predict(m, tibble::data_frame(day = xseq)))
list(x = xseq, y = stats::predict(m, tibble::data_frame(day = xseq)))
}

data_out <- function(dat) {
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

<!-- badges: start -->
[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)
[![R build status](https://github.com/seroanalytics/serovizr/workflows/R-CMD-check/badge.svg)](https://github.com/seroanalytics/serovizr/actions)
[![Codecov test coverage](https://codecov.io/gh/seroanalytics/serovizr/branch/master/graph/badge.svg)](https://codecov.io/gh/seroanalytics/serovizr?branch=master)
[![R-CMD-check.yaml](https://github.com/seroanalytics/serovizr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/seroanalytics/serovizr/actions/workflows/R-CMD-check.yaml)[![Codecov test coverage](https://codecov.io/gh/seroanalytics/serovizr/branch/master/graph/badge.svg)](https://codecov.io/gh/seroanalytics/serovizr?branch=master)
<!-- badges: end -->

R API for the SeroViz app. Based on the [porcelain](https://github.com/reside-ic/porcelain) framework.
Expand Down
10 changes: 0 additions & 10 deletions tests/testthat/test-upload-dataset.R

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testtthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(testthat)
library(serovizr)

test_check("mintr")
test_check("serovizr")

0 comments on commit 83ad743

Please sign in to comment.