Skip to content

Commit

Permalink
Merge pull request #77 from biometryhub/dev
Browse files Browse the repository at this point in the history
Merge dev to main for new release
  • Loading branch information
rogerssam authored May 31, 2024
2 parents 99fc341 + dc9577d commit 3c88046
Show file tree
Hide file tree
Showing 126 changed files with 20,556 additions and 48,149 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ todo.md
variogram_2d.R
^.*pdf$
^.*csv$
^.*xls$
^.*xlsx$
^.*docx$
check_rhub.R
cran-comments.md
Expand All @@ -25,3 +27,4 @@ sommer_vs_asreml.R
Data2020.Rdata
^CRAN-SUBMISSION$
.RDataTmp
summary_graph
92 changes: 42 additions & 50 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,71 +24,63 @@ jobs:
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel'}
# - {os: windows-latest, r: '4.0'}
- {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
- {os: ubuntu-22.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
- {os: ubuntu-22.04, r: 'release', rspm: "https://p3m.dev/cran/__linux__/jammy/latest"}
- {os: ubuntu-22.04, r: 'oldrel', rspm: "https://p3m.dev/cran/__linux__/jammy/latest"}


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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create and populate .Renviron file
run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron
# - name: Create and populate .Renviron file
# run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron


- name: Install data.table dependencies
if: runner.os == 'Linux'
run: sudo -s apt-get install zlib1g-dev pkg-config
# - name: Install data.table dependencies
# if: runner.os == 'Linux'
# run: sudo -s apt-get install zlib1g-dev pkg-config

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

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

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v3
use-public-rspm: true

# - name: Query dependencies
# run: |
# install.packages('remotes')
# saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
# shell: Rscript {0}

# - name: Cache R packages
# if: runner.os != 'Windows'
# uses: actions/cache@v3
# with:
# path: ${{ env.R_LIBS_USER }}
# key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
# restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-

# - name: Install system dependencies
# if: runner.os == 'Linux'
# env:
# RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
# run: |
# Rscript -e "remotes::install_github('r-hub/sysreqs')"
# sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
# sudo -s eval "$sysreqs"

- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
extra-packages: any::rcmdcheck, asreml=?ignore-before-r=5.0.0
needs: check

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: 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@master
uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
53 changes: 23 additions & 30 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,37 @@ name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
id: install-r
- uses: actions/checkout@v4

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Cache R packages
uses: actions/cache@v3
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ubuntu-22.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-22.04-${{ steps.install-r.outputs.installed-r-version }}-1-

- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_dev("pkgdown")
shell: Rscript {0}
extra-packages: any::pkgdown, local::.
needs: website

- name: Install package
run: R CMD INSTALL .
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Build and deploy pkgdown site
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
81 changes: 42 additions & 39 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,28 @@ name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
env:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"
vsni_LICENSE: ${{ secrets.vsni_LICENSE }}
# RSPM: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# vsni_LICENSE: ${{ secrets.vsni_LICENSE }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
- uses: actions/checkout@v4

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

- name: Set up RSPM
run: |
echo "options(repos = c(CRAN = 'https://packagemanager.rstudio.com/all/__linux__/focal/latest'))" >> ~/.Rprofile.site
echo "options(HTTPUserAgent = sprintf('R/%s R (%s)', getRversion(), paste(getRversion(), R.version['platform'], R.version['arch'], R.version['os'])))" >> ~/.Rprofile.site
shell: bash

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Get R and OS version
id: get-version
run: |
cat("##[set-output name=os-version;]", sessionInfo()$running, "\n", sep = "")
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v3
- uses: r-lib/actions/setup-r@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-
use-public-rspm: true

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2, asreml=?ignore-before-r=5.0.0
needs: coverage

- name: Create and populate .Renviron file
run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron
# - name: Create and populate .Renviron file
# run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron

# - name: Licence ASreml
# run: |
Expand All @@ -71,5 +46,33 @@ jobs:
# shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: 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
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.1.3
Date: 2023-07-19 05:07:30 UTC
SHA: 477c5510e61d94b013ee2be2c8105b428a116863
Version: 1.2.0
Date: 2024-05-31 09:46:32 UTC
SHA: ebce045fe222badd826f94e2d7cabb4475a5f32d
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: biometryassist
Title: Functions to Assist Design and Analysis of Agronomic Experiments
Version: 1.1.3
Version: 1.2.0
Authors@R:
c(person(given = "Sharon",
family = "Nielsen",
Expand Down Expand Up @@ -38,6 +38,7 @@ Depends:
R (>= 4.0.0)
Imports:
agricolae,
askpass,
cowplot,
curl,
emmeans,
Expand All @@ -48,13 +49,12 @@ Imports:
pracma,
rlang (>= 1.0.0),
scales,
stringi
stringi,
xml2
Suggests:
covr,
crayon,
getPass,
knitr,
mockery,
rmarkdown,
testthat,
vdiffr,
Expand All @@ -69,5 +69,5 @@ Config/testthat/edition: 3
Config/testthat/parallel: true
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Loading

0 comments on commit 3c88046

Please sign in to comment.