From 9784cd3e68f79388b377d21a171035d201626807 Mon Sep 17 00:00:00 2001 From: dieghernan Date: Tue, 22 Dec 2020 12:08:45 +0100 Subject: [PATCH 1/4] Fix links on read_fwf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit \link{} tag malformed, fixed now: 0 errors √ | 0 warnings √ | 0 note x --- .Rbuildignore | 2 ++ .gitignore | 5 +++++ DESCRIPTION | 2 +- R/censo2010.R | 2 +- R/defun2011.R | 2 +- R/ees2010.R | 2 +- R/epa2005.R | 2 +- R/epf.2011.gastos.R | 2 +- R/epf.2011.hogares.R | 2 +- R/epf.2011.miembros.R | 2 +- R/padron2016.R | 2 +- man/censo2010.Rd | 4 ++-- man/defun2011.Rd | 2 +- man/ees2010.Rd | 2 +- man/epa2005.Rd | 2 +- man/epf.2011.gastos.Rd | 2 +- man/epf.2011.hogares.Rd | 2 +- man/epf.2011.miembros.Rd | 2 +- man/padron2016.Rd | 2 +- 19 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 .gitignore diff --git a/.Rbuildignore b/.Rbuildignore index 01dc57b..25f784c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,4 @@ ## Ignore travis config file ^\.travis\.yml$ +^.*\.Rproj$ +^\.Rproj\.user$ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4f606b --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata +*.Rproj diff --git a/DESCRIPTION b/DESCRIPTION index 9d20fca..e84944f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,4 +16,4 @@ Depends: readr License: GPL-3 LazyLoad: yes LazyData: yes -RoxygenNote: 6.0.1 +RoxygenNote: 7.1.1 diff --git a/R/censo2010.R b/R/censo2010.R index c3d3e1c..a34c10b 100644 --- a/R/censo2010.R +++ b/R/censo2010.R @@ -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. ################################################################### diff --git a/R/defun2011.R b/R/defun2011.R index c716ebf..d3d885b 100644 --- a/R/defun2011.R +++ b/R/defun2011.R @@ -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. ################################################################### diff --git a/R/ees2010.R b/R/ees2010.R index 2bd6d18..46fc295 100644 --- a/R/ees2010.R +++ b/R/ees2010.R @@ -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. ################################################################### diff --git a/R/epa2005.R b/R/epa2005.R index a936cb2..49a1542 100644 --- a/R/epa2005.R +++ b/R/epa2005.R @@ -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. ################################################################### diff --git a/R/epf.2011.gastos.R b/R/epf.2011.gastos.R index 75e201b..be69baf 100644 --- a/R/epf.2011.gastos.R +++ b/R/epf.2011.gastos.R @@ -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. ################################################################### diff --git a/R/epf.2011.hogares.R b/R/epf.2011.hogares.R index 28fc26e..a16aa3a 100644 --- a/R/epf.2011.hogares.R +++ b/R/epf.2011.hogares.R @@ -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. ################################################################### diff --git a/R/epf.2011.miembros.R b/R/epf.2011.miembros.R index 4a646f6..9517763 100644 --- a/R/epf.2011.miembros.R +++ b/R/epf.2011.miembros.R @@ -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. diff --git a/R/padron2016.R b/R/padron2016.R index 66b7079..fab8c5d 100644 --- a/R/padron2016.R +++ b/R/padron2016.R @@ -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. ################################################################### diff --git a/man/censo2010.Rd b/man/censo2010.Rd index dd621b2..46a046a 100644 --- a/man/censo2010.Rd +++ b/man/censo2010.Rd @@ -27,7 +27,7 @@ The \code{file} parameter allows any flat file with fixed width. } \examples{ -# Downloaded \\href{ftp://www.ine.es/temas/censopv/cen11/Microdatos_personas_nacional.zip}{data} +# Downloaded \href{ftp://www.ine.es/temas/censopv/cen11/Microdatos_personas_nacional.zip}{data} \dontrun{ raw <- censo2010("MicrodatosCP_NV_per_nacional_3VAR.txt") summary(raw) @@ -37,7 +37,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Carlos Neira and Carlos J. Gil Bellosta diff --git a/man/defun2011.Rd b/man/defun2011.Rd index 5e5bddb..cc31c7c 100644 --- a/man/defun2011.Rd +++ b/man/defun2011.Rd @@ -35,7 +35,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Carlos J. Gil Bellosta diff --git a/man/ees2010.Rd b/man/ees2010.Rd index cd51510..e8a7ad5 100644 --- a/man/ees2010.Rd +++ b/man/ees2010.Rd @@ -34,7 +34,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Carlos J. Gil Bellosta, with major contributions from José Luis Cañadas Reche diff --git a/man/epa2005.Rd b/man/epa2005.Rd index 4d5f0b8..10d9b09 100644 --- a/man/epa2005.Rd +++ b/man/epa2005.Rd @@ -33,7 +33,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Carlos J. Gil Bellosta diff --git a/man/epf.2011.gastos.Rd b/man/epf.2011.gastos.Rd index ea17286..36eb746 100644 --- a/man/epf.2011.gastos.Rd +++ b/man/epf.2011.gastos.Rd @@ -33,7 +33,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Diego Paniagua Sánchez and Carlos J. Gil Bellosta diff --git a/man/epf.2011.hogares.Rd b/man/epf.2011.hogares.Rd index e4b282b..4de6384 100644 --- a/man/epf.2011.hogares.Rd +++ b/man/epf.2011.hogares.Rd @@ -33,7 +33,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Diego Paniagua Sánchez and Carlos J. Gil Bellosta diff --git a/man/epf.2011.miembros.Rd b/man/epf.2011.miembros.Rd index 9a1d614..3172ee4 100644 --- a/man/epf.2011.miembros.Rd +++ b/man/epf.2011.miembros.Rd @@ -33,7 +33,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Diego Paniagua Sánchez and Carlos J. Gil Bellosta diff --git a/man/padron2016.Rd b/man/padron2016.Rd index 7d6e2c3..f4af1e9 100644 --- a/man/padron2016.Rd +++ b/man/padron2016.Rd @@ -33,7 +33,7 @@ summary(raw) http://www.ine.es/prodyser/microdatos.htm } \seealso{ -\code{\link[read_fwf]{readr}} to read fixed width files. +\code{\link[readr]{read_fwf}} to read fixed width files. } \author{ Carlos J. Gil Bellosta; metadata provided by Fiorella Mori. From ec475fcda5bd9c02771c22d63f650aa2fb5b521b Mon Sep 17 00:00:00 2001 From: dieghernan Date: Tue, 22 Dec 2020 12:14:02 +0100 Subject: [PATCH 2/4] Add rostemplate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0 errors √ | 0 warnings √ | 0 notes √ Checked locally, ok --- .Rbuildignore | 3 + .github/.gitignore | 3 + .github/workflows/roscron-check-standard.yaml | 86 +++++++++++++++++++ .github/workflows/rostemplate-gh-pages.yaml | 50 +++++++++++ _pkgdown.yml | 2 + 5 files changed, 144 insertions(+) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/roscron-check-standard.yaml create mode 100644 .github/workflows/rostemplate-gh-pages.yaml create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index 25f784c..995682b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,3 +2,6 @@ ^\.travis\.yml$ ^.*\.Rproj$ ^\.Rproj\.user$ +^\.github$ +^docs$ +^_pkgdown\.yml$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..0ce1091 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1,3 @@ +*.html +R-version +depends.Rds diff --git a/.github/workflows/roscron-check-standard.yaml b/.github/workflows/roscron-check-standard.yaml new file mode 100644 index 0000000..a8a6caa --- /dev/null +++ b/.github/workflows/roscron-check-standard.yaml @@ -0,0 +1,86 @@ +# 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-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, 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: Cache R packages + if: runner.os != 'Windows' + uses: actions/cache@v2 + 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: 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 diff --git a/.github/workflows/rostemplate-gh-pages.yaml b/.github/workflows/rostemplate-gh-pages.yaml new file mode 100644 index 0000000..bc4ae69 --- /dev/null +++ b/.github/workflows/rostemplate-gh-pages.yaml @@ -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/cache@v2 + 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 "actions@github.com" + git config --local user.name "GitHub Actions" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, clean = TRUE)' diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..2bda70c --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,2 @@ +template: + package: rostemplate From 766e278a5c28ed8de5704b51c1168b489b294b71 Mon Sep 17 00:00:00 2001 From: dieghernan Date: Mon, 26 Jul 2021 12:44:09 +0200 Subject: [PATCH 3/4] Update actions --- .github/workflows/roscron-check-standard.yaml | 15 +++++++++------ .github/workflows/rostemplate-gh-pages.yaml | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/roscron-check-standard.yaml b/.github/workflows/roscron-check-standard.yaml index a8a6caa..90f1eb9 100644 --- a/.github/workflows/roscron-check-standard.yaml +++ b/.github/workflows/roscron-check-standard.yaml @@ -12,6 +12,8 @@ on: schedule: - cron: '30 08 1 * *' + + name: R-CMD-check jobs: @@ -26,8 +28,8 @@ jobs: config: - {os: windows-latest, r: 'release'} - {os: macOS-latest, r: 'release'} - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {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 @@ -50,9 +52,8 @@ jobs: writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") shell: Rscript {0} - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v2 + - name: Restore R package cache + uses: actions/cache@v2.1.6 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} @@ -75,7 +76,9 @@ jobs: - name: Check env: _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + 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 diff --git a/.github/workflows/rostemplate-gh-pages.yaml b/.github/workflows/rostemplate-gh-pages.yaml index bc4ae69..fcf7c31 100644 --- a/.github/workflows/rostemplate-gh-pages.yaml +++ b/.github/workflows/rostemplate-gh-pages.yaml @@ -27,7 +27,7 @@ jobs: shell: Rscript {0} - name: Cache R packages - uses: actions/cache@v2 + uses: actions/cache@v2.1.6 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} From b020389a2130435160866f2e638c66f798e29f73 Mon Sep 17 00:00:00 2001 From: dieghernan Date: Mon, 26 Jul 2021 13:51:47 +0200 Subject: [PATCH 4/4] Update urls --- DESCRIPTION | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e84944f..d2de870 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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="cgb@datanalytics.com", role=c('aut', 'cre')), - person("Carlos", "Neira", email = "cneirac@gmail.com", role="ctb"), - person("Diego", "Paniagua Sánchez", email = "dpansan@gmail.com", role="ctb"), - person("Fiorella", "Mori Peláez", email = "fiorella.mori.pelaez@gmail.com", role="ctb"), - person("Jorge", "López Pérez", email = "jorge@loperez.com", role="ctb"), - person("José Luis", "Cañadas Reche", email = "canadasreche@gmail.com", 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 = "cgb@datanalytics.com"), + person(given = "Carlos", + family = "Neira", + role = "ctb", + email = "cneirac@gmail.com"), + person(given = "Diego", + family = "Paniagua Sánchez", + role = "ctb", + email = "dpansan@gmail.com"), + person(given = "Fiorella", + family = "Mori Peláez", + role = "ctb", + email = "fiorella.mori.pelaez@gmail.com"), + person(given = "Jorge", + family = "López Pérez", + role = "ctb", + email = "jorge@loperez.com"), + person(given = "José Luis", + family = "Cañadas Reche", + role = "ctb", + email = "canadasreche@gmail.com")) +Description: Provides utilities for reading and processing microdata from + Spanish official statistics with R. License: GPL-3 -LazyLoad: yes -LazyData: yes +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