Skip to content

Commit

Permalink
github actions v2 (so MASS doesn't need R >= 4.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
debruine committed Jun 1, 2022
1 parent 5d473b6 commit 3c91230
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck

Expand Down
7 changes: 6 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
0 errors | 0 warnings | 1 note

* This is a new release.

* I have addressed all requested changes in Gregor Seyer's report (thanks!)
* Examples for un-exported functions have been removed.
* Examples now only use dontrun{} when the functions
Expand All @@ -12,4 +13,8 @@
- change user options (wm_opts, wm_opts_defaults)
- require a personal token for a web API (auto_delin)
* Examples for functions that require access to a web API without a personal token (avg, trans, symmetrise, continuum, loop) now check for site accessibility with a new function (webmorph_up) instead of using dontrun{}. All are also wrapped in \donttest{}.
* The old working directory is now restored in inst/app/app.R using `oldwd <- getwd(); on.exit(oldwd)` in the relevant function. (Sorry; I thought changes to wd in a shiny app didn't affect the user's wd.)
* The old working directory is now restored in inst/app/app.R using `oldwd <- getwd(); on.exit(oldwd)` in the relevant function. (Sorry; I thought changes to wd in a shiny app didn't affect the user's wd.)

* I found and fixed two small bugs today (while trying to make a pride flag demo, which is an unusual use case), so updated the version to 0.1.1 and hope this gets to you before you look at the previous version.
- Fixed a bug when cropping `blank()` images with no names
- Fixed a bug when using `image_func()` when func = "composite" and the length of stimuli and composite_image are the same.
Binary file removed prog_pride.png
Binary file not shown.
17 changes: 10 additions & 7 deletions stuff/pride.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# devtools::install_github("debruine/webmorphR")
library(webmorphR)
wm_opts(fill = "none")

# colors via https://twitter.com/dataandme/status/1531946768270860288?s=20&t=J25ZA4UETcz-awixPP5gDA
pride <- c(
red = '#E50000',
orange = '#FF8D00',
Expand All @@ -15,22 +17,23 @@ pride <- c(
white = '#FFFFFF'
)

stripes <- blank(6, width = 500, height = 50, color = pride[1:6])

flag <- plot(stripes, nrow = 6, padding = 0)
stripes <- blank(6, width = 500, height = 50, color = pride[1:6]) |>
plot(nrow = 6, padding = 0)

corner <- blank(1, 200, 200, color = pride["white"]) |>
pad(50, fill = pride["pink"]) |>
pad(50, fill = pride["aqua"]) |>
pad(50, fill = pride["brown"]) |>
pad(50, fill = pride["black"]) |>
rotate(degrees = 45,
keep_size = FALSE) |>
keep_size = FALSE) |>
crop(width = 0.5, height = 2/3,
x_off = 0.5, y_off = 1/6) |>
resize(height = height(flag))
resize(height = height(stripes))

prog_pride <- image_func(flag, "composite", corner$img$img)
flag <- image_func(stripes, "composite", corner$img$img)

write_stim(prog_pride, names = "prog_pride.png")
plot(flag) # view image

# write to disk
write_stim(flag, names = "prog_pride.png")

0 comments on commit 3c91230

Please sign in to comment.