Skip to content

Commit 4dc1a53

Browse files
authored
Merge pull request #106 from r-lib/update-device
Update the embedded svglite implementation
2 parents 9412f37 + f173acc commit 4dc1a53

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+8756
-931
lines changed

.Rbuildignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
^docs$
1212
^pkgdown$
1313
^LICENSE\.md$
14+
^codecov\.yml$
15+
^\.github$

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- master
12+
pull_request:
13+
branches:
14+
- main
15+
- master
16+
17+
name: R-CMD-check
18+
19+
jobs:
20+
R-CMD-check:
21+
runs-on: ${{ matrix.config.os }}
22+
23+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
config:
29+
- {os: macOS-latest, r: 'release'}
30+
- {os: windows-latest, r: 'release'}
31+
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32+
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
33+
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
34+
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35+
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36+
- {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37+
- {os: ubuntu-18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
38+
39+
env:
40+
RSPM: ${{ matrix.config.rspm }}
41+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
42+
43+
steps:
44+
- uses: actions/checkout@v2
45+
46+
- uses: r-lib/actions/setup-r@v1
47+
id: install-r
48+
with:
49+
r-version: ${{ matrix.config.r }}
50+
http-user-agent: ${{ matrix.config.http-user-agent }}
51+
52+
- uses: r-lib/actions/setup-pandoc@v1
53+
54+
- name: Install pak and query dependencies
55+
run: |
56+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
57+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
58+
shell: Rscript {0}
59+
60+
- name: Restore R package cache
61+
uses: actions/cache@v2
62+
with:
63+
path: |
64+
${{ env.R_LIBS_USER }}/*
65+
!${{ env.R_LIBS_USER }}/pak
66+
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
67+
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
68+
69+
- name: Install system dependencies
70+
if: runner.os == 'Linux'
71+
run: |
72+
pak::local_system_requirements(execute = TRUE)
73+
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
74+
shell: Rscript {0}
75+
76+
- name: Install dependencies
77+
run: |
78+
pak::local_install_dev_deps(upgrade = TRUE)
79+
pak::pkg_install("rcmdcheck")
80+
shell: Rscript {0}
81+
82+
- name: Session info
83+
run: |
84+
options(width = 100)
85+
pkgs <- installed.packages()[, "Package"]
86+
sessioninfo::session_info(pkgs, include_base = TRUE)
87+
shell: Rscript {0}
88+
89+
- name: Check
90+
env:
91+
_R_CHECK_CRAN_INCOMING_: false
92+
run: |
93+
options(crayon.enabled = TRUE)
94+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
95+
shell: Rscript {0}
96+
97+
- name: Show testthat output
98+
if: always()
99+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
100+
shell: bash
101+
102+
- name: Upload check results
103+
if: failure()
104+
uses: actions/upload-artifact@main
105+
with:
106+
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
107+
path: check
108+
109+
- name: Don't use tar from old Rtools to store the cache
110+
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
111+
shell: bash
112+
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

.github/workflows/pkgdown.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
7+
name: pkgdown
8+
9+
jobs:
10+
pkgdown:
11+
runs-on: ubuntu-18.04
12+
env:
13+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/setup-r@v1
20+
id: install-r
21+
22+
- uses: r-lib/actions/setup-pandoc@v1
23+
24+
- name: Install pak and query dependencies
25+
run: |
26+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
27+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
28+
shell: Rscript {0}
29+
30+
- name: Restore R package cache
31+
uses: actions/cache@v2
32+
with:
33+
path: |
34+
${{ env.R_LIBS_USER }}/*
35+
!${{ env.R_LIBS_USER }}/pak
36+
key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
37+
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
38+
39+
- name: Install system dependencies
40+
if: runner.os == 'Linux'
41+
run: |
42+
pak::local_system_requirements(execute = TRUE)
43+
pak::pkg_system_requirements("pkgdown", execute = TRUE)
44+
shell: Rscript {0}
45+
46+
- name: Install dependencies
47+
run: |
48+
pak::local_install_dev_deps(upgrade = TRUE, dependencies = c("all", "Config/Needs/website"))
49+
pak::pkg_install("pkgdown")
50+
shell: Rscript {0}
51+
52+
- name: Install package
53+
run: R CMD INSTALL .
54+
55+
- name: Build and deploy pkgdown site
56+
run: |
57+
git config --local user.name "$GITHUB_ACTOR"
58+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
59+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: Commands
5+
jobs:
6+
document:
7+
if: startsWith(github.event.comment.body, '/document')
8+
name: document
9+
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: r-lib/actions/pr-fetch@v1
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
- uses: r-lib/actions/setup-r@v1
18+
- name: Install dependencies
19+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
20+
- name: Document
21+
run: Rscript -e 'roxygen2::roxygenise()'
22+
- name: commit
23+
run: |
24+
git config --local user.email "actions@github.com"
25+
git config --local user.name "GitHub Actions"
26+
git add man/\* NAMESPACE
27+
git commit -m 'Document'
28+
- uses: r-lib/actions/pr-push@v1
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
style:
32+
if: startsWith(github.event.comment.body, '/style')
33+
name: style
34+
runs-on: macOS-latest
35+
env:
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: r-lib/actions/pr-fetch@v1
40+
with:
41+
repo-token: ${{ secrets.GITHUB_TOKEN }}
42+
- uses: r-lib/actions/setup-r@v1
43+
- name: Install dependencies
44+
run: Rscript -e 'install.packages("styler")'
45+
- name: Style
46+
run: Rscript -e 'styler::style_pkg()'
47+
- name: commit
48+
run: |
49+
git config --local user.email "actions@github.com"
50+
git config --local user.name "GitHub Actions"
51+
git add \*.R
52+
git commit -m 'Style'
53+
- uses: r-lib/actions/pr-push@v1
54+
with:
55+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-coverage.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
pull_request:
7+
branches:
8+
- main
9+
- master
10+
11+
name: test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: ubuntu-18.04
16+
env:
17+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
18+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: r-lib/actions/setup-r@v1
24+
id: install-r
25+
26+
- name: Install pak and query dependencies
27+
run: |
28+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
29+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
30+
shell: Rscript {0}
31+
32+
- name: Restore R package cache
33+
uses: actions/cache@v2
34+
with:
35+
path: |
36+
${{ env.R_LIBS_USER }}/*
37+
!${{ env.R_LIBS_USER }}/pak
38+
key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
39+
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
40+
41+
- name: Install system dependencies
42+
if: runner.os == 'Linux'
43+
run: |
44+
pak::local_system_requirements(execute = TRUE)
45+
pak::pkg_system_requirements("covr", execute = TRUE)
46+
shell: Rscript {0}
47+
48+
- name: Install dependencies
49+
run: |
50+
pak::local_install_dev_deps(upgrade = TRUE)
51+
pak::pkg_install("covr")
52+
shell: Rscript {0}
53+
54+
- name: Test coverage
55+
run: covr::codecov()
56+
shell: Rscript {0}

.travis.yml

-24
This file was deleted.

DESCRIPTION

+4-9
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,29 @@ Depends:
3030
Imports:
3131
devtools,
3232
diffobj,
33-
fontquiver (>= 0.2.0),
34-
freetypeharfbuzz (>= 0.2.5),
35-
gdtools,
3633
glue,
3734
grDevices,
3835
htmlwidgets (>= 0.6),
3936
htmltools,
4037
purrr (>= 0.2.0),
4138
rlang,
4239
R6,
43-
Rcpp,
4440
shiny,
4541
testthat (>= 1.0.0),
4642
usethis (>= 1.4.0),
4743
xml2 (>= 1.0.0)
4844
Suggests:
45+
covr,
4946
crayon,
5047
ggplot2 (>= 3.2.0),
5148
roxygen2,
5249
rstudioapi,
5350
withr,
5451
yaml
5552
LinkingTo:
56-
freetypeharfbuzz,
57-
gdtools,
58-
Rcpp,
59-
BH
60-
RoxygenNote: 7.1.1
53+
cpp11
54+
RoxygenNote: 7.1.1.9001
6155
Roxygen: list(markdown = TRUE)
6256
URL: https://github.com/r-lib/vdiffr
6357
BugReports: https://github.com/r-lib/vdiffr/issues
58+
SystemRequirements: C++11

NAMESPACE

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export(widget_toggle_)
2727
export(write_svg)
2828
import(rlang)
2929
importFrom(R6,R6Class)
30-
importFrom(Rcpp,sourceCpp)
31-
importFrom(gdtools,raster_view)
3230
importFrom(glue,glue)
3331
importFrom(purrr,compact)
3432
importFrom(purrr,every)

R/RcppExports.R

-31
This file was deleted.

0 commit comments

Comments
 (0)