Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
^cran-comments\.md$
^CRAN-RELEASE$
^data-raw$
^_pkgdown\.yml$
^docs$
^pkgdown$
49 changes: 49 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.Rproj.user
.Rhistory
.RData
docs
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- badges: end -->

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.
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- badges: end -->

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
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://dragosmg.github.io/rocnp/
template:
bootstrap: 5

Loading