Skip to content

Commit

Permalink
Merge pull request #252 from NBISweden/devel
Browse files Browse the repository at this point in the history
Merge `devel` into `main`
  • Loading branch information
fasterius authored Nov 11, 2023
2 parents 33ec13e + f04b906 commit ae276a1
Show file tree
Hide file tree
Showing 182 changed files with 33,961 additions and 25,324 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
nbisweden/workshop-reproducible-research:slim
strategy:
matrix:
env: [ snakemake, nextflow, jupyter, rmarkdown ]
env: [ snakemake, nextflow, jupyter, quarto ]
include:
- env: snakemake
cmd: snakemake -c 1 -d tutorials/snakemake/ -s tutorials/snakemake/snakefile_mrsa.smk
- env: nextflow
cmd: cd tutorials/nextflow && nextflow run main_mrsa.nf
- env: jupyter
cmd: jupyter nbconvert --to HTML tutorials/jupyter/supplementary_material.ipynb
- env: rmarkdown
cmd: mamba install --force-reinstall -y pandoc && cd tutorials/rmarkdown && echo 'rmarkdown::render("code/supplementary_material.Rmd", output_file="supplementary.html")' | R --vanilla
- env: quarto
cmd: mamba install -c conda-forge quarto && mamba install -c conda-forge deno && export QUARTO_DENO=$(which deno) && quarto render tutorials/quarto/quarto-tutorial-example.qmd --to html
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2.2.0
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/lectures.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
env: [snakemake, nextflow, jupyter, rmarkdown]
env: [snakemake, nextflow, jupyter, quarto]
include:
- env: snakemake
cmd: snakemake -c 1 -d tutorials/snakemake/ -s tutorials/snakemake/snakefile_mrsa.smk
- env: nextflow
cmd: cd tutorials/nextflow && nextflow run main_mrsa.nf
- env: jupyter
cmd: jupyter nbconvert --to HTML tutorials/jupyter/supplementary_material.ipynb
- env: rmarkdown
cmd: cd tutorials/rmarkdown && echo 'rmarkdown::render("code/supplementary_material.Rmd", output_file="supplementary.html")' | R --vanilla
- env: quarto
cmd: mamba install -c conda-forge quarto && mamba install -c conda-forge deno && export QUARTO_DENO=$(which deno) && quarto render tutorials/quarto/quarto-tutorial-example.qmd --to html
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2.2.0
Expand All @@ -39,4 +39,4 @@ jobs:
shell: bash -l {0}
run: |
conda list
${{ matrix.cmd }}
${{ matrix.cmd }}
19 changes: 9 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Conda environment
# Conda environments
*-env

# Xaringan-related files
**/*_files

# Lecture-related files
lectures/**/*.html
# lectures/**/*.pdf
lectures/*/*/remark-css-0.0.1/default.css
lectures/*/*/header-attrs-2.3/header-attrs.js

Expand All @@ -22,10 +17,14 @@ jupyter/.ipynb_checkpoints
**/intermediate
**/results
**/work
rmarkdown/.R*
rmarkdown/*html
rmarkdown/*Rproj
snakemake/*txt
snakemake/*png
snakemake/*tsv
.Rproj.user

# jupyter checkpoints
.ipynb_checkpoints
.idea

# Quarto-related files
.quarto/
**/*_files
1 change: 1 addition & 0 deletions lectures/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
25 changes: 13 additions & 12 deletions lectures/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Lectures

This directory contains all the course lectures, which were created using
[Quarto](https://quarto.org/). The directory is set up as a Quarto project,
so as to make rendering as simple as possible.

## Requirements

Install the required packages using:
Expand All @@ -10,23 +14,20 @@ conda env create -f environment.yml

## Rendering

Lectures in **Rmarkdown** format can be rendered using the following from
the command line:
Make sure your current directory is the `lectures/` directory and run the
following command:

```bash
Rscript -e 'rmarkdown::render(<Rmd-file>, "xaringan::moon_reader")'
quarto render
```

Lectures in **Jupyter notebook** format can be rendered using:
## Render a single lecture

To render only a single, specific lecture you can execute the following command:

```bash
jupyter nbconvert --to slides --execute <.ipynb-file>
quarto render <lecture>
```

## Render everything

To render all lectures you can use `snakemake`:

```bash
snakemake -j 1
```
For example, to render the Git lecture execute `quarto render git` while inside
the `lectures/` directory.
59 changes: 0 additions & 59 deletions lectures/Snakefile

This file was deleted.

23 changes: 23 additions & 0 deletions lectures/_extensions/NBISweden/nbis/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: NBIS Quarto Extension
author: Erik Fasterius
version: 1.0.0
quarto-required: ">=1.2.0"
contributes:
formats:
html:
code-fold: true
df-print: paged
embed-resources: true
highlight-style: nbis.theme
smooth-scroll: true
theme: [default, nbis.scss]
toc-location: left
toc-title: nbis-logo-green.svg
toc: true
revealjs:
code-line-numbers: false
embed-resources: true
logo: nbis-logo-green.svg
slide-level: 2
slide-number: false
theme: [default, nbis.scss]
3 changes: 3 additions & 0 deletions lectures/_extensions/NBISweden/nbis/nbis-logo-green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ae276a1

Please sign in to comment.