Skip to content

Commit

Permalink
Merge branch 'master' into f-250-ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 25, 2021
2 parents 9c6fe09 + 810470a commit 4e73530
Show file tree
Hide file tree
Showing 76 changed files with 2,736 additions and 1,603 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
^\.lintr$
_cache$
^\.vscode$
^vignettes/.*\.html$
15 changes: 9 additions & 6 deletions .github/workflows/R-CMD-check-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
# Can't be run as part of commits
on:
schedule:
- cron: '5 0 * * *'
- cron: '5 0 * * *' # only run on main branch
push:
paths:
- ".github/workflows/R-CMD-check-dev.yaml"
branches:
- "cran-*"
tags:
- "v*"

name: rcc dev

jobs:
matrix:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

Expand Down Expand Up @@ -235,12 +237,13 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ubuntu-18.04-r-dev-release-${{ matrix.package }}-${{steps.date.outputs.date}}
restore-keys: ubuntu-18.04-r-dev-release-${{ matrix.package }}-
key: ubuntu-20.04-r-dev-release-${{ matrix.package }}-1-${{steps.date.outputs.date}}
restore-keys: ubuntu-20.04-r-dev-release-${{ matrix.package }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
while read -r cmd
do
eval sudo $cmd
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false
# Ensure that the "cancel" workflow gets a chance to run quickly, even if we just pushed
# Need to figure out how to smoke-test
max-parallel: 6
max-parallel: 5
matrix:
config:
- { os: macOS-latest, r: 'release' }
Expand All @@ -56,10 +56,6 @@ jobs:
- {os: ubuntu-, os-version: 18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
# End custom: R 3.4

# Begin custom: R 3.3
- {os: ubuntu-, os-version: 18.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
# End custom: R 3.3

# Begin custom: matrix elements
# End custom: matrix elements
env:
Expand Down Expand Up @@ -118,6 +114,7 @@ jobs:
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
while read -r cmd
do
eval sudo $cmd
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
while read -r cmd
do
eval sudo $cmd
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/revdep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
push:
branches:
- "revdep*"
- "revdep*" # never run automatically on main branch

name: revdep

Expand Down Expand Up @@ -112,6 +112,7 @@ jobs:
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
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
cat .github/deps.sh
sudo sh < .github/deps.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
while read -r cmd
do
eval sudo $cmd
Expand Down
7 changes: 2 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pillar
Title: Coloured Formatting for Columns
Version: 1.6.1.9002
Version: 1.6.4.9000
Authors@R:
c(person(given = "Kirill",
family = "M\u00fcller",
Expand Down Expand Up @@ -50,7 +50,7 @@ VignetteBuilder:
knitr
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1.9001
RoxygenNote: 7.1.2
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/testthat/start-first:
Expand All @@ -60,6 +60,3 @@ Config/testthat/start-first:
ctl_colonnade,
ctl_colonnade_1,
ctl_colonnade_2
Remotes:
r-lib/rlang#1243,
renkun-ken/formattable#154
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ export(tbl_format_setup)
export(tbl_sum)
export(type_sum)
import(ellipsis)
import(lifecycle)
import(rlang)
importFrom(fansi,strip_sgr)
importFrom(fansi,substr2_ctl)
importFrom(lifecycle,deprecate_soft)
importFrom(utf8,utf8_width)
importFrom(utils,head)
importFrom(utils,str)
Expand Down
62 changes: 54 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,67 @@
<!-- NEWS.md is maintained by https://cynkra.github.io/fledge, do not edit -->

# pillar 1.6.1.9002
# pillar 1.6.4.9000

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


# pillar 1.6.1.9001
# pillar 1.6.4

- Fix internal logic around `vec_proxy()` and `vec_restore()` (#316).
## Bug fixes

- Fix printing for some tibbles where a fixed-width column is followed by a column with variable width (#366).
- Avoid nested backtick blocks in vignette.

## Breaking changes

- `num()` requires an integerish `digits` argument (#362).

## Documentation

- Link to tibble vignettes and documentation pages.


# pillar 1.6.3

- Avoid blanket import for lifecycle package for compatibility with upcoming rlang (#368, @romainfrancois).


# pillar 1.6.2

## Options

- 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).
- New `pillar.bidi` option. When active, control characters are inserted to improve display of data with right-to-left text (#333).
- 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).

## Formatting

- If a column doesn't make use of all horizontal width offered to it, the excess width is distributed over other columns (#331).
- Improved allocation of free space in multi-tier tables with `getOption("tibble.width") > getOption("width")` (#344).
- All pillars are shown with their true horizontal extent, irrespective of the indicated `width`. This simplifies the implementation of custom `pillar_shaft()` methods (#347).

## Features

- `num()` gains `extra_sigfig` argument to automatically show more significant figures for numbers of the same magnitude with subtle differences (#97).
- `print.tbl()` and `format.tbl()` support the `max_extra_cols` and `max_footer_lines` arguments that override the corresponding options (#360).
- `print.tbl()` and `format.tbl()` maps the now deprecated `n_extra` argument to `max_extra_cols` for consistency (#360).

## Bug fixes

- Avoid mangling of duplicate column names in footer (#332).
- Fix warning with zero of type `bit64::integer64()` (#319).
- Fix documentation on usage of `vctrs::vec_proxy()` and `vctrs::vec_restore()` (#322).

## Documentation

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

- Same as previous version.
## Internal

- Using `attr(exact = TRUE)` everywhere.
- `is_vector_s3()` is no longer generic (#181).
- Fix internal logic around `vec_proxy()` and `vec_restore()` (#316).


# pillar 1.6.1
Expand Down
47 changes: 47 additions & 0 deletions R/aaa-options.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
make_option_impl <- function(getter, option_name = NULL, env = caller_env()) {
getter_body <- enexpr(getter)

if (is.null(option_name)) {
# Assuming that the call is getOption()
option_name <- getter_body[[2]]
stopifnot(is.character(option_name))
}
name <- sub(paste0(utils::packageName(env), "."), "", option_name, fixed = TRUE)
getter_name <- paste0("get_", utils::packageName(env), "_option_", name)
local_setter_name <- paste0("local_", utils::packageName(env), "_option_", name)
setter_name <- paste0("set_", utils::packageName(env), "_option_", name)

local_setter_body <- expr(
{
out <- !!call2("local_options", !!option_name := sym("value"), .frame = sym("env"))
!!call2(getter_name)
invisible(out[[1]])
}
)

setter_body <- expr(
{
out <- !!call2("options", !!option_name := sym("value"))
!!call2(getter_name)
invisible(out[[1]])
}
)

body <- expr({
if (missing(!!sym("value"))) {
if (!missing(local)) {
abort("Can't pass `local` argument if `value` is missing.")
}
!!getter_body
} else if (local) !!local_setter_body
else !!setter_body
})

args <- pairlist2(value = , local = FALSE, env = quote(caller_env()))

assign(getter_name, new_function(list(), getter_body, env = env), env)
assign(local_setter_name, new_function(args[c(1, 3)], local_setter_body, env = env), env)
assign(setter_name, new_function(args[1], setter_body, env = env), env)

new_function(args, body, env = env)
}
Loading

0 comments on commit 4e73530

Please sign in to comment.