Skip to content

Commit

Permalink
feat: use fgsmk for hello_world.smk
Browse files Browse the repository at this point in the history
  • Loading branch information
ameynert committed Jan 13, 2025
1 parent 161590e commit edfc8ac
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 197 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Style check

on: [push]

env:
POETRY_VERSION: 1.8.2

jobs:
toolkit:
runs-on: ubuntu-24.04
strategy:
matrix:
PYTHON_VERSION: ["3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python {{ "${{ matrix.PYTHON_VERSION }}" }}
uses: actions/setup-python@v5
with:
python-version: {{ "${{ matrix.PYTHON_VERSION }}" }}

- name: Get full Python version
id: full-python-version
shell: bash
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT

- name: Install poetry
run: |
python -m pip install --upgrade pipx
pipx install poetry=={{ "${{env.POETRY_VERSION}}" }}
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-{{ "${{ runner.os }}" }}-{{ "${{ steps.full-python-version.outputs.version }}" }}-{{ "${{ hashFiles('**/poetry.lock') }}" }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Install the library
run: poetry install -v

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
environment-name: test
environment-file: environment.yml
cache-environment: true
post-cleanup: 'all'

- name: Bash style checking
shell: micromamba-shell {0}
run: |
bash shellcheck -x scripts/*.sh
- name: Snakemake style checking
shell: micromamba-shell {0}
run: |
snakefmt --line-length 100 workflows/*.smk
2 changes: 1 addition & 1 deletion workflows/hello_world.smk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
from typing import List

from scripts.snakemake_utils import on_error
from fgsmk.lib.log import on_error


################################################################################
Expand Down
196 changes: 0 additions & 196 deletions workflows/scripts/snakemake_utils.py

This file was deleted.

0 comments on commit edfc8ac

Please sign in to comment.