Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion to BiocBook #11

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e4558af
Init BiocBook from template version 1.0.5
js2264 Nov 6, 2023
8da5a56
Publishing
js2264 Nov 6, 2023
fb1412d
doc: update DESCRIPTION
js2264 Nov 6, 2023
e383270
book: intro chapter
js2264 Nov 6, 2023
8b3cc71
book: add raw ms data chapter
js2264 Nov 6, 2023
d7926ba
docker: silent quarto install
js2264 Nov 7, 2023
b0aa350
book: fix first chapters
js2264 Nov 7, 2023
06df90c
book: fix deps
js2264 Nov 7, 2023
66a7425
test: callout answer
js2264 Nov 8, 2023
d2cc070
book: fix first chapters
js2264 Nov 8, 2023
b28bac5
book: deactivate pdf output for now
js2264 Nov 8, 2023
0da6d40
book: add identification chapter
js2264 Nov 14, 2023
a9e363d
book: add quantitative chapter
js2264 Nov 14, 2023
a96f9d2
book: add extra chapters
js2264 Nov 14, 2023
88f38da
book: add ref sections
js2264 Nov 14, 2023
68dc87c
book: fix URLs
js2264 Nov 14, 2023
547e86f
book: fix missing BiocStyle
js2264 Nov 14, 2023
e7bc546
fix: rm SpectraVis and msmbstyle deps (from remotes)
js2264 Nov 14, 2023
83e489c
Merge remote-tracking branch into devel
js2264 Nov 14, 2023
9a4839f
fix: purge older, now unnecessary files
js2264 Nov 14, 2023
becfebb
fix: DESCRIPTION tags for book
js2264 Nov 14, 2023
244deca
doc: add GPL3 license
js2264 Nov 14, 2023
694f614
Merge branch 'main' into devel
lgatto Dec 5, 2023
a250557
feat: add .editorconfig file back
js2264 Dec 6, 2023
431a4bd
feat: add biocViews Book, move BiocBook from Depends to Suggests
js2264 Dec 6, 2023
c4e9b71
feat: add LICENSE.qmd page (CC BY-NC-SA 4.0)
js2264 Dec 6, 2023
1cc1c27
Update CC-BY-SA
lgatto Dec 6, 2023
855e8c5
Update LICENSE.qmd
lgatto Dec 6, 2023
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
8 changes: 8 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
^inst/\.quarto$
^\.png$
^\.quarto$
^\.github$
^LICENSE\.md$
^NOTES\.md$
^README\.Rmd$
^Dockerfile$
17 changes: 17 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
The Bioconductor community values

* an open approach to science that promotes the sharing of ideas, code, and expertise
* collaboration
* diversity and inclusivity
* a kind and welcoming environment
* community contributions

In line with these values, Bioconductor is dedicated to providing a welcoming, supportive, collegial, experience free of harassment, intimidation, and bullying regardless of:

* identity: gender, gender identity and expression, sexual orientation, disability, physical appearance, ethnicity, body size, race, age, religion, etc.
* intellectual position: approaches to data analysis, software preferences, coding style, scientific perspective, etc.
* stage of career

In order to uphold these values, members of the Bioconductor community are required to follow the Code of Conduct.The latest version of Bioconductor project Code of Conduct is available at http://bioconductor.org/about/code-of-conduct/. Please read the Code of Conduct before contributing to this project.

Thank you!
111 changes: 111 additions & 0 deletions .github/workflows/biocbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: biocbook

on:
push:
branches:
- devel
- RELEASE_**

jobs:
build-push:
runs-on: ubuntu-latest
name: build-book (${{ github.ref_name }})
permissions:
contents: write
packages: write

steps:

- name: 🧾 Checkout repository
uses: actions/checkout@v3

- name: ⏳ Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1

- name: 🐳 Set up QEMU
uses: docker/setup-qemu-action@v2
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: 📝 Get book info
id: info
env:
OWNER: ${{ github.repository_owner }}
run: |
Pkgname=$(grep -m1 -E '^Package: +' DESCRIPTION | sed -E 's/.*: +//')
echo Pkgname=${Pkgname} >> "${GITHUB_ENV}"
pkgname=${Pkgname,,}
echo pkgname=${pkgname} >> "${GITHUB_ENV}"
owner=${OWNER,,}
echo owner=${owner} >> "${GITHUB_ENV}"
echo pkgversion=$(grep -m1 -E '^Version: +' DESCRIPTION | sed -E 's/.*: +//') >> "${GITHUB_ENV}"

- name: 🔐 Log in to the Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ env.owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🏷 Get metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ env.owner }}/${{ env.pkgname }}
tags: |
${{ github.ref_name }}
${{ env.pkgversion }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'devel') }}

- name: 📦 Install, build and check package in local Docker image
id: docker
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
BIOC_VERSION=${{ github.ref_name }}

- name: 🚀 Push local Docker image to ghcr.io
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
BIOC_VERSION=${{ github.ref_name }}

- name: 📚 Recover pkg artifacts generated during build in local Docker container (pkg bundle and book)
env:
IMG: ${{ steps.docker.outputs.ImageID }}
run: |
SHA=$(docker container create ${{ env.IMG }})
docker container cp ${SHA}:/${{ env.Pkgname }}_${{ env.pkgversion }}.tar.gz .
tar --extract --gzip --file ${{ env.Pkgname }}_${{ env.pkgversion }}.tar.gz
echo bundle_path=${{ env.Pkgname }}_${{ env.pkgversion }}.tar.gz >> "${GITHUB_ENV}"
echo book_path=${{ env.Pkgname }}/inst/doc/book/ >> "${GITHUB_ENV}"

- name: 🏷 Get gh-branch directory to deploy to
run: |
echo target_folder=$(echo ${{ github.ref_name }} | sed 's,RELEASE_,,' | tr '_' '.') >> "${GITHUB_ENV}"

- name: 🚀 Deploy book to Github Pages on versioned branch
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
folder: ${{ env.book_path }}/
target-folder: docs/${{ env.target_folder }}/
branch: gh-pages
clean: false

- name: 💾 Upload package bundle artifact
uses: actions/upload-artifact@v3
with:
name: bundle
path: ${{ env.bundle_path }}

- name: 💾 Upload book artifact
uses: actions/upload-artifact@v3
with:
name: book
path: ${{ env.book_path }}
53 changes: 53 additions & 0 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## Adapted from neurogenomics/rworkflows: rworkflows::use_workflow()

name: rworkflows
'on':
push:
branches:
- devel
- RELEASE_**
pull_request:
branches:
- devel
- RELEASE_**

jobs:
rworkflows:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
bioc: devel
r: auto
cont: ghcr.io/bioconductor/bioconductor:devel
rspm: https://packagemanager.rstudio.com/cran/__linux__/focal/release
# - os: macOS-latest
# bioc: release
# r: auto
# cont: ~
# rspm: ~
# - os: windows-latest
# bioc: release
# r: auto
# cont: ~
# rspm: ~
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ false }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ false }}
run_vignettes: ${{ false }}
has_testthat: ${{ true }}
run_covr: ${{ false }}
run_pkgdown: ${{ false }}
has_runit: ${{ false }}
has_latex: ${{ false }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
61 changes: 61 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Package: R4MS
Title: R for mass spectrometry
Description: |
This repository provides documentation and teaching material
focus on the analysis of mass spectrometry data for proteomics and metabolomics
using the [R for Mass Spectrometry](https://www.rformassspectrometry.org/)
software infrastructure.
Version: 0.98.0
Date: `r date()`
Authors@R: c(person(given = "Laurent", family = "Gatto",
comment = c(ORCID = "0000-0002-1520-2268"),
email = "laurent.gatto@uclouvain.be",
role = c("aut","cre")),
person(given = "Johannes", family = "Rainer",
email = "Johannes.Rainer@eurac.edu",
role = "aut",
comment = c(ORCID = "0000-0002-6977-7147")),
person(given = "Sebastian", family = "Gibb",
email = "mail@sebastiangibb.de",
role = "aut",
comment = c(ORCID = "0000-0001-7406-4443")))
URL: https://github.com/js2264/R4MS
BugReports: https://github.com/js2264/R4MS
biocViews:
Book
Depends:
R (>= 4.3)
Imports:
tidyverse,
factoextra,
msdata,
mzR,
rhdf5,
rpx,
MsCoreUtils,
QFeatures,
Spectra,
ProtGenerics,
PSMatch,
pheatmap,
limma,
gplots,
patchwork,
MSnID
Suggests:
BiocManager,
BiocVersion,
BiocStyle,
BiocCheck,
rcmdcheck,
glue,
sessioninfo,
knitr,
quarto,
BiocBook
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
BiocType: Book
VignetteBuilder: knitr
License: GPL (>= 3)
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG BIOC_VERSION
FROM bioconductor/bioconductor_docker:${BIOC_VERSION}
COPY . /opt/pkg

# Install book package
RUN Rscript -e 'repos <- BiocManager::repositories() ; remotes::install_local(path = "/opt/pkg/", repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE) ; sessioninfo::session_info(installed.packages()[,"Package"], include_base = TRUE)'

## Build/install using same approach than BBS
RUN R CMD INSTALL /opt/pkg
RUN R CMD build --keep-empty-dirs --no-resave-data /opt/pkg
Loading