Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of formatter functions #232

Merged
merged 74 commits into from
Mar 29, 2019
Merged

Conversation

rich-iannone
Copy link
Member

@rich-iannone rich-iannone commented Mar 22, 2019

The formatting functions (format_*()) need to be refactored to reduce code complexity and redundancy, and also to provide a means to better test smaller components.

This PR focuses on creating a comprehensive suite of helper functions for the various format_*() functions (some of which will also be helpful for other package internals), many more tests, and better structuring of the formatter functions.

Fixes #229, and fixes #235.

@rich-iannone rich-iannone marked this pull request as ready for review March 27, 2019 16:29
@rich-iannone rich-iannone changed the title [WIP] Refactoring of formatter functions Refactoring of formatter functions Mar 27, 2019
@rich-iannone rich-iannone requested a review from schloerke March 27, 2019 18:18
R/format_data.R Outdated Show resolved Hide resolved
R/format_data.R Outdated Show resolved Hide resolved
R/format_data.R Outdated Show resolved Hide resolved
R/format_data.R Outdated Show resolved Hide resolved
R/format_data.R Outdated Show resolved Hide resolved
R/format_data.R Show resolved Hide resolved
R/format_data.R Outdated Show resolved Hide resolved
R/format_data.R Outdated Show resolved Hide resolved
@rich-iannone rich-iannone requested a review from schloerke March 27, 2019 23:59
Copy link
Member Author

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes addressed.

schloerke
schloerke previously approved these changes Mar 29, 2019
Copy link
Collaborator

@schloerke schloerke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending the argument order of paste_between is switched. I believe there's only one situation in fmt_number_factory that needs to switch the argument order. Everything else should be ok.

@rich-iannone rich-iannone requested a review from schloerke March 29, 2019 14:53
Copy link
Collaborator

@schloerke schloerke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Appveyor is failing due to R 3.7 not existing. False positive)

@rich-iannone rich-iannone merged commit 876b862 into master Mar 29, 2019
@rich-iannone rich-iannone deleted the formatter-helper-fcns branch March 29, 2019 15:57
rich-iannone added a commit that referenced this pull request Mar 29, 2019
* master:
  Refactoring of formatter functions (#232)
  Improvement to the handling of a `pattern` in most `fmt*()` functions (#95)
  pkgdown cleanup (#226)
  Make argument names in `tab_options()` more consistent with terminology (#221)
  dplyr::data_frame deprecated (#195)
  Remove a unicode character from roxygen documentation (#220)
  Try again, this time with `travis encrypt --com`
  Trying again with github token (#223)
  Use jcheng5 GitHub PAT instead of rich-iannone (#222)
rich-iannone added a commit that referenced this pull request Apr 27, 2019
* master: (37 commits)
  Use webshot to generate images of HTML tables (#257)
  Rewritten vignette for adding summary rows (#273)
  Move roxygen documentation to Markdown (#253)
  Store empty-string value in `sep` vector (#274)
  Bugfixes and improvements to `summary_rows()` (#175)
  Modify _travis.yml (#263)
  Make several refactoring improvements to some `format_*()` functions (#244)
  Include option to hide all column labels (#237)
  Refactoring of formatter functions (#232)
  Improvement to the handling of a `pattern` in most `fmt*()` functions (#95)
  pkgdown cleanup (#226)
  Make argument names in `tab_options()` more consistent with terminology (#221)
  dplyr::data_frame deprecated (#195)
  Remove a unicode character from roxygen documentation (#220)
  Try again, this time with `travis encrypt --com`
  Trying again with github token (#223)
  Use jcheng5 GitHub PAT instead of rich-iannone (#222)
  Update README (#219)
  Fix for `fmt_date()` that allows `Date` columns to work (#203)
  Remove check on macOS
  ...
rich-iannone added a commit that referenced this pull request May 8, 2019
* master:
  Adding the `currency()` helper function for specifying custom currencies (#281)
  Enable table striping options (#236)
  Path expand all file inputs (#278)
  Use webshot to generate images of HTML tables (#257)
  Rewritten vignette for adding summary rows (#273)
  Move roxygen documentation to Markdown (#253)
  Store empty-string value in `sep` vector (#274)
  Bugfixes and improvements to `summary_rows()` (#175)
  Modify _travis.yml (#263)
  Make several refactoring improvements to some `format_*()` functions (#244)
  Include option to hide all column labels (#237)
  Refactoring of formatter functions (#232)
  Improvement to the handling of a `pattern` in most `fmt*()` functions (#95)
  pkgdown cleanup (#226)
  Make argument names in `tab_options()` more consistent with terminology (#221)
  dplyr::data_frame deprecated (#195)
  Remove a unicode character from roxygen documentation (#220)
rich-iannone added a commit that referenced this pull request May 9, 2019
* master: (44 commits)
  Have the table ID be settable, random, or absent in `gt()` (#286)
  Adding the `currency()` helper function for specifying custom currencies (#281)
  Enable table striping options (#236)
  Path expand all file inputs (#278)
  Use webshot to generate images of HTML tables (#257)
  Rewritten vignette for adding summary rows (#273)
  Move roxygen documentation to Markdown (#253)
  Store empty-string value in `sep` vector (#274)
  Bugfixes and improvements to `summary_rows()` (#175)
  Modify _travis.yml (#263)
  Make several refactoring improvements to some `format_*()` functions (#244)
  Include option to hide all column labels (#237)
  Refactoring of formatter functions (#232)
  Improvement to the handling of a `pattern` in most `fmt*()` functions (#95)
  pkgdown cleanup (#226)
  Make argument names in `tab_options()` more consistent with terminology (#221)
  dplyr::data_frame deprecated (#195)
  Remove a unicode character from roxygen documentation (#220)
  Try again, this time with `travis encrypt --com`
  Trying again with github token (#223)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants