Skip to content

Commit

Permalink
Release candidate 0.6.0 (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
RMHogervorst authored Oct 16, 2024
1 parent 3aad506 commit 8d0427b
Show file tree
Hide file tree
Showing 81 changed files with 951 additions and 710 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/recheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
workflow_dispatch:
inputs:
which:
type: choice
description: Which dependents to check
options:
- strong
- most

name: Reverse dependency check

jobs:
revdep_check:
name: Reverse check ${{ inputs.which }} dependents
uses: r-devel/recheck/.github/workflows/recheck.yml@v1
with:
which: ${{ inputs.which }}
subdirectory: '' #if your package is in a git subdir
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Suggests:
ipaddress,
stringi,
spelling
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Config/testthat/edition: 3
Depends:
R (>= 2.10)
Collate:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ locales_update:
# No real targets!
.PHONY: all test doc install

vignettes:
vignettes: vignettes/charlatan.Rmd vignettes/contributing.Rmd vignettes/creating-realistic-data.Rmd
${RSCRIPT} -e "devtools::build_vignettes()"

style:
Expand All @@ -53,3 +53,6 @@ revdep:
${RSCRIPT} revdep/check.R

release: style test doc readme build revdep

codemeta:
${RSCRIPT} -e "codemetar::write_codemeta()"
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export(ElementProvider_nl_NL)
export(FileProvider)
export(FileProvider_en_US)
export(FraudsterClient)
export(ISBNProvider)
export(InternetProvider)
export(InternetProvider_bg_BG)
export(InternetProvider_cs_CZ)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ every locale (when needed) without changing the logic for all locales.
* add print method so the providers print nicely in the console.
* All data fields are moved to `private` to reduce visual clutter.
* Added docs for languages like `czech-language` `turkish-language`.
* modified tests so they work for test_that version 3

### BUG FIXES
* None
Expand Down
3 changes: 1 addition & 2 deletions R/charlatan-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#' @importFrom whisker whisker.render
#' @importFrom tibble as_tibble
#' @aliases charlatan
#' @docType package
#' @keywords package
#' @author Roel M. Hogervorst \email{[email protected]}
#' @author Scott Chamberlain
Expand Down Expand Up @@ -50,4 +49,4 @@
#' x <- ColorProvider_en_US$new()
#' x$color_name()
#' x$hex_color()
NULL
"_PACKAGE"
2 changes: 1 addition & 1 deletion R/company-provider-bg_BG.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# modified from the python library faker:
# https://github.com/joke2k/faker/blob/master/faker/providers/company/bg_BG/__init__.py
#' @title CompanyProvider bg_BG
#' @title CompanyProvider for Bulgarian (Bulgaria)
#' @inherit CompanyProvider description details return
#' @export
#' @family bg
Expand Down
1 change: 1 addition & 0 deletions R/doi-provider.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#' DOIProvider
#'
#' Generate random Digital Object Identifyers, used in scientific journals.
#' @export
#' @keywords internal
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-bg_BG.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int_replacements_bg_bg <- list(
c("\u044f", "ya")
)

#' Internet provider
#' Internet provider for Bulgarian (Bulgaria)
#'
#' methods for internet related data, like email addresses,
#' usernames, and websites.
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-cs_CZ.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int_free_email_domains_cs_cz <- c(

int_tlds_cs_cz <- c("cz", "com", "cz")

#' Internet provider
#' Internet provider Czech
#'
#' methods for internet related data, like email addresses,
#' usernames, and websites.
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-de_DE.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int_replacements_de_de <- list(
c("\\u00df", "ss")
)

#' Internet provider
#' Internet provider German (Germany)
#'
#' methods for internet related data, like email addresses,
#' usernames, and websites.
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-en_AU.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int_tlds_en_au <- c(
"net.au", "biz", "info", "edu", "edu.au"
)

#' Internet provider
#' Internet provider English (Australia)
#'
#' methods for internet related data, like email addresses,
#' usernames, and websites.
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-fa_IR.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int_tlds_fa_ir <- c("com", "com", "com", "net", "org", "ir", "ir", "ir")
#' @family IR
#' @export
#' @examples
#' x <- InternetProvider_bg_BG$new()
#' x <- InternetProvider_fa_IR$new()
#' x$email()
#' x$free_email()
#' x$mac_address()
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-fr_FR.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int_replacements_fr_fr <- list(
#' @family FR
#' @export
#' @examples
#' x <- InternetProvider_bg_BG$new()
#' x <- InternetProvider_fr_FR$new()
#' x$email()
#' x$free_email()
#' x$mac_address()
Expand Down
2 changes: 1 addition & 1 deletion R/internet-provider-hr_HR.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int_replacements_hr_hr <- list(
c("\u017d", "Z")
)

#' Internet provider for
#' Internet provider for Croatian (Croatia)
#'
#' methods for internet related data, like email addresses,
#' usernames, and websites.
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-ar_AA.R
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ lorem_word_list_ar_aa <- c(
"\u0648\u0627\u0644\u0645\u0627\u0646\u064a\u0627"
)

#' Lorem provider
#' Lorem provider Arabic
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-el_GR.R
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ lorem_word_list_el_gr <- c(rep(lorem_common_words_el_gr, 2), c(
"\u03ce\u03c1\u03b1"
))

#' Lorem provider
#' Lorem provider Greek (Greece)
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-en_US.R
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ lorem_word_list_en_us <- c(
"yourself"
)

#' Lorem provider
#' Lorem provider English (USA)
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-he_IL.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ lorem_word_list_he_il <- c(
"\u05ea\u05e8\u05d1\u05e0\u05da"
)

#' Lorem provider
#' Lorem provider Hebrew
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-ru_RU.R
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ lorem_word_list_ru_ru <- c(
"\u0440\u0430\u0432\u043d\u043e\u0434\u0443\u0448\u043d\u044b\u0439"
)

#' Lorem provider Russian
#' Lorem provider Russian (Russia)
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-zh_CN.R
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ lorem_word_list_zh_cn <- c(
"\u51c6\u5907"
)

#' Lorem provider
#' Lorem provider Chinese (China)
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/lorem-provider-zh_TW.R
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ lorem_word_list_zh_tw <- c(
"\u51c6\u5099"
)

#' Lorem provider
#' Lorem provider Chinese (Taiwan)
#'
#' Methods for Lorem Ipsum generation.
#' Lorem Ipsum is a placeholder text commonly used to demonstrate the visual
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ locale_mismatch <- function(parent_provider, child_provider) {
#' generalized util function for sequence multiplication
#'
#' Util function for ISBN, ean, SSN providers.
#' for cases such as sum(x[4]*5 + x[3]*4 + x[2]*3 + x[1] *2)
#' for cases such as `sum(x[4]*5 + x[3]*4 + x[2]*3 + x[1] *2)`
#' @keywords internal
checksum_util <- function(vector, multiplicationvector) {
stopifnot(length(vector) == length(multiplicationvector))
Expand Down
46 changes: 9 additions & 37 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,13 @@ x$color_name()

## locale support

Adding more locales through time, e.g.,

Locale support for job data

```{r}
ch_job(locale = "en_US", n = 3)
ch_job(locale = "fr_FR", n = 3)
ch_job(locale = "hr_HR", n = 3)
ch_job(locale = "uk_UA", n = 3)
ch_job(locale = "zh_TW", n = 3)
```

For colors:

```{r}
ch_color_name(locale = "en_US", n = 3)
ch_color_name(locale = "uk_UA", n = 3)
```

More coming soon ...

## generate a dataset

```{r}
Expand All @@ -123,28 +109,6 @@ ch_generate()
ch_generate("job", "phone_number", n = 30)
```


## person name

```{r}
ch_name()
```

```{r}
ch_name(10)
```


## phone number

```{r}
ch_phone_number()
```

```{r}
ch_phone_number(10)
```

## job

```{r}
Expand All @@ -163,7 +127,6 @@ ch_credit_card_provider(n = 4)
```

```{r}
ch_credit_card_number()
ch_credit_card_number(n = 10)
```

Expand All @@ -172,6 +135,15 @@ ch_credit_card_security_code()
ch_credit_card_security_code(10)
```

## Documentation

All providers have documentation available through the help functions.
All providers of the same locales, are linked together, and for every language
we have a generic page, for example```?`dutch-language` ```.

There are three vignettes, about contributing to this project, what {charlatan}
does and a more in depth vignette about creating realistic data.

## Usage in the wild

- eacton/R-Utility-Belt-ggplot2 (https://github.com/eacton/R-Utility-Belt-ggplot2/blob/836a6bd303fbfde4a334d351e0d1c63f71c4ec68/furry_dataset.R)
Expand Down
Loading

0 comments on commit 8d0427b

Please sign in to comment.