From d234356980943209a10219cb90aa0830a3c52446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Sun, 14 Sep 2025 17:03:54 +0100 Subject: [PATCH 1/4] updated Readme --- README.Rmd | 8 ++++---- README.md | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.Rmd b/README.Rmd index 7f07e2d..0788b13 100644 --- a/README.Rmd +++ b/README.Rmd @@ -22,15 +22,15 @@ knitr::opts_chunk$set( [![CRAN status](https://www.r-pkg.org/badges/version/rocnp)](https://CRAN.R-project.org/package=rocnp) -The goal of {rocnp} is to provide a set of functions for working with Romanian Personal Numeric Codes / Coduri Numerice Personale (CNP). +{rocnp} provides a set of tools for working with Romanian Personal Numeric Codes / Coduri Numerice Personale (CNP). ## Features -rocnp includes the following functionality for working with Romanian personal numeric codes (PNC / CNP): +{rocnp} includes the following: * an S3 class called `cnp`: - * implemented as a record (similar to `POSIXlt`) with `vctrs::new_rcrd()`. The implementation details are -* a constructor, `cnp()` for creating a `cnp` object + * implemented as a record (similar to `POSIXlt`) with `vctrs::new_rcrd()`. +* a constructor - `cnp()` - for creating a `cnp` object * the constructor automatically decomposes the CNP and augments it by parsing the various field * access the various components with the `extract_()` family of functions: * use `extract_sex()` for sex. diff --git a/README.md b/README.md index facf2c9..ebd9382 100644 --- a/README.md +++ b/README.md @@ -14,18 +14,17 @@ stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https:// status](https://www.r-pkg.org/badges/version/rocnp)](https://CRAN.R-project.org/package=rocnp) -The goal of {rocnp} is to provide a set of functions for working with -Romanian Personal Numeric Codes / Coduri Numerice Personale (CNP). +{rocnp} provides a set of tools for working with Romanian Personal +Numeric Codes / Coduri Numerice Personale (CNP). ## Features -rocnp includes the following functionality for working with Romanian -personal numeric codes (PNC / CNP): +{rocnp} includes the following: - an S3 class called `cnp`: - implemented as a record (similar to `POSIXlt`) with - `vctrs::new_rcrd()`. The implementation details are -- a constructor, `cnp()` for creating a `cnp` object + `vctrs::new_rcrd()`. +- a constructor - `cnp()` - for creating a `cnp` object - the constructor automatically decomposes the CNP and augments it by parsing the various field - access the various components with the `extract_()` family of From 89adf2c494653b43514e1ca73efd7ee6de9ee5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Sun, 14 Sep 2025 17:05:11 +0100 Subject: [PATCH 2/4] first commit of the pkgdown website. fixes #36 --- .Rbuildignore | 3 +++ .github/workflows/pkgdown.yaml | 49 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + DESCRIPTION | 2 +- _pkgdown.yml | 4 +++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pkgdown.yaml create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index 920288e..c308fb0 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,6 @@ ^cran-comments\.md$ ^CRAN-RELEASE$ ^data-raw$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..bfc9f4d --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,49 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + release: + types: [published] + workflow_dispatch: + +name: pkgdown.yaml + +permissions: read-all + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index 807ea25..c2f15ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .Rproj.user .Rhistory .RData +docs diff --git a/DESCRIPTION b/DESCRIPTION index 1db6fc5..5ebbeb0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,7 +11,7 @@ Description: A set of tools for working with Romanian personal numeric Romanian residents either at birth or when they obtain a residence permit. License: MIT + file LICENSE -URL: https://github.com/dragosmg/rocnp +URL: https://github.com/dragosmg/rocnp, https://dragosmg.github.io/rocnp/ BugReports: https://github.com/dragosmg/rocnp/issues Depends: R (>= 4.1.0) diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..cd459c1 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://dragosmg.github.io/rocnp/ +template: + bootstrap: 5 + From 33a7431ad62111d85b686d3c1cbfc2e378cc16fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Sun, 14 Sep 2025 17:05:33 +0100 Subject: [PATCH 3/4] bump dev version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5ebbeb0..06b06c5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rocnp Title: Work with Romanian Personal Numeric Codes PNC / CNP -Version: 0.1.0.9001 +Version: 0.1.0.9002 Authors@R: person("Dragoș", "Moldovan-Grünfeld", , "dragos.mold@gmail.com", role = c("aut", "cre", "cph")) Description: A set of tools for working with Romanian personal numeric From 6af9e292304d186a6d9d4cfcd4cdf00ca1ee03f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Sun, 14 Sep 2025 17:06:20 +0100 Subject: [PATCH 4/4] updated news --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index cb9c7ee..9ca8c78 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,7 @@ * `extract_county()` gets the county of issue. * `extract_status()` extracts the residence status. * `extract_dob()` gets the date of birth. +* Added a pkgdown website. # rocnp 0.1.0