Skip to content

Commit

Permalink
Merge branch 'main' into f-400-ggplot2-num
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Jan 12, 2022
2 parents 2c7f663 + 2d76518 commit 9709497
Show file tree
Hide file tree
Showing 31 changed files with 897 additions and 697 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/R-CMD-check-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
install-r: false
cache-version: rcc-dev-${{ matrix.package }}-1
needs: check
extra-packages: "any::rcmdcheck any::remotes"
extra-packages: "any::rcmdcheck any::remotes ."
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dev version of ${{ matrix.package }}
Expand All @@ -94,6 +94,9 @@ jobs:
- uses: ./.github/workflows/custom/after-install
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''

- uses: ./.github/workflows/update-snapshots
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

- uses: ./.github/workflows/check
with:
results: ${{ matrix.package }}
6 changes: 6 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ jobs:
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''

- uses: ./.github/workflows/update-snapshots
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

- uses: ./.github/workflows/style
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

- uses: ./.github/workflows/roxygenize
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

- id: commit
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/commit

- uses: ./.github/workflows/check
Expand Down Expand Up @@ -151,6 +155,7 @@ jobs:
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''

- uses: ./.github/workflows/update-snapshots
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

- uses: ./.github/workflows/check
with:
Expand Down Expand Up @@ -213,6 +218,7 @@ jobs:
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''

- uses: ./.github/workflows/update-snapshots
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

- uses: ./.github/workflows/check
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/roxygenize/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runs:
steps:
- name: Roxygenize
run: |
roxygen2::roxygenize()
try(roxygen2::roxygenize())
shell: Rscript {0}
41 changes: 28 additions & 13 deletions .github/workflows/update-snapshots/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,46 @@ runs:
if (any(has_snapshot)) {
patterns <- gsub(rx, "^\\1$", files[has_snapshot])
pattern <- paste0(patterns, collapse = "|")
result <- as.data.frame(testthat::test_local(pattern = pattern, reporter = "silent", stop_on_failure = FALSE))
failures <- result[result$failed > 0, ]
if (nrow(failures) > 0) {
writeLines("Tests failed")
print(failures[names(failures) != "result"])
print(failures$result)
testthat::snapshot_accept()
}
tryCatch(
{
result <- as.data.frame(testthat::test_local(pattern = pattern, reporter = "silent", stop_on_failure = FALSE))
failures <- result[result$failed > 0, ]
if (nrow(failures) > 0) {
writeLines("Tests failed")
print(failures[names(failures) != "result"])
print(failures$result)
testthat::snapshot_accept()
}
},
error = print
)
}
shell: Rscript {0}

- name: Check changed files
id: check-changed
run: |
echo "::set-output name=changed::$(git status --porcelain -- tests/testthat/_snaps)"
shell: bash

- name: Derive branch name
id: matrix-branch
if: ${{ steps.check-changed.outputs.changed }}
id: matrix-desc
run: |
echo "::set-output name=name::$(echo '${{ toJSON(matrix.config) }}' | jq -c . | sed -r 's/[^0-9a-zA-Z]+/-/g;s/^-//;s/-$//')"
config=$(echo '${{ toJSON(matrix) }}' | jq -c .)
echo "::set-output name=text::$(echo ${config})"
echo "::set-output name=branch::$(echo ${config} | sed -r 's/[^0-9a-zA-Z]+/-/g;s/^-//;s/-$//')"
shell: bash

- name: Create Pull Request
- name: Create pull request
if: ${{ steps.check-changed.outputs.changed }}
id: cpr
uses: peter-evans/create-pull-request@v3
with:
base: ${{ github.head_ref }}
branch: snapshot-${{ github.ref_name }}-${{ github.job }}-${{ steps.matrix-branch.outputs.name }}
branch: snapshot-${{ github.ref_name }}-${{ github.job }}-${{ steps.matrix-desc.outputs.branch }}
delete-branch: true
title: Snapshot updates for ${{ github.job }}
title: Snapshot updates for ${{ github.job }} (${{ steps.matrix-desc.outputs.text }})
add-paths: |
tests/testthat/_snaps
Expand Down
2 changes: 1 addition & 1 deletion 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.4.9002
Version: 1.6.4.9003
Authors@R:
c(person(given = "Kirill",
family = "M\u00fcller",
Expand Down
5 changes: 2 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by roxygen2: do not edit by hand

S3method(as_tbl,data.frame)
S3method(ctl_new_compound_pillar,tbl)
S3method(ctl_new_pillar,tbl)
S3method(ctl_new_pillar_list,tbl)
S3method(extra_cols,pillar_squeezed_colonnade)
S3method(format,pillar)
S3method(format,pillar_1e)
Expand Down Expand Up @@ -54,7 +54,6 @@ S3method(pillar_shaft,pillar_vctr)
S3method(pillar_shaft,vctrs_list_of)
S3method(pillar_shaft,vctrs_unspecified)
S3method(pillar_shaft,vctrs_vctr)
S3method(print,compound_pillar)
S3method(print,pillar)
S3method(print,pillar_1e)
S3method(print,pillar_colonnade)
Expand Down Expand Up @@ -108,8 +107,8 @@ S3method(vec_ptype_full,pillar_vctr)
export(align)
export(char)
export(colonnade)
export(ctl_new_compound_pillar)
export(ctl_new_pillar)
export(ctl_new_pillar_list)
export(dim_desc)
export(expect_known_display)
export(extra_cols)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<!-- NEWS.md is maintained by https://cynkra.github.io/fledge, do not edit -->

# pillar 1.6.4.9003

- Reworked formatting routine, now using an event-based approach with in-order iteration over all pillars. The only visible changes are that usage of free space if space is limited has slightly improved (#435).
- New `ctl_new_pillar_list()`, supersedes `ctl_new_compound_pillar()` (#433).
- Fixed some cases for combinations of printed width and `getOption("width")` (#432).
- Remove dependency on the crayon package (#233, #406).


# pillar 1.6.4.9002

- List columns omit size information if horizontal space is insufficient (#392).
Expand Down
Loading

0 comments on commit 9709497

Please sign in to comment.