Skip to content

Commit

Permalink
Merge branch 'master' into useful-error-msgs
Browse files Browse the repository at this point in the history
* master: (23 commits)
  Improve color handling and add tests (#870)
  Change HTML percent sign to literal `%` (#871)
  Add ability to set global locale in `gt()` (#866)
  Bug fixes and enhancements to date/time formatters (#801)
  Update gt_workflow_diagram.svg
  Update gt_parts_of_a_table.svg
  Update README.md
  Add dedicated ISSUE TEMPLATEs
  Update README.md
  Delete README.Rmd
  Update intro-creating-gt-tables.Rmd
  Update LICENSE
  Make corrections to docs (`columns`/`rows`)
  Update _pkgdown.yml
  Fixes to footer (footnotes and source notes) across all output formats (#864)
  Row group labels as a column in stub (#855)
  Use reusable GHA workflows (#847)
  Increment version number
  v0.3.1 Release Candidate (#821)
  Fix for styles applied to summary cells when row groups are reordered (#814)
  ...
  • Loading branch information
rich-iannone committed Feb 2, 2022
2 parents a76ece9 + c009402 commit 43c7c5a
Show file tree
Hide file tree
Showing 104 changed files with 17,010 additions and 4,543 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Expand Up @@ -3,14 +3,15 @@
^pkgdown$
^scripts$
^\.github$
^\.gitattributes$
^\.Rproj\.user$
^gt\.Rproj$
^_pkgdown\.yml$
^codecov\.yml$
^README\.Rmd$
^README\.md$
^LICENSE\.md$
tests/gt-examples
vignettes
man/figures/.*svg$
man/figures/[^m].*png$
tests/gt-examples
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
inst/graphics/test_image.svg -text
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
@@ -0,0 +1,35 @@
---
name: Bug
about: Something is wrong with gt.
title: ''
labels: 'Type: ☹︎ Bug'
assignees: rich-iannone
---

## Prework

* [ ] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) and [contributing guidelines](https://github.com/rstudio/gt/blob/master/.github/CONTRIBUTING.md).
* [ ] If there is [already a relevant issue](https://github.com/rstudio/gt/issues), whether open or closed, comment on the existing thread instead of posting a new issue.
* [ ] Post a [minimal reproducible example](https://www.tidyverse.org/help/) so the maintainer can troubleshoot the problems you identify. A reproducible example is:
* [ ] **Runnable**: post enough R code and data so any onlooker can create the error on their own computer.
* [ ] **Minimal**: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
* [ ] **Readable**: format your code according to the [tidyverse style guide](https://style.tidyverse.org/).

## Description

Describe the bug clearly and concisely.

## Reproducible example

* [ ] Post a [minimal reproducible example](https://www.tidyverse.org/help/) so the maintainer can troubleshoot the problems you identify. A reproducible example is:
* [ ] **Runnable**: post enough R code and data so any onlooker can create the error on their own computer.
* [ ] **Minimal**: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
* [ ] **Readable**: format your code according to the [tidyverse style guide](https://style.tidyverse.org/).

## Expected result

What should have happened? Please be as specific as possible.

## Session info

End the reproducible example with a call to `sessionInfo()` in the same session (e.g. `reprex(session_info = TRUE)`) and include the output.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
@@ -0,0 +1,18 @@
---
name: New feature
about: Suggest a new feature.
title: ''
labels: 'Type: ★ Enhancement'
assignees: rich-iannone
---

## Prework

- [ ] Read and abide by **gt**'s [code of conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) and [contributing guidelines](https://github.com/rstudio/gt/blob/master/.github/CONTRIBUTING.md).
- [ ] Search for duplicates among the [existing issues](https://github.com/rstudio/gt/issues) (both open and closed).

## Proposal

Describe the new feature clearly and concisely. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output.

To help us read any code you include (optional) please try to follow the [tidyverse style guide](https://style.tidyverse.org/). The `style_text()` and `style_file()` functions from the [`styler`](https://github.com/r-lib/styler) package make it easier.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,27 @@
---
name: Question
about: Ask a question.
title: ''
labels: 'Type: ⁇ Question'
assignees: ''
---

## Prework

* [ ] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) and [contributing guidelines](https://github.com/rstudio/gt/blob/master/.github/CONTRIBUTING.md).
* [ ] If there is [already a relevant issue](https://github.com/rstudio/gt/issues), whether open or closed, comment on the existing thread instead of posting a new issue.
* [ ] For any problems you identify, a [minimal reproducible example](https://www.tidyverse.org/help/) so the maintainer can troubleshoot. A reproducible example is:
* [ ] **Runnable**: post enough R code and data so any onlooker can create the error on their own computer.
* [ ] **Minimal**: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
* [ ] **Readable**: format your code according to the [tidyverse style guide](https://style.tidyverse.org/).

## Question

What would you like to know?

## Reproducible example

* [ ] For any problems you identify, post a [minimal reproducible example](https://www.tidyverse.org/help/) so the maintainer can troubleshoot. A reproducible example is:
* [ ] **Runnable**: post enough R code and data so any onlooker can create the error on their own computer.
* [ ] **Minimal**: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
* [ ] **Readable**: format your code according to the [tidyverse style guide](https://style.tidyverse.org/).
114 changes: 14 additions & 100 deletions .github/workflows/R-CMD-check.yaml
@@ -1,107 +1,21 @@
# Workflow derived from https://github.com/rstudio/shiny-workflows
#
# NOTE: This Shiny team GHA workflow is overkill for most R packages.
# For most R packages it is better to use https://github.com/r-lib/actions
on:
push:
branches:
- master
branches: [main, master, rc-**]
pull_request:
branches:
- master
branches: [main, master]
schedule:
- cron: '0 2 * * 1' # every monday

name: R-CMD-check
name: Package checks

jobs:
website:
uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
routine:
uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: '3.5'}
- {os: macOS-latest, r: '3.6'}
- {os: macOS-latest, r: '4.0'}
- {os: windows-latest, r: '3.6'}
- {os: windows-latest, r: '4.0'}
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: false
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-2-

- name: Problematic Pkgs
shell: Rscript {0}
run: |
remotes::install_cran("htmltools")
remotes::install_cran("ellipsis")
remotes::install_cran("pillar")
remotes::install_cran("ps")
remotes::install_cran("processx")
- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
if (Sys.info()[["sysname"]] == "Windows") {
options(install.packages.compile.from.source = "never")
}
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Install rcmdcheck
shell: Rscript {0}
run: |
remotes::install_cran("rcmdcheck")
- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Test coverage
if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
run: covr::codecov()
shell: Rscript {0}
uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1
42 changes: 0 additions & 42 deletions .github/workflows/pkgdown.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Type: Package
Package: gt
Version: 0.3.0.9000
Version: 0.3.1.9000
Title: Easily Create Presentation-Ready Display Tables
Description: Build display tables from tabular data with an easy-to-use set of
functions. With its progressive approach, we can construct display tables
Expand All @@ -23,10 +23,11 @@ BugReports: https://github.com/rstudio/gt/issues
Encoding: UTF-8
LazyData: true
ByteCompile: true
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Depends:
R (>= 3.2.0)
Imports:
Imports:
base64enc (>= 0.1-3),
bitops (>= 1.0.6),
checkmate (>= 2.0.0),
commonmark (>= 1.7),
Expand All @@ -48,6 +49,7 @@ Suggests:
paletteer,
testthat (>= 2.1.0),
RColorBrewer,
lubridate,
rmarkdown,
rvest,
shiny,
Expand All @@ -57,7 +59,6 @@ Suggests:
Roxygen: list(markdown = TRUE)
Collate:
'as_data_frame.R'
'base64.R'
'build_data.R'
'compile_scss.R'
'data_color.R'
Expand All @@ -72,6 +73,7 @@ Collate:
'dt_groups_rows.R'
'dt_has_built.R'
'dt_heading.R'
'dt_locale.R'
'dt_options.R'
'dt_row_groups.R'
'dt_source_notes.R'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,2 +1,2 @@
YEAR: 2018-2021
YEAR: 2018-2022
COPYRIGHT HOLDER: RStudio, PBC
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2021 RStudio, PBC
Copyright (c) 2018-2022 RStudio, PBC

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
32 changes: 32 additions & 0 deletions NEWS.md
@@ -1,5 +1,37 @@
# gt (development version)

# gt 0.3.1

## New features

* We now have the `force_sign` argument in several numeric formatting functions (`fmt_number()`, `fmt_integer()`, `fmt_scientific()`, `fmt_engineering()`, `fmt_percent()`, `fmt_currency()`, and `fmt_bytes()`). This makes it possible to force the appearance of the positive sign for positive values (#773). (#793)

* It's now possible to add padding to the column labels and heading locations in HTML tables with two new arguments added to `tab_options()`: `column_labels.padding` and `heading.padding`. Several options already exist for easily changing the vertical padding of certain locations, so, these additions make it possible to fully alter to the padding from top to bottom (without resorting to using CSS) (#770). (#795)

* The `whitespace` argument has been added to `cell_text()` and this provides many options for making whitespace easier to handle in HTML output tables (#714). (#797)

## Minor improvements and bug fixes

* Fixed LaTeX rendering for tables that have a stub; now data row cells are correctly laid out.

* LaTeX output tables now properly render summary rows. In addition, grand summary rows are now rendered in LaTeX outputs (previously, grand summary rows were ignored). This clears the long-standing issue in #625. (#768)

* Titles and optional subtitles in LaTeX output tables have an improved appearance, and the underlying code was rewritten to guard against more edge cases that might lead to failing LaTeX output. (#779)

* The `data` argument in the `cols_label()` and `cols_width()` functions was renamed to `.data` to avoid a partial matching issue (raised in #715). (#772)

* Fixed a bug where styles may not be applied correctly to summary row cells in HTML output tables (#752). (#782)

* Incorporated the full use of X11 color names for styling HTML tables. Now, named colors like `gray50` won't throw an error. Additionally, CSS3 colors that have no equivalent in X11 (like `Crimson` and `RebeccaPurple`) will now also just work (#712). (#787)

* Fixed a bug that occurs in the following rare circumstance: when using `summary_rows()` with no stub, a new column is generated internally and given the name rowname; but this can conflict with a column that has the same name, generating duplicate column names and not erroring at that instant (#749). (#792)

* The image generation functions `local_image()` and `web_image()` are enhanced such that multiple image paths/URLs can now be handled without errors. Thanks, @primaj for the initial work on this in #738. Fixes #510. (#803)

* Fixed a bug that occurs when using a `font` with the `cell_text()` along with other styles. Fixes #661 and #802. (#805)

* Implemented a fix for the situation where `tab_style()` is used along with `cells_summary()` as a location and, also, `row_group_order()` is used to reorder row groups. This resulted in a non-application of the style to the targeted summary cells (#812). (#814)

# gt 0.3.0

This release focuses on improvements to two main areas:
Expand Down

0 comments on commit 43c7c5a

Please sign in to comment.