Recent Releases of snakecase

snakecase - Long standing issues

snakecase 0.11.0 (25.05.19)

Changes in 0.10.0 and 0.10.0.9000

New functionality:

  • abbreviations: Abbreviations are now ...
    • ... matched case-insensitive inside of groups of connected lower/upper case sequences.
    • ... consistently formatted according to the supplied case.
    • ... formatted exactly as supplied for the cases title, mixed, lower and upper camel.
    • ... protected from the parsing. This means that
    • special characters in abbreviations don't need to be taken care of anymore. The formatting of digits or special characters like hyphens, colons etc. will be formatted as specified.
  • parsing_option:
    • new parsing option 3 parses "SOmeNIceSTUFf".
    • parsing options starting with a minus (-1, -2, -3) don't interprete non-alphanumeric characters as word boundaries. E.g. "This.text" will stay "This.text" in upper camel case.
  • cases
    • title: New case which should be especially useful for automatic generation of proper labels within graphics or business reports. Builds up on sentence case which is wrapped within tools::toTitleCase().
    • random: New case, which will randomly convert letters into upper or lower case.
  • numerals: new alignment option "tight" which allows to suppress all underscores between numerals and letters.
  • sep_out: sep_out gets proper vectorization. In case of length(sep_out) > 1 differing substrings are connected by the (possibly) differing elements of sep_out. Therefore, sep_out gets accordingly shortened or the last element of sep_out gets recycled to match the number of needed separators for each element of string.
  • UTF8 Conversion: Input is now always converted to UTF-8 and returned as UTF8. Also the transliterations argument is now aware of non-UTF8 encoded input.

Infrastructure:

  • CII best practices badge: Achieved the criteria for the best practices badge. Current status is under https://bestpractices.coreinfrastructure.org/de/projects/2475
  • R Version: Increase from 3.1 to 3.2 regarding the usage of tools::toTitleCase() inside to_title_case().
  • Vignettes: The blog article "Introducing the snakecase package" was added as a vignette.
  • Documentation: The readme, the examples and the function documentation were updated according to the new functionality.
  • Resolve CRAN notes:
    • Tests: Skip to_any_case() tests (janitor-pkg-tests, transliterations and complex strings) when platform charset is not UTF-8 to resolve CRAN notification regarding character encoding.
    • Vignettes: Build the package with new version of knitr to resolve CRAN notification regarding vignette encoding.

- R
Published by Tazinho over 6 years ago

snakecase - More options

snakecase 0.9.2

  • cases: added to_sentence_case() (same as snake, but first letter is uppercase and default sep_out is space).
  • numerals: added numerals argument to all caseconverters including to_any_case() to format the alignment of digits (middle, left,right, asis). Therefore parsing_option nr 4 might be removed in later releases, as it is the same as parsing_option = 1 and numerals = "asis".
  • transliterations: When named character elements are supplied as part of transliterations, anyting that mateches the name is replaced by the corresponding value.
  • attributes are now preserved (not only names as before)

- R
Published by Tazinho over 7 years ago

snakecase - Beginner friendly

sep_in: Change default from NULL to "[^[:alnum:]]". This will make it easier for beginners and in general also faster to modify cases from strings like names(iris). Updated the regarding sections in the vignette, docu and readme.

- R
Published by Tazinho almost 8 years ago

snakecase - Roundup

  • parsing_options:
    • old parsing_options 3 and 4 are replaced now by new
    • parsing_option 3, which suppreses case conversion around alpha numerics
    • parsing_option 4, which introduces less formatting of numerals in the output, and leaves them very close to the way that they appeared in the input strings.
  • abbreviations:
    • they work now more consistent with cases like lower- and upper camel case
  • new converters:
    • toswapcase is new. Within toanycase this conversion can be called also via case = "flip".
  • removed deprecated arguments
    • replace_special_characters, which is now called transliterations
    • preprocess, which is now called sep_in
    • postprocess, which is now called sep_out
  • removed dependencies:
    • purrr and magrittr are not longer dependencies
    • stringr is the only dependency now (including stringi of course).

- R
Published by Tazinho almost 8 years ago

snakecase - Interface simplifications

  • reordering of the arguments of all to_xxx_case() functions
  • renaming preprocess to sep_in, postprocess to sep_out, replace_special_characters to transliterations. Ols names are deprecated.
  • removed protect argument

- R
Published by Tazinho about 8 years ago

snakecase - CRAN update

  • to_xxx_case() shortcuts are now exact wrappers around to_any_case()
  • protect is deprecated after changing implementation and setting a reosonable default
  • added abbreviations argument
  • case "none" is now a lot more general for formatting
  • added abbreviation specific behaviour for mixed case
  • new parsing_option 5, which suppresses conversion after ., @, etc
  • renamig of:
    • to_small / to_big_camel_case have been renamed to to_lower / to_upper_camel_case. The old names are and will still be supported in to_any_case()
    • parsingoption to parsing_option
  • introduced rule that parsing_option <= 0 suppresses parsing from now on
  • lots of additional tests and smaller bugfixes
  • several documentation updates including help, examples, readme and vignette

- R
Published by Tazinho about 8 years ago

snakecase - Preserve names attribute

  • Changes since last CRAN submission include:
    • to_any_case() and all to_xxx_case() shortcuts now preserve the names attribute, which can be especially handy to integrate snakecase within programmatic ggplot wrappers to automatically convert labels of a plot.

- R
Published by Tazinho over 8 years ago

snakecase - snakecase on CRAN now

Functions

  • to_any_case():
    • has a highly modular and logical internal design
    • arguments: string, case, preprocess, protect, replace_special_characters, postprocess, prefix, postfix, unique_sep and empty_fill
    • vectorised over string, pre-/postprocess, pre-/postfix and protect arguments
    • groups of digits are not separated in between. Digits, which are not direct next to each other, will be split via "_" in both camel case versions. Otherwise information would be lost and also the consistency rules in the readme wouldn't hold in this case.
  • to_parsed_case_internal()
    • does the preprocessing and parsing and simplifies all other functions.
  • shortcuts:
    • to_snake_case(), to_small_camel_case(), to_big_camel_case(), to_screaming_snake_case() and to_parsed_case(), which are equivalent to to_any_case(string, case).

Documentation

  • githubpage contains a readme (including a logo and badges for cran status, codecoverage etc.), which describes the usage and also the design philosophy
  • added a vignette
  • added documentation and examples for all functions

Tests

  • added systematic tests
  • added integrated tests on linux via travis.ci and on windows via appveyor

- R
Published by Tazinho almost 9 years ago