Skip to content

Commit

Permalink
Fix old checkmate parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvartan committed Oct 17, 2024
1 parent 854581b commit 64b2882
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
^man-roxygen$
^Meta$
^pkgdown$
^R/\.post-render\.R$
^README\.qmd$
4 changes: 3 additions & 1 deletion R/_post-render.R → R/.post-render.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ codemetar::write_codemeta()

# Check if the script ran successfully -----

# beepr::beep(1)
beepr::beep(1)

Sys.sleep(3)
2 changes: 1 addition & 1 deletion R/flat_posixt.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ flat_posixt_date <- function(posixt, base = as.Date("1970-01-01")) {

flat_posixt_hour <- function(posixt, base = hms::parse_hms("00:00:00")) {
prettycheck:::assert_posixt(posixt)
prettycheck:::assert_hms(base, any.missing = FALSE)
prettycheck:::assert_hms(base, any_missing = FALSE)

posixt |>
lubridate::date() |>
Expand Down
2 changes: 1 addition & 1 deletion R/int_mean.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int_mean <- function(start, end, ambiguity = 24) {
cycle = lubridate::ddays())
end <- cycle_time(hms::hms(extract_seconds(end)),
cycle = lubridate::ddays())
interval <- rutils::shush(assign_date(start, end, ambiguity = ambiguity))
interval <- assign_date(start, end, ambiguity = ambiguity) |> rutils::shush()
mean <- as.numeric(start) + (as.numeric(interval) / 2)

hms::hms(mean)
Expand Down
2 changes: 1 addition & 1 deletion R/int_overlap.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int_overlap <- function(int_1, int_2) {
prettycheck:::assert_class(int_1, "Interval")
prettycheck:::assert_numeric(as.numeric(int_1), len = 1)
prettycheck:::assert_class(int_2, "Interval")
prettycheck:::assert_numeric(as.numeric(int_2), min.len = 1)
prettycheck:::assert_numeric(as.numeric(int_2), min_len = 1)

## Similar to watching a planet travelling in front of its star

Expand Down
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ editor: source
project:
output-dir: "."
render: [README.qmd]
post-render: "R/_post-render.R"
post-render: "R/.post-render.R"

format: gfm
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
},
"SystemRequirements": null
},
"fileSize": "148.481KB",
"fileSize": "147.564KB",
"citation": [
{
"@type": "CreativeWork",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-flat_posixt.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
# "Assertion on 'posixt' failed"
# )
#
# # assert_hms(base, any.missing = FALSE)
# # assert_hms(base, any_missing = FALSE)
# expect_error(
# flat_posixt_hour(posixt = Sys.time(), base = ""),
# "Assertion on 'base' failed"
Expand Down

0 comments on commit 64b2882

Please sign in to comment.