Skip to content

Commit

Permalink
Add pixi to my template
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell R. Vollger committed Nov 22, 2024
1 parent b35f40b commit c356427
Show file tree
Hide file tree
Showing 6 changed files with 5,936 additions and 35 deletions.
43 changes: 9 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,19 @@
name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main, master]
branches: [main]
pull_request:
branches: [main, master]
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
options: ". --check --verbose"

Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test linting
uses: snakemake/[email protected]
with:
directory: .
snakefile: workflow/Snakefile
args: "--lint"

run-workflow:
needs: Formatting
# pixi test
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test CI
uses: snakemake/[email protected]
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
directory: .
snakefile: workflow/Snakefile
pixi-version: v0.37.0
cache: true
- run: pixi run test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ logs/**
.snakemake/**
**.code-workspace
temp/**
.ruff_cache/**
.pixi/**
.DS_Store
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,23 @@
This is a Snakemake project template. The `Snakefile` is under `workflow`.

[Slides](https://mrvollger.github.io/SmkTemplate/slides) describing and justifying the use of this template.

## Install

Please start by installing [pixi](https://pixi.sh/latest/) which handles the environment of this Snakemake workflow.

You can then setup of the `pixi` environment by cloning this repository and running:

```bash
pixi install
```

## Usage

I have decided to use `pixi` to handle execution of my Snakemake workflows.

```bash
pixi run snakemake ...
```

And in place of `...` use all the normal Snakemake arguments for your workflow.
Loading

0 comments on commit c356427

Please sign in to comment.