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

Update docs and actions #35

Merged
merged 11 commits into from
Aug 4, 2023
Merged
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
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
^dev$
^vignettes/dev$
^\.lintr$
^CODE_OF_CONDUCT\.md$
^CONTRIBUTING\.md$
7 changes: 4 additions & 3 deletions .github/workflows/cran-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ on:
jobs:
check:
runs-on: ubuntu-latest
permissions: write-all
permissions: write-all
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Check
uses: dieghernan/cran-status-check@v1
with:
fail-on-error: "true"
create-issue: "false"
create-issue: "false"

71 changes: 71 additions & 0 deletions .github/workflows/lintr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# lintr provides static code analysis for R.
# It checks for adherence to a given style,
# identifying syntax errors and possible semantic issues,
# then reports them to you so you can take action.
# More details at https://lintr.r-lib.org/

name: lintr

on:
push:
branches:
- main
- master
workflow_dispatch:
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
- master
schedule:
- cron: '31 18 * * 2'

permissions:
contents: read

jobs:
lintr:
name: Run lintr scanning
runs-on: ubuntu-latest
permissions:
contents: read # for checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Setup lintr
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
local::.
any::lintr

- name: Run lintr
run: |
# Lintr package
out <- lintr::lint_package()
# Create SARIF report
lintr::sarif_output(out, "lintr-results.sarif")
# Display
out
shell: Rscript {0}
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: lintr-results.sarif
wait-for-processing: true

21 changes: 21 additions & 0 deletions .github/workflows/pkgcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pkgcheck

# This will cancel running jobs once a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
# Manually trigger the Action under Actions/pkgcheck
workflow_dispatch:

jobs:
pkgcheck:
runs-on: ubuntu-latest
steps:
- uses: ropensci-review-tools/pkgcheck-action@main
with:
summary-only: false
post-to-issue: true
append-to-issue: true

4 changes: 2 additions & 2 deletions .github/workflows/pkgdown-gh-pages-clean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
4 changes: 2 additions & 2 deletions .github/workflows/rostemplate-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
7 changes: 5 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov()
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE
)
shell: Rscript {0}
8 changes: 4 additions & 4 deletions .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:

- name: Commit results
run: |
git config --local user.name "dieghernan"
git config --local user.email "dieghernan@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m 'Update docs with pkgdev' || echo "No changes to commit"
git push origin || echo "No changes to commit"
Expand All @@ -50,7 +50,7 @@ jobs:

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'

11 changes: 11 additions & 0 deletions .github/workflows/wipe-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Clear GHA caches manually
on:
workflow_dispatch:

jobs:
cache-clear:
runs-on: ubuntu-latest

steps:
- uses: easimon/wipe-cache@main

46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# CONTRIBUTING

## Fixing typos

Small typos or grammatical errors in documentation may be edited directly using
the GitHub web interface, so long as the changes are made in the *source* file.

- YES ✔️: you edit a roxygen comment in a `.R` file below `R/`.
- NO ❌: you edit an `.Rd` file below `man/`.

## Prerequisites

Before you make a substantial pull request, you should always file an issue and
make sure someone from the team agrees that it's a problem. If you've found a
bug, create an associated issue and illustrate the bug with a minimal
[reprex](https://www.tidyverse.org/help/#reprex).

## Pull request process

- We recommend that you create a Git branch for each pull request (PR).
- Look at the `R-CMD-check` build status before. After making changes, run
`devtools::check()` and ensure no new Notes, Warnings or Errors are
appearing.
- We recommend the tidyverse [style guide](http://style.tidyverse.org). We
also use the [styler](https://CRAN.R-project.org/package=styler) package to
apply these styles, but please **don't restyle code that has nothing to do
with your PR**.
- We use [roxygen2](https://cran.r-project.org/package=roxygen2).
- We use [testthat](https://cran.r-project.org/package=testthat).
Contributions with test cases included are easier to accept.
- For user-facing changes, add a bullet to the top of `NEWS.md` below the
current development version header describing the changes made followed by
your GitHub username, and links to relevant issue(s)/PR(s).

## Prefer to Email?

Email the person listed as maintainer in the `DESCRIPTION` file of this repo.

Though note that private discussions over email don't help others - of course
email is totally warranted if it's a sensitive problem of any kind.

## Thanks for contributing!

This contributing guide is adapted from the tidyverse contributing guide
available at
<https://raw.githubusercontent.com/r-lib/usethis/master/inst/templates/tidy-contributing.md>
1 change: 1 addition & 0 deletions CatastRo.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ PackageInstallArgs: --no-multiarch --with-keep.source

MarkdownWrap: Column
MarkdownWrapAtColumn: 80
LineEndingConversion: Posix
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Suggests:
tidyterra
VignetteBuilder:
knitr
Config/Needs/website: ropenspain/rostemplate
Config/testthat/edition: 3
Config/testthat/parallel: true
Copyright: © Dirección General del Catastro <https://www.catastro.meh.es/>
Expand Down
5 changes: 2 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
#'
#' @format
#' A tibble with `r nrow(CatastRo::catr_srs_values)` rows and columns:
#' * **SRS**: Spatial Reference System (CRS) value, identified by the
#' corresponding [EPSG](https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset)
#' code.
#' \describe{
#' \item{SRS}{Spatial Reference System (CRS) value, identified by the
#' corresponding EPSG code.}
#' \item{Description}{Description of the SRS/EPSG code.}
#' \item{ovc_service}{Logical. Is this code valid on OVC services?}
#' \item{wfs_service}{Logical. Is this code valid on INSPIRE WFS services?}
Expand Down
15 changes: 8 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ library(CatastRo)
[![CRAN-status](https://www.r-pkg.org/badges/version/CatastRo)](https://CRAN.R-project.org/package=CatastRo)
[![CRAN-results](https://badges.cranchecks.info/worst/CatastRo.svg)](https://cran.r-project.org/web/checks/check_results_CatastRo.html)
[![Downloads](https://cranlogs.r-pkg.org/badges/CatastRo)](https://CRAN.R-project.org/package=CatastRo)
[![r-universe](https://ropenspain.r-universe.dev/badges/CatastRo)](https://ropenspain.r-universe.dev/)
[![r-universe](https://ropenspain.r-universe.dev/badges/CatastRo)](https://ropenspain.r-universe.dev/CatastRo)
[![R-CMD-check](https://github.com/rOpenSpain/CatastRo/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenSpain/CatastRo/actions?query=workflow%3AR-CMD-check)
[![codecov](https://codecov.io/gh/rOpenSpain/CatastRo/branch/master/graph/badge.svg?token=6L01BKLL85)](https://app.codecov.io/gh/rOpenSpain/CatastRo)
[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.6044091-blue)](https://doi.org/10.5281/zenodo.6044091)
Expand Down Expand Up @@ -60,12 +60,13 @@ You can install the developing version of **CatastRo** using the
[r-universe](https://ropenspain.r-universe.dev/CatastRo):

```{r, eval = FALSE}
# Enable this universe
options(repos = c(
ropenspain = "https://ropenspain.r-universe.dev",
CRAN = "https://cloud.r-project.org"
))
install.packages("CatastRo")
# Install CatastRo in R:
install.packages("CatastRo",
repos = c(
"https://ropenspain.r-universe.dev",
"https://cloud.r-project.org"
)
)
```

Alternatively, you can install the developing version of **CatastRo** with:
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![CRAN-status](https://www.r-pkg.org/badges/version/CatastRo)](https://CRAN.R-project.org/package=CatastRo)
[![CRAN-results](https://badges.cranchecks.info/worst/CatastRo.svg)](https://cran.r-project.org/web/checks/check_results_CatastRo.html)
[![Downloads](https://cranlogs.r-pkg.org/badges/CatastRo)](https://CRAN.R-project.org/package=CatastRo)
[![r-universe](https://ropenspain.r-universe.dev/badges/CatastRo)](https://ropenspain.r-universe.dev/)
[![r-universe](https://ropenspain.r-universe.dev/badges/CatastRo)](https://ropenspain.r-universe.dev/CatastRo)
[![R-CMD-check](https://github.com/rOpenSpain/CatastRo/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenSpain/CatastRo/actions?query=workflow%3AR-CMD-check)
[![codecov](https://codecov.io/gh/rOpenSpain/CatastRo/branch/master/graph/badge.svg?token=6L01BKLL85)](https://app.codecov.io/gh/rOpenSpain/CatastRo)
[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.6044091-blue)](https://doi.org/10.5281/zenodo.6044091)
Expand Down Expand Up @@ -37,12 +37,13 @@ You can install the developing version of **CatastRo** using the
[r-universe](https://ropenspain.r-universe.dev/CatastRo):

``` r
# Enable this universe
options(repos = c(
ropenspain = "https://ropenspain.r-universe.dev",
CRAN = "https://cloud.r-project.org"
))
install.packages("CatastRo")
# Install CatastRo in R:
install.packages("CatastRo",
repos = c(
"https://ropenspain.r-universe.dev",
"https://cloud.r-project.org"
)
)
```

Alternatively, you can install the developing version of **CatastRo**
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
},
"SystemRequirements": null
},
"fileSize": "1255.506KB",
"fileSize": "1479.988KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
67 changes: 67 additions & 0 deletions inst/schemaorg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"@context": "https://schema.org",
"@graph": [
{
"type": "SoftwareSourceCode",
"author": [
{
"id": "https://orcid.org/0000-0001-8457-4658",
"type": "Person",
"email": "diego.hernangomezherrero@gmail.com",
"familyName": "Hernangómez",
"givenName": "Diego"
},
{
"id": "https://orcid.org/0000-0002-8189-9251"
}
],
"codeRepository": "https://github.com/rOpenSpain/CatastRo",
"contributor": {
"id": "https://orcid.org/0000-0001-6403-5550",
"type": "Person",
"familyName": "Ucar",
"givenName": "Iñaki"
},
"copyrightHolder": {
"id": "https://orcid.org/0000-0002-8189-9251",
"type": "Person",
"email": "delgadopanadero@gmail.com",
"familyName": "Delgado Panadero",
"givenName": "Ángel"
},
"description": "Access public spatial data available under the 'INSPIRE' directive. Tools for downloading references and addresses of properties, as well as map images.",
"license": "https://spdx.org/licenses/GPL-2.0",
"name": "CatastRo: Interface to the API 'Sede Electronica Del Catastro'",
"programmingLanguage": {
"type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"provider": {
"id": "https://cran.r-project.org",
"type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.3.1 (2023-06-16 ucrt)",
"version": "0.2.3"
},
{
"id": "https://doi.org/10.5281/zenodo.6044091",
"type": "SoftwareSourceCode",
"author": [
{
"type": "Person",
"familyName": "Delgado Panadero",
"givenName": "Ángel"
},
{
"type": "Person",
"familyName": "Hernangómez",
"givenName": "Diego"
}
],
"name": "{CatastRo}: Interface to the {API} Sede Electrónica Del Catastro"
}
]
}
Loading