Skip to content

Commit

Permalink
Merge pull request #17 from ropensci/no_empty_args
Browse files Browse the repository at this point in the history
Remove trailing commas
  • Loading branch information
mikemahoney218 authored Feb 1, 2024
2 parents 266739c + 5015a62 commit 29985d3
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 26 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Suggests:
sf
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.3.1
Config/testthat/edition: 3
Config/testthat/parallel: true
URL: https://docs.ropensci.org/unifir/, https://github.com/ropensci/unifir
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(print,unifir_script)
export(action)
export(add_default_player)
export(add_default_tree)
Expand All @@ -26,3 +27,4 @@ export(validate_path)
export(validate_single_path)
export(waiver)
importFrom(R6,R6Class)
importFrom(utils,head)
2 changes: 1 addition & 1 deletion R/load_png.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ load_png <- function(script,
readChar(prop$prop_file, file.info(prop$prop_file)$size),
.open = "%",
.close = "%",
method_name = prop$method_name,
method_name = prop$method_name
)
},
using = c("System", "System.IO", "UnityEngine")
Expand Down
2 changes: 0 additions & 2 deletions R/make_script.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ make_script <- function(project,
),
using = character(0)
)

class(script) <- "unifir_script"
script
}

Expand Down
2 changes: 1 addition & 1 deletion R/read_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ read_raw <- function(script,
readChar(prop$prop_file, file.info(prop$prop_file)$size),
.open = "%",
.close = "%",
method_name = prop$method_name,
method_name = prop$method_name
)
},
using = c("System", "System.IO")
Expand Down
1 change: 1 addition & 0 deletions R/unifir-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
#' @importFrom R6 R6Class

## usethis namespace: start
#' @importFrom utils head
## usethis namespace: end
NULL
9 changes: 9 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ unity_version <- function(unity = NULL) {
#'
#' @export
waiver <- function() structure(list(), class = "waiver")

#' @export
print.unifir_script <- function(x, ..., n = 6) {
cat(paste("A `unifir_script` object with", nrow(x$beats), "props\n\n"))
display <- head(x$beats[c("name", "type")], n)
rownames(display) <- NULL
print(display, ..., n)
invisible(x)
}
36 changes: 17 additions & 19 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
# Platform

|field |value |
|:--------|:-------------------------------------------------------------|
|version |R version 4.2.1 (2022-06-23) |
|os |Ubuntu 20.04.4 LTS |
|system |x86_64, linux-gnu |
|ui |RStudio |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/New_York |
|date |2022-08-11 |
|rstudio |2022.07.1+554 Spotted Wakerobin (desktop) |
|pandoc |2.18 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown) |
|field |value |
|:--------|:---------------------------------------------------------------|
|version |R version 4.2.2 Patched (2022-11-10 r83330) |
|os |Ubuntu 22.04.1 LTS |
|system |x86_64, linux-gnu |
|ui |RStudio |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/New_York |
|date |2022-12-02 |
|rstudio |2022.07.2+576 Spotted Wakerobin (desktop) |
|pandoc |2.19.2 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown) |

# Dependencies

|package |old |new |Δ |
|:---------------|:-----|:----------|:--|
|unifir |0.2.1 |0.2.1.9000 |* |
|glue |1.6.2 |1.6.2 | |
|proceduralnames |0.2.1 |0.2.1 | |
|R6 |2.5.1 |2.5.1 | |
|package |old |new |Δ |
|:---------------|:-----|:-----|:--|
|unifir |0.2.2 |0.2.2 |NA |
|proceduralnames |0.2.2 |0.2.2 |NA |

# Revdeps

2 changes: 2 additions & 0 deletions tests/testthat/test-associate_coordinates.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ test_that("associate_coordinates is stable", {
# Being not in the possession of M1 macs nor the ability to fix terra,
# I am temporarily skipping this test until one of those things changes
skip_on_os(os = "mac", arch = "aarch64")
skip_if_not_installed("sf")
skip_if_not_installed("terra")
out <- associate_coordinates(
sf::st_as_sf(data.frame(x = 5, y = 5), coords = c("x", "y"), crs = "EPSG:5071"),
terra::rast(matrix(data = rep(1, 100), nrow = 10), crs = "EPSG:5071")
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-make_script.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ test_that("make_script always produces the same script", {
initialize_project = NULL
)

expect_match(
class(example_script),
expect_s3_class(
example_script,
"unifir_script"
)

Expand Down

0 comments on commit 29985d3

Please sign in to comment.