Skip to content

Commit

Permalink
Add ci for r + better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Sep 25, 2024
1 parent ec82425 commit 412fd08
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ jobs:
run: pip install ruff
- name: Run ruff
run: ruff check python/remotebmi

r:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup R
uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
working-directory: R/remotebmi
- uses: r-lib/actions/check-r-package@v2
working-directory: R/remotebmi
3 changes: 1 addition & 2 deletions R/remotebmi/R/route.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


last_segment <- function(path) {
# keys get toLower at https://github.com/thomasp85/routr/blob/8605611a10607016a83660f83f310075787a27b2/R/route.R#L250
# keys values are lowercase at https://github.com/thomasp85/routr/blob/8605611a10607016a83660f83f310075787a27b2/R/route.R#L250
# need untouched version
segments <- unlist(strsplit(path, '/'))
return(segments[length(segments)])
Expand All @@ -23,7 +23,6 @@ last_segment <- function(path) {
#' route <- create_route(model)
#' }
#'
#' @export
create_route <- function(model) {
bmi_initialize <- function(request, response, keys, ...) {
request$parse(json = reqres::parse_json())
Expand Down
4 changes: 2 additions & 2 deletions R/remotebmi/man/serve.Rd

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

0 comments on commit 412fd08

Please sign in to comment.