Skip to content

Commit

Permalink
Feature/GitHub actions (#27)
Browse files Browse the repository at this point in the history
* edit rbuildignore

* Update pkgdown, fix vignette, prevent call to non-existent object in applyFilt

* remove docs

* remove visNetwork from dependencies

* add datadr back to workflows temporarily to appease site building
set pak version in pkgdown action
  • Loading branch information
clabornd authored Dec 17, 2023
1 parent 6513b46 commit bcc2cc6
Show file tree
Hide file tree
Showing 290 changed files with 219 additions and 136,675 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pkgdown-template
docs
data-raw
^scratchwork$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
57 changes: 57 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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
pull_request:
branches: master

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ubuntu-latest

# runs-on: ${{ matrix.config.os }}
#
# name: ${{ matrix.config.os }} (${{ matrix.config.r }})
#
# strategy:
# fail-fast: false
# matrix:
# config:
# - {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:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- 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-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
pak-version: devel # See https://github.com/r-lib/actions/issues/559

- uses: r-lib/actions/check-r-package@v2
env:
'_R_CHECK_LIMIT_CORES_': 'warn'
with:
upload-snapshots: true
args: 'c("--no-manual")'
build_args: 'c("--no-manual")'
error-on: '"error"'
49 changes: 49 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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
pull_request:
branches: 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
pak-version: devel # See https://github.com/r-lib/actions/issues/559

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

- name: Deploy to GitHub pages 🚀
if: |
github.event_name == 'release' ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master')
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
30 changes: 30 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: master
pull_request:
branches: master

name: test-coverage

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

steps:
- uses: actions/checkout@v2

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

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

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Session Data files
.RData
.DS_Store
# Output from site building
docs
# Example code in package build process
*-Ex.R
# Output files from R CMD build
Expand All @@ -16,6 +18,7 @@
# produced vignettes
vignettes/*.html
vignettes/*.pdf
vignettes/*.R
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth
# knitr and R markdown default cache directories
Expand Down
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Imports:
tidyr,
reshape2,
vegan,
visNetwork,
data.table,
ggplot2,
lazyeval,
Expand All @@ -34,15 +33,17 @@ Imports:
readr
Suggests:
MetaCycData,
datadr,
knitr,
rmarkdown,
datadr,
trelliscope,
foreach,
doParallel,
testthat,
purrr,
viridis,
DT
Remotes:
github::delta-rho/datadr,
github::EMSL-Computing/MetaCycData
VignetteBuilder: knitr
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion R/applyFilt.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ applyFilt.massFilt <- function(filter_object, msObj, min_mass = 200, max_mass =
if(length(min_mass) != 1) stop("min_mass must be of length 1")
if(length(max_mass) != 1) stop("max_mass must be of length 1")

edata_cname <- getEDataColName(ftmsObj)
edata_cname <- getEDataColName(msObj)

mass_info <- filter_object[,"Mass"]

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ftmsRanalysis
[![Build Status](https://travis-ci.org/EMSL-Computing/ftmsRanalysis.svg?branch=master)](https://travis-ci.org/EMSL-Computing/ftmsRanalysis)
<!-- badges: start -->
[![R-CMD-check](https://github.com/EMSL-Computing/ftmsRanalysis/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/EMSL-Computing/ftmsRanalysis/actions/workflows/R-CMD-check.yaml)
[![Coverage Status](https://codecov.io/github/EMSL-Computing/ftmsRanalysis/coverage.svg?branch=master)](https://codecov.io/github/EMSL-Computing/ftmsRanalysis?branch=master)
<!-- badges: end -->

This R package provides functionality for data formatting, preprocessing, filtering, exploratory data analysis and visualization of fourier transform (FT) mass spectrometry (MS) data.

Expand Down
68 changes: 67 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
template:
path: "pkgdown-template"
params:
bootswatch: cosmo
#title: FT-MS Data Analysis in R
Expand Down Expand Up @@ -99,6 +98,10 @@ reference:
- '`getInstrumentType`'
- '`getModuleName`'
- '`getVanKrevelenCategoryBounds`'
- title: CoreMS to ftmsRanalysis conversion
contents:
- 'coreMSDataToFtmsData'
- 'as.CoreMSData'
- title: Column name methods
desc: Methods to get the column name used to store various meta data values
contents:
Expand Down Expand Up @@ -145,6 +148,69 @@ reference:
- '`ftms12T_edata`'
- '`ftms12T_emeta`'
- '`ftms12T_fdata`'
- title: internal
desc: Other functions
contents:
- calc_aroma
- calc_dbe
- calc_element_ratios
- calc_gibbs
- calc_kendrick
- calc_nosc
- conf_filter
- conf_filter_dt
- filter_worker
- getGroupComparisonSummaryFunctionNames
- getPrincipalCoordinates
- gtest.standard
- heatmap
- mass_error_plot
- numPeaksPlot
- one_factor_change
- parse_mf
- plot.CoreMSData
- plot.confFilt
- plotlyHeatmap
- read_CoreMS_data
- setAromaColName
- setBS1ColName
- setBS2ColName
- setBS3ColName
- setCarbonColName
- setCompoundColName
- setDBEAIColName
- setDBEColName
- setDBEValenceDF
- setDBEoColName
- setEDataColName
- setElCompColName
- setExtractionColName
- setFDataColName
- setGibbsColName
- setHCRatioColName
- setHydrogenColName
- setIsotopicColName
- setKendrickDefectColName
- setKendrickMassColName
- setMFColName
- setMFNameColName
- setMassColName
- setModAromaColName
- setModuleColName
- setModuleNodeColName
- setNCRatioColName
- setNOSCColName
- setNPRatioColName
- setNitrogenColName
- setOCRatioColName
- setOxygenColName
- setPCRatioColName
- setPhosphorusColName
- setReactionColName
- setSulfurColName
- transformation_counts
- unique_mf_assignment
- vector_replace

github:
- icon: fa-github
Expand Down
Loading

0 comments on commit bcc2cc6

Please sign in to comment.