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

rostemplate project #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
## Ignore travis config file
^\.travis\.yml$
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
^docs$
^_pkgdown\.yml$
3 changes: 3 additions & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.html
R-version
depends.Rds
89 changes: 89 additions & 0 deletions .github/workflows/roscron-check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '30 08 1 * *'



name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-latest, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/[email protected]
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
50 changes: 50 additions & 0 deletions .github/workflows/rostemplate-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- main
- master

name: rostemplate-gh-pages

jobs:
rostemplate-gh-pages:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
install.packages('devtools')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/[email protected]
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_github("ropenspain/rostemplate", dependencies = TRUE, force = TRUE)

shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, clean = TRUE)'
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
*.Rproj
49 changes: 35 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
Package: MicroDatosEs
Type: Package
Package: MicroDatosEs
Title: Utilities for Official Spanish Microdata
Version: 0.8.12
Date: 2018-05-13
Encoding: UTF-8
Authors@R: c( person("Carlos J.", "Gil Bellosta", email="[email protected]", role=c('aut', 'cre')),
person("Carlos", "Neira", email = "[email protected]", role="ctb"),
person("Diego", "Paniagua Sánchez", email = "[email protected]", role="ctb"),
person("Fiorella", "Mori Peláez", email = "[email protected]", role="ctb"),
person("Jorge", "López Pérez", email = "[email protected]", role="ctb"),
person("José Luis", "Cañadas Reche", email = "[email protected]", role="ctb"))
Description: Provides utilities for reading and processing microdata from Spanish official statistics with R.
URL: http://www.datanalytics.com/2012/08/06/un-paseo-por-el-paquete-microdatoses-y-la-epa-de-nuevo/
Depends: readr
Authors@R:
c(person(given = "Carlos J.",
family = "Gil Bellosta",
role = c("aut", "cre"),
email = "[email protected]"),
person(given = "Carlos",
family = "Neira",
role = "ctb",
email = "[email protected]"),
person(given = "Diego",
family = "Paniagua Sánchez",
role = "ctb",
email = "[email protected]"),
person(given = "Fiorella",
family = "Mori Peláez",
role = "ctb",
email = "[email protected]"),
person(given = "Jorge",
family = "López Pérez",
role = "ctb",
email = "[email protected]"),
person(given = "José Luis",
family = "Cañadas Reche",
role = "ctb",
email = "[email protected]"))
Description: Provides utilities for reading and processing microdata from
Spanish official statistics with R.
License: GPL-3
LazyLoad: yes
LazyData: yes
RoxygenNote: 6.0.1
URL: https://github.com/ropenspain/MicroDatosEs,
https://www.datanalytics.com/2012/08/06/un-paseo-por-el-paquete-microdatoses-y-la-epa-de-nuevo/
BugReports: https://github.com/ropenspain/MicroDatosEs/issues
Depends:
readr
Encoding: UTF-8
RoxygenNote: 7.1.1
2 changes: 1 addition & 1 deletion R/censo2010.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' raw <- censo2010("MicrodatosCP_NV_per_nacional_3VAR.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 1 addition & 1 deletion R/defun2011.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' raw <- defun2011("datos_2016.zip") # It will be automatically uncompressed.
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 1 addition & 1 deletion R/ees2010.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' raw <- ees2010("datos_2014.zip") # It will be automatically uncompressed.
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 1 addition & 1 deletion R/epa2005.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' raw <- epa2005("EPA4T017")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 1 addition & 1 deletion R/epf.2011.gastos.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' raw <- epf.2011.gastos("sample_gastos_a2011.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 1 addition & 1 deletion R/epf.2011.hogares.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' raw <- epf.2011.gastos("sample_hogares_a2011.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 1 addition & 1 deletion R/epf.2011.miembros.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' raw <- epf.2011.gastos("sample_miembros_a2011.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.



Expand Down
2 changes: 1 addition & 1 deletion R/padron2016.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' raw <- epf.2011.gastos("sample_padron_2016.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.
#' @seealso \code{\link[readr]{read_fwf}} to read fixed width files.


###################################################################
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
template:
package: rostemplate
4 changes: 2 additions & 2 deletions man/censo2010.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/defun2011.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ees2010.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/epa2005.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/epf.2011.gastos.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/epf.2011.hogares.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/epf.2011.miembros.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/padron2016.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.