Skip to content

Commit 4e73530

Browse files
committed
Merge branch 'master' into f-250-ellipsis
2 parents 9c6fe09 + 810470a commit 4e73530

76 files changed

Lines changed: 2736 additions & 1603 deletions

Some content is hidden

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

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
^\.lintr$
2626
_cache$
2727
^\.vscode$
28+
^vignettes/.*\.html$

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
# Can't be run as part of commits
33
on:
44
schedule:
5-
- cron: '5 0 * * *'
5+
- cron: '5 0 * * *' # only run on main branch
66
push:
7-
paths:
8-
- ".github/workflows/R-CMD-check-dev.yaml"
7+
branches:
8+
- "cran-*"
9+
tags:
10+
- "v*"
911

1012
name: rcc dev
1113

1214
jobs:
1315
matrix:
14-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-20.04
1517
outputs:
1618
matrix: ${{ steps.set-matrix.outputs.matrix }}
1719

@@ -235,12 +237,13 @@ jobs:
235237
uses: actions/cache@v2
236238
with:
237239
path: ${{ env.R_LIBS_USER }}
238-
key: ubuntu-18.04-r-dev-release-${{ matrix.package }}-${{steps.date.outputs.date}}
239-
restore-keys: ubuntu-18.04-r-dev-release-${{ matrix.package }}-
240+
key: ubuntu-20.04-r-dev-release-${{ matrix.package }}-1-${{steps.date.outputs.date}}
241+
restore-keys: ubuntu-20.04-r-dev-release-${{ matrix.package }}-1-
240242

241243
- name: Install system dependencies
242244
if: runner.os == 'Linux'
243245
run: |
246+
sudo apt-get update -y
244247
while read -r cmd
245248
do
246249
eval sudo $cmd

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
fail-fast: false
3434
# Ensure that the "cancel" workflow gets a chance to run quickly, even if we just pushed
3535
# Need to figure out how to smoke-test
36-
max-parallel: 6
36+
max-parallel: 5
3737
matrix:
3838
config:
3939
- { os: macOS-latest, r: 'release' }
@@ -56,10 +56,6 @@ jobs:
5656
- {os: ubuntu-, os-version: 18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
5757
# End custom: R 3.4
5858

59-
# Begin custom: R 3.3
60-
- {os: ubuntu-, os-version: 18.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
61-
# End custom: R 3.3
62-
6359
# Begin custom: matrix elements
6460
# End custom: matrix elements
6561
env:
@@ -118,6 +114,7 @@ jobs:
118114
- name: Install system dependencies
119115
if: runner.os == 'Linux'
120116
run: |
117+
sudo apt-get update -y
121118
while read -r cmd
122119
do
123120
eval sudo $cmd

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
- name: Install system dependencies
9393
if: runner.os == 'Linux'
9494
run: |
95+
sudo apt-get update -y
9596
while read -r cmd
9697
do
9798
eval sudo $cmd

.github/workflows/revdep.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
on:
33
push:
44
branches:
5-
- "revdep*"
5+
- "revdep*" # never run automatically on main branch
66

77
name: revdep
88

@@ -112,6 +112,7 @@ jobs:
112112
- name: Install system dependencies
113113
if: runner.os == 'Linux'
114114
run: |
115+
sudo apt-get update -y
115116
Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04")); package <- "${{ matrix.package }}"; deps <- tools::package_dependencies(package, which = "Suggests")[[1]]; lapply(c(package, deps), function(x) { writeLines(remotes::system_requirements("ubuntu", "18.04", package = x)) })' | sort | uniq > .github/deps.sh
116117
cat .github/deps.sh
117118
sudo sh < .github/deps.sh

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
- name: Install system dependencies
6767
if: runner.os == 'Linux'
6868
run: |
69+
sudo apt-get update -y
6970
while read -r cmd
7071
do
7172
eval sudo $cmd

DESCRIPTION

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: pillar
22
Title: Coloured Formatting for Columns
3-
Version: 1.6.1.9002
3+
Version: 1.6.4.9000
44
Authors@R:
55
c(person(given = "Kirill",
66
family = "M\u00fcller",
@@ -50,7 +50,7 @@ VignetteBuilder:
5050
knitr
5151
Encoding: UTF-8
5252
Roxygen: list(markdown = TRUE)
53-
RoxygenNote: 7.1.1.9001
53+
RoxygenNote: 7.1.2
5454
Config/testthat/edition: 3
5555
Config/testthat/parallel: true
5656
Config/testthat/start-first:
@@ -60,6 +60,3 @@ Config/testthat/start-first:
6060
ctl_colonnade,
6161
ctl_colonnade_1,
6262
ctl_colonnade_2
63-
Remotes:
64-
r-lib/rlang#1243,
65-
renkun-ken/formattable#154

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ export(tbl_format_setup)
148148
export(tbl_sum)
149149
export(type_sum)
150150
import(ellipsis)
151-
import(lifecycle)
152151
import(rlang)
153152
importFrom(fansi,strip_sgr)
154153
importFrom(fansi,substr2_ctl)
154+
importFrom(lifecycle,deprecate_soft)
155155
importFrom(utf8,utf8_width)
156156
importFrom(utils,head)
157157
importFrom(utils,str)

NEWS.md

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,67 @@
11
<!-- NEWS.md is maintained by https://cynkra.github.io/fledge, do not edit -->
22

3-
# pillar 1.6.1.9002
3+
# pillar 1.6.4.9000
44

5-
- Using `attr(exact = TRUE)` everywhere.
6-
- `is_vector_s3()` is no longer generic (#181).
5+
- Same as previous version.
76

87

9-
# pillar 1.6.1.9001
8+
# pillar 1.6.4
109

11-
- Fix internal logic around `vec_proxy()` and `vec_restore()` (#316).
10+
## Bug fixes
11+
12+
- Fix printing for some tibbles where a fixed-width column is followed by a column with variable width (#366).
13+
- Avoid nested backtick blocks in vignette.
14+
15+
## Breaking changes
16+
17+
- `num()` requires an integerish `digits` argument (#362).
18+
19+
## Documentation
20+
21+
- Link to tibble vignettes and documentation pages.
22+
23+
24+
# pillar 1.6.3
25+
26+
- Avoid blanket import for lifecycle package for compatibility with upcoming rlang (#368, @romainfrancois).
27+
28+
29+
# pillar 1.6.2
30+
31+
## Options
32+
33+
- Options `pillar.print_max`, `pillar.print_min`, `pillar.width` and `pillar.max_extra_cols` are now queried before the corresponding `tibble.` or `dplyr.` options are consulted, the latter will be soft-deprecated in pillar v2.0.0 (#353).
34+
- New `pillar.bidi` option. When active, control characters are inserted to improve display of data with right-to-left text (#333).
35+
- The new `pillar.max_footer_lines` option (default: 7) allows controlling the maximum number of footer lines shown. It is applied in addition to the existing `tibble.max_extra_cols` option (#263).
36+
37+
## Formatting
38+
39+
- If a column doesn't make use of all horizontal width offered to it, the excess width is distributed over other columns (#331).
40+
- Improved allocation of free space in multi-tier tables with `getOption("tibble.width") > getOption("width")` (#344).
41+
- All pillars are shown with their true horizontal extent, irrespective of the indicated `width`. This simplifies the implementation of custom `pillar_shaft()` methods (#347).
42+
43+
## Features
44+
45+
- `num()` gains `extra_sigfig` argument to automatically show more significant figures for numbers of the same magnitude with subtle differences (#97).
46+
- `print.tbl()` and `format.tbl()` support the `max_extra_cols` and `max_footer_lines` arguments that override the corresponding options (#360).
47+
- `print.tbl()` and `format.tbl()` maps the now deprecated `n_extra` argument to `max_extra_cols` for consistency (#360).
48+
49+
## Bug fixes
50+
51+
- Avoid mangling of duplicate column names in footer (#332).
1252
- Fix warning with zero of type `bit64::integer64()` (#319).
13-
- Fix documentation on usage of `vctrs::vec_proxy()` and `vctrs::vec_restore()` (#322).
1453

54+
## Documentation
1555

16-
# pillar 1.6.1.9000
56+
- All package options are now documented in `?pillar_options` (#339).
57+
- `obj_sum()` no longer calls `type_sum()` for vectors since pillar v1.6.1, this is now documented (#321).
58+
- Fix documentation on usage of `vctrs::vec_proxy()` and `vctrs::vec_restore()` (#322).
1759

18-
- Same as previous version.
60+
## Internal
61+
62+
- Using `attr(exact = TRUE)` everywhere.
63+
- `is_vector_s3()` is no longer generic (#181).
64+
- Fix internal logic around `vec_proxy()` and `vec_restore()` (#316).
1965

2066

2167
# pillar 1.6.1

R/aaa-options.R

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
make_option_impl <- function(getter, option_name = NULL, env = caller_env()) {
2+
getter_body <- enexpr(getter)
3+
4+
if (is.null(option_name)) {
5+
# Assuming that the call is getOption()
6+
option_name <- getter_body[[2]]
7+
stopifnot(is.character(option_name))
8+
}
9+
name <- sub(paste0(utils::packageName(env), "."), "", option_name, fixed = TRUE)
10+
getter_name <- paste0("get_", utils::packageName(env), "_option_", name)
11+
local_setter_name <- paste0("local_", utils::packageName(env), "_option_", name)
12+
setter_name <- paste0("set_", utils::packageName(env), "_option_", name)
13+
14+
local_setter_body <- expr(
15+
{
16+
out <- !!call2("local_options", !!option_name := sym("value"), .frame = sym("env"))
17+
!!call2(getter_name)
18+
invisible(out[[1]])
19+
}
20+
)
21+
22+
setter_body <- expr(
23+
{
24+
out <- !!call2("options", !!option_name := sym("value"))
25+
!!call2(getter_name)
26+
invisible(out[[1]])
27+
}
28+
)
29+
30+
body <- expr({
31+
if (missing(!!sym("value"))) {
32+
if (!missing(local)) {
33+
abort("Can't pass `local` argument if `value` is missing.")
34+
}
35+
!!getter_body
36+
} else if (local) !!local_setter_body
37+
else !!setter_body
38+
})
39+
40+
args <- pairlist2(value = , local = FALSE, env = quote(caller_env()))
41+
42+
assign(getter_name, new_function(list(), getter_body, env = env), env)
43+
assign(local_setter_name, new_function(args[c(1, 3)], local_setter_body, env = env), env)
44+
assign(setter_name, new_function(args[1], setter_body, env = env), env)
45+
46+
new_function(args, body, env = env)
47+
}

0 commit comments

Comments
 (0)