Skip to content

Commit

Permalink
Merge pull request #27 from aberHRML/devel
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
Jasen Finch authored Feb 20, 2023
2 parents 855fcb0 + 8191f0d commit 92b6590
Show file tree
Hide file tree
Showing 164 changed files with 2,424 additions and 11,200 deletions.
96 changes: 22 additions & 74 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# 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
# 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:
- master
- devel
branches: [main, master, devel]
pull_request:
branches:
- master
branches: [main, master]

name: R-CMD-check

Expand All @@ -21,81 +18,32 @@ jobs:
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"}
- {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
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

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

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- 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@v1
- uses: r-lib/actions/setup-r-dependencies@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 Windows system dependencies
if: runner.os == 'Windows'
run: |
download.file('https://github.com/girke-lab/ChemmineOB/releases/download/3.0.0/openbabel3-build.zip','D:/a/openbabel3-build.zip')
untar('D:/a/openbabel3-build.zip',exdir = 'D:/a/openbabel3-build')
shell: Rscript {0}

- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
sudo apt install libopenbabel-dev
- name: Install macOS system dependencies
if: runner.os == 'macOS'
run: |
brew install open-babel
- 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
OPEN_BABEL_SRC: D:/a/openbabel3-build/src
OPEN_BABEL_BIN: D:/a/openbabel3-build/bin
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
extra-packages: any::rcmdcheck
needs: check

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
46 changes: 46 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

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

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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, master]
pull_request:
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3

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

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

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

- 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@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
54 changes: 12 additions & 42 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,59 +1,29 @@
Package: mzAnnotation
Title: Signal Annotation Tools for High Resolution Metabolomics
Version: 1.7.5
Title: Tools for Putative Annotation of Electrospray Ionisation High Resolution Mass Spectrometry Data
Version: 2.0.0
Authors@R:
person(given = "Jasen",
family = "Finch",
role = c("aut", "cre"),
email = "[email protected]")
Description: Tools for the putative annotation of high resolution metabolomics m/z.
data.
biocViews: MassSpectrometry, Metabolomics
URL: https://jasenfinch.github.io/mzAnnotation/
BugReports: https://github.com/jasenfinch/mzAnnotation/issues
Description: Tools to aid the putative annotation of electrospray ionisation high resolution mass spectrometry data. These include molecular formula generation, relationship calculation and isotopic distribution calculation.
URL: http://aberhrml.github.io/mzAnnotation/
BugReports: https://github.com/aberHRML/mzAnnotation/issues
Depends: R (>= 3.5)
Imports:
Rcpp,
CHNOSZ,
tibble,
dplyr,
magrittr,
purrr,
rlang,
Rcpp,
stringr,
tidyr,
methods,
callr
tidyr
License: GPL (>= 3)
Encoding: UTF-8
RoxygenNote: 7.1.1
LazyData: true
Suggests: testthat,
covr,
zlibbioc
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
LinkingTo: Rcpp
Collate: allGenerics.R
allClasses.R
adductTransfromMF.R
aminoAcids.R
calcAccurateMass.R
calcAdducts.R
calcM.R
calcMZ.R
checks.R
convert.R
data.R
descriptors.R
elementFrequencies-method.R
filter-methods.R
generateMF.R
get-methods.R
ionisationProducts.R
isotopeDistribution.R
metaboliteDB.R
mzAnnotation.R
PIPsearch.R
ppmError.R
RcppExports.R
relationshipCalculator.R
show-method.R
transformMF.R
Suggests: testthat,
covr
Loading

0 comments on commit 92b6590

Please sign in to comment.