Skip to content
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
31 changes: 16 additions & 15 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
^.*\.Rproj$
^CODE_OF_CONDUCT.md$
^CONTRIBUTING.md$
^README\.Rmd$
^\.Rproj\.user$
^\.ccls-cache$
^\.github$
^\.gitignore$
^\.hooks$
^\.pre-commit-config\.yaml$
^\.travis\.yml$
^appveyor\.yml$
^_pkgdown\.yml$
^makefile$
^vignettes/makefile$
^.*\.Rproj$
^aaa\.Rmd$
^script\.R$
^docs$
^appveyor\.yml$
^codemeta\.json$
^cran-comments.md$
^data-raw$
^data/nomenclatura*
^paper\.md$
^docs$
^makefile$
^paper\.bib$
^\.Rproj\.user$
^codemeta\.json$
^paper\.md$
^script\.R$
^src/vendor/sqlite3/sqlite3.o$
^CODE_OF_CONDUCT.md$
^CONTRIBUTING.md$
^cran-comments.md$
^\.github$
^\.pre-commit-config\.yaml$
^\.hooks$
^vignettes/makefile$
24 changes: 12 additions & 12 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# 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
branches: [main, master]
pull_request:
branches:
- main

name: R-CMD-check
name: R-CMD-check.yaml

jobs:
permissions: read-all

jobs:
R-CMD-check:

runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
Expand All @@ -20,19 +19,17 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
#- {os: windows-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
R_KEEP_PKG_SOURCE: yes
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:

- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
Expand All @@ -49,3 +46,6 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
51 changes: 39 additions & 12 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# 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
branches: [main, master]
pull_request:
branches:
- main

name: test-coverage
name: test-coverage.yaml

jobs:
permissions: read-all

jobs:
test-coverage:

runs-on: ubuntu-latest

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:

- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
Expand All @@ -28,9 +24,40 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: covr::codecov(line_exclusions = list('R/distmat.R','src/vendor/sqlite3/sqlite3.c','src/sqlite3db-add-data.cpp'=c(398:420)))
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"),
line_exclusions = list('R/distmat.R','src/vendor/sqlite3/sqlite3.c','src/sqlite3db-add-data.cpp'=c(398:420))
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
71 changes: 50 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,81 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.2.2.9013
hooks:
#- id: style-files
# args: [--style_pkg=styler, --style_fun=tidyverse_style]
rev: v0.4.3.9021
hooks:
- id: style-files
args: [--style_pkg=spaceout, --style_fun=spaceout_style]
additional_dependencies:
- ropensci-review-tools/spaceout
# - id: roxygenize
# codemeta must be above use-tidy-description when both are used
- id: codemeta-description-updated
# - id: codemeta-description-updated
- id: use-tidy-description
- id: spell-check
exclude: >
(?x)^(
data/.*|
(.*/|)\.Rprofile|
(.*/|)\.Renviron|
(.*/|)\.gitignore|
(.*/|)NAMESPACE|
(.*/|)WORDLIST|
(.*/|)\.travis.yml|
(.*/|)appveyor.yml|
(.*/|)\.Rbuildignore|
(.*/|)\.pre-commit-.*|
.*\.[rR]|
.*\.Rproj|
.*\.py|
.*\.feather|
.*\.jpeg|
.*\.pdf|
.*\.png|
.*\.py|
.*\.RData|
.*\.rds|
.*\.Rds|
.*\.Rproj|
.*\.sh|
.*\.RData
(.*/|)\.gitignore|
(.*/|)\.gitlab-ci\.yml|
(.*/|)\.lintr|
(.*/|)\.pre-commit-.*|
(.*/|)\.Rbuildignore|
(.*/|)\.Renviron|
(.*/|)\.Rprofile|
(.*/|)\.travis\.yml|
(.*/|)appveyor\.yml|
(.*/|)NAMESPACE|
(.*/|)renv/settings\.dcf|
(.*/|)renv\.lock|
(.*/|)WORDLIST|
\.github/workflows/.*|
data/.*|
)$
# - id: lintr
- id: readme-rmd-rendered
- id: parsable-R
- id: no-browser-statement
- id: no-print-statement
- id: no-debug-statement
- id: deps-in-desc
# - id: pkgdown
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=200']
- id: file-contents-sorter
files: '^\.Rbuildignore$'
- id: end-of-file-fixer
exclude: '\.Rd'
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
# Only required when https://pre-commit.ci is used for config validation
- id: check-pre-commit-ci-config
- repo: local
hooks:
- id: forbid-to-commit
name: Don't commit common R artifacts
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
language: fail
files: '\.Rhistory|\.RData|\.Rds|\.rds$'
files: '\.(Rhistory|RData|Rds|rds)$'
# `exclude: <regex>` to allow committing specific files
- id: description version
name: Version has been incremeneted in DESCRIPTION
entry: .hooks/description
language: script
# `exclude: <regex>` to allow committing specific files.

ci:
autoupdate_schedule: monthly
# skip: [pkgdown]
6 changes: 2 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bikedata
Title: Download and Aggregate Data from Public Hire Bicycle Systems
Version: 0.2.5.046
Version: 0.2.5.068
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
comment = c(ORCID = "https://orcid.org/0000-0003-2172-5265")),
Expand Down Expand Up @@ -34,7 +34,6 @@ Imports:
httr,
lubridate,
magrittr,
methods,
Rcpp,
readxl,
reshape2,
Expand All @@ -55,8 +54,7 @@ VignetteBuilder:
Encoding: UTF-8
LazyData: true
NeedsCompilation: yes
RoxygenNote: 7.1.2
SystemRequirements: C++11
RoxygenNote: 7.3.3
X-schema.org-applicationCategory: Data Access
X-schema.org-isPartOf: https://ropensci.org
X-schema.org-keywords: bicycle-hire-systems, bike-hire-systems, bike-hire,
Expand Down
Loading
Loading