Skip to content

Commit a0bd272

Browse files
committed
upkeep
1 parent 0fc53e0 commit a0bd272

15 files changed

Lines changed: 250 additions & 60 deletions

‎.Rbuildignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ visual_test
1010
^revdep$
1111
^vignettes/profilings
1212
^LICENSE\.md$
13+
^\.github$

‎.github/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
#
4+
# NOTE: This workflow is overkill for most R packages and
5+
# check-standard.yaml is likely a better choice.
6+
# usethis::use_github_action("check-standard") will install it.
7+
on:
8+
push:
9+
branches: [main, master]
10+
pull_request:
11+
branches: [main, master]
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {os: macOS-latest, r: 'release'}
26+
27+
- {os: windows-latest, r: 'release'}
28+
# Use 3.6 to trigger usage of RTools35
29+
- {os: windows-latest, r: '3.6'}
30+
31+
# Use older ubuntu to maximise backward compatibility
32+
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
33+
- {os: ubuntu-18.04, r: 'release'}
34+
- {os: ubuntu-18.04, r: 'oldrel-1'}
35+
- {os: ubuntu-18.04, r: 'oldrel-2'}
36+
- {os: ubuntu-18.04, r: 'oldrel-3'}
37+
- {os: ubuntu-18.04, r: 'oldrel-4'}
38+
39+
env:
40+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
41+
R_KEEP_PKG_SOURCE: yes
42+
43+
steps:
44+
- uses: actions/checkout@v2
45+
46+
- uses: r-lib/actions/setup-pandoc@v1
47+
48+
- uses: r-lib/actions/setup-r@v1
49+
with:
50+
r-version: ${{ matrix.config.r }}
51+
http-user-agent: ${{ matrix.config.http-user-agent }}
52+
use-public-rspm: true
53+
54+
- uses: r-lib/actions/setup-r-dependencies@v1
55+
with:
56+
extra-packages: rcmdcheck
57+
58+
- uses: r-lib/actions/check-r-package@v1
59+
60+
- name: Show testthat output
61+
if: always()
62+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
63+
shell: bash
64+
65+
- name: Upload check results
66+
if: failure()
67+
uses: actions/upload-artifact@main
68+
with:
69+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
70+
path: check

‎.github/workflows/pkgdown.yaml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
tags: ['*']
7+
8+
name: pkgdown
9+
10+
jobs:
11+
pkgdown:
12+
runs-on: ubuntu-latest
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: r-lib/actions/setup-pandoc@v1
19+
20+
- uses: r-lib/actions/setup-r@v1
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v1
25+
with:
26+
extra-packages: pkgdown
27+
needs: website
28+
29+
- name: Deploy package
30+
run: |
31+
git config --local user.name "$GITHUB_ACTOR"
32+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
33+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

‎.github/workflows/pr-commands.yaml‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
name: Commands
8+
9+
jobs:
10+
document:
11+
if: startsWith(github.event.comment.body, '/document')
12+
name: document
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/pr-fetch@v1
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- uses: r-lib/actions/setup-r@v1
24+
with:
25+
use-public-rspm: true
26+
27+
- uses: r-lib/actions/setup-r-dependencies@v1
28+
with:
29+
extra-packages: roxygen2
30+
31+
- name: Document
32+
run: Rscript -e 'roxygen2::roxygenise()'
33+
34+
- name: commit
35+
run: |
36+
git config --local user.name "$GITHUB_ACTOR"
37+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
38+
git add man/\* NAMESPACE
39+
git commit -m 'Document'
40+
41+
- uses: r-lib/actions/pr-push@v1
42+
with:
43+
repo-token: ${{ secrets.GITHUB_TOKEN }}
44+
45+
style:
46+
if: startsWith(github.event.comment.body, '/style')
47+
name: style
48+
runs-on: ubuntu-latest
49+
env:
50+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- uses: r-lib/actions/pr-fetch@v1
55+
with:
56+
repo-token: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- uses: r-lib/actions/setup-r@v1
59+
60+
- name: Install dependencies
61+
run: Rscript -e 'install.packages("styler")'
62+
63+
- name: Style
64+
run: Rscript -e 'styler::style_pkg()'
65+
66+
- name: commit
67+
run: |
68+
git config --local user.name "$GITHUB_ACTOR"
69+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
70+
git add \*.R
71+
git commit -m 'Style'
72+
73+
- uses: r-lib/actions/pr-push@v1
74+
with:
75+
repo-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- uses: r-lib/actions/setup-r@v1
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v1
25+
with:
26+
extra-packages: covr
27+
28+
- name: Test coverage
29+
run: covr::codecov()
30+
shell: Rscript {0}

‎.travis.yml‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎DESCRIPTION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Description: Tools to make it easier to work with "tables" of
1616
'grobs'. The 'gtable' package defines a 'gtable' grob class that specifies a
1717
grid along with a list of grobs and their placement in the grid. Further the
1818
package makes it easy to manipulate and combine 'gtable' objects so that
19-
complex compositions can be build up sequentially.
19+
complex compositions can be built up sequentially.
2020
License: MIT + file LICENSE
2121
Depends:
2222
R (>= 3.0)

‎R/grid.r‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ makeContent.gtable <- function(x) {
5757
vp_name = vpname(x$layout),
5858
t = .subset2(x$layout, "t"), r = .subset2(x$layout, "r"),
5959
b = .subset2(x$layout, "b"), l = .subset2(x$layout, "l"),
60-
clip = x$layout$clip,
60+
clip = .subset2(x$layout, "clip"),
6161
SIMPLIFY = FALSE
6262
)
6363
x$grobs <- mapply(wrap_gtableChild, x$grobs, children_vps,
@@ -90,8 +90,5 @@ child_vp <- function(vp_name, t, r, b, l, clip) {
9090
# Turn a grob into a gtableChild, and store information about the
9191
# viewport used within the gtable
9292
wrap_gtableChild <- function(grob, vp) {
93-
grob$wrapvp <- vp
94-
grob$name <- vp$name
95-
class(grob) <- c("gTableChild", class(grob))
96-
grob
93+
grobTree(grob, name = vp$name, vp = vp)
9794
}

‎README.Rmd‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ options(width = 90)
1616
```
1717
# gtable <img src="man/figures/logo.png" align="right"/>
1818

19-
[![Travis build status](https://travis-ci.org/r-lib/gtable.svg?branch=master)](https://travis-ci.org/r-lib/gtable)
19+
<!-- badges: start -->
20+
[![R-CMD-check](https://github.com/r-lib/gtable/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/gtable/actions)
2021
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/gtable)](http://cran.r-project.org/package=gtable)
21-
[![Coverage status](https://codecov.io/gh/r-lib/gtable/branch/master/graph/badge.svg)](https://codecov.io/github/r-lib/gtable?branch=master)
22+
[![Codecov test coverage](https://codecov.io/gh/r-lib/gtable/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/gtable?branch=main)
2223
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
24+
<!-- badges: end -->
2325

2426
gtable is a layout engine built on top of the grid package. It is used to abstract away the creation of (potentially nested) grids of viewports into which graphic objects can be placed. gtable makes it easy to ensure alignment of graphic elements and piecemeal compositions of complex graphics. gtable is the layout engine powering [ggplot2](https://ggplot2.tidyverse.org) and is thus used extensively by many plotting functions in R without being called directly.
2527

0 commit comments

Comments
 (0)