diff --git a/.gitattributes b/.gitattributes index 3d3fb406..48cac97f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,9 @@ # Auto detect text files and perform LF normalization * text=auto +data/* binary +src/* text=lf +R/* text=lf +tools/* text=lf *.rtf diff=astextplain *.RTF diff=astextplain @@ -10,6 +14,7 @@ *.png diff=png *.pdf diff=pdf +## after my bug report, I think Rcpp is now more deterministic ## git config diff.nodiff.command /usr/bin/true or /bin/true # *RcppExports* diff=nodiff # *.Rd diff=nodiff diff --git a/.gitconfig b/.gitconfig index 31b6fd2c..658f14d9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,6 +1,7 @@ [diff "png"] textconv = identify -quiet -format "%#" [diff "pdf"] + # or consider pdftotext textconv = identify -quiet -format "%#" [diff "nodiff"] command = /bin/true diff --git a/appveyor.yml b/appveyor.yml index 1349c12e..0d733e34 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,8 @@ +# vim: set shiftwidth=2 tabstop=2 softtabstop=-1 expandtab: # DO NOT CHANGE the "init" and "install" sections below +# +# https://github.com/krlmlr/r-appveyor +# for many environment variables to configure # Download script file from GitHub init: @@ -10,55 +14,59 @@ init: install: ps: Bootstrap -# temporarily disable cache if error? cache: -- C:\RLibrary - -# Adapt as necessary starting from here - -platform: - - x86 - - x64 + - C:\RLibrary before_build: -# - ls -aR + - ls -aR + - bash tools/dump-env.sh - rm .Rinstignore # do install everything for testing - sed -i'' -e '/.*[Dd]ata.*/d' .Rbuildignore # do include data for testing, some data not in github though - # make sure Rcpp generated code is made, if not checked in to repo - - Rscript -e "install.packages(c('remotes', 'Rcpp', 'knitr'), repos = 'https://cloud.r-project.org/'); Rcpp::compileAttributes()" - # temporarily used while latest icd.data is not on CRAN - #- Rscript -e "remotes::install_github(\"jackwasey/icd.data\", ref = \"WHO\")" - # CRAN of course doesn't do this, but Travis has build without nhds available - - Rscript -e "remotes::install_github(\"jackwasey/nhds\")" - -build_script: - - travis-tool.sh install_deps environment: - # APPVEYOR_CACHE_SKIP_RESTORE: true - WARNINGS_ARE_ERRORS: 1 + # env vars that may need to be set, at least temporarily, from time to time + # see https://github.com/krlmlr/r-appveyor#readme for details + # USE_RTOOLS: true + NOT_CRAN: true + WARNINGS_ARE_ERRORS: 0 _R_CHECK_EXIT_ON_FIRST_ERROR_: true USE_RTOOLS: true - R_BUILD_ARGS: "" - NOT_CRAN: true + R_BUILD_ARGS: "--no-manual --no-build-vignettes" + R_CHECK_ARGS: "--no-manual --ignore-vignettes --no-build-vignettes" + # TODO: use an environment script in tools/env + #_R_CHECK_FORCE_SUGGESTS_: false ICD_DATA_VERBOSE: true ICD_DATA_OFFLINE: true ICD_DATA_INTERACT: false -# by default, don't set environment, to be more like CRAN? -# ICD_DATA_ABSENT_ACTION: 'message' + # KEEP_VIGNETTES: "" + # by default, don't set environment, to be more like CRAN? + # ICD_DATA_ABSENT_ACTION: 'message' + # R_REMOTES_STANDALONE: Set this to true if builds are failing due to the inability to update infrastructure packages such as curl, git2r and rlang. Read more in the docs for the remotes package. + matrix: + - R_VERSION: patched + MINI_BENCH: "no" + - R_VERSION: release MINI_BENCH: "yes" + - R_VERSION: devel + MINI_BENCH: "no" + +platform: + - x86 + - x64 matrix: fast_finish: false -# allow_failures: -# - platform: x64 -# MINI_BENCH: "yes" -# exclude: -# - platform: x86 -# MINI_BENCH: "yes" + allow_failures: + - platform: x64 + MINI_BENCH: "yes" + +build_script: + - travis-tool.sh install_deps + #- see https://github.com/craigcitro/r-travis/wiki#configuration-options + #- travis-tool.sh install_github r-lib/covr test_script: - travis-tool.sh run_tests @@ -67,12 +75,12 @@ on_failure: - 7z a failure.zip *.Rcheck\* - appveyor PushArtifact failure.zip -after_build: - - pwd - - IF NOT "%MINI_BENCH%"=="" cd benchmarks/icd-JSS3447-replication - - IF NOT "%MINI_BENCH%"=="" make bench3 -# - IF NOT "%MINI_BENCH%"=="" make replmat # needs to call Rscript on appveyor path. - - IF NOT "%MINI_BENCH%"=="" cd ../.. +on_success: + - IF "%MINI_BENCH%"=="yes" cd benchmarks/icd-JSS3447-replication + - IF "%MINI_BENCH%"=="yes" make bench3 + # - IF NOT "%MINI_BENCH%"=="" make replmat # needs to call Rscript on appveyor path. + - IF "%MINI_BENCH%"=="yes" cd ../.. + #- Rscript -e "covr::codecov()" artifacts: - path: '*.Rcheck\**\*.log' @@ -94,11 +102,11 @@ artifacts: name: Bits notifications: - - provider: Email - to: - - appveyor@jackwasey.com -# subject: 'r-appveyor build {{status}}' # optional -# message: "https://ci.appveyor.com/project/krlmlr/r-appveyor" # optional - on_build_success: false - on_build_failure: true - on_build_status_changed: true + - provider: Email + to: + - appveyor@jackwasey.com + # subject: 'r-appveyor build {{status}}' # optional + # message: "https://ci.appveyor.com/project/krlmlr/r-appveyor" # optional + on_build_success: false + on_build_failure: true + on_build_status_changed: true diff --git a/man/figures/README-example-1.png b/man/figures/README-example-1.png index 721aa881..1a225972 100644 Binary files a/man/figures/README-example-1.png and b/man/figures/README-example-1.png differ diff --git a/tools/appveyor-yaml-check.sh b/tools/appveyor-yaml-check.sh new file mode 100755 index 00000000..740c43cf --- /dev/null +++ b/tools/appveyor-yaml-check.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ruby -ryaml -e "p YAML.load(STDIN.read)" <"${ICD_HOME?}/appveyor.yml" >/dev/null diff --git a/tools/githooks/pre-commit b/tools/githooks/pre-commit index ec5a57fb..b6a73285 100755 --- a/tools/githooks/pre-commit +++ b/tools/githooks/pre-commit @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -xu +set -u declare -i ok=0 declare -i wcres=0