Skip to content

Commit

Permalink
add linter
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesGawron committed Oct 30, 2024
1 parent 927f10f commit 755c7b4
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Lint Code Base

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
linter:
runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- name: Checkout Code
uses: actions/checkout@v4

# - name: Install conda environment dependencies
# uses: conda-incubator/setup-miniconda@v2
# with:
# miniforge-version: latest
# miniforge-variant: Mambaforge
# mamba-version: "*"
# channels: conda-forge,bioconda
# channel-priority: strict
# activate-environment: JupyText
# auto-update-conda: true
# environment-file: tests/conda_snk_env.yaml

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.12'
# architecture: 'x64'

- name: Super-linter
uses: super-linter/[email protected]
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main

VALIDATE_SNAKEMAKE_SNAKEFMT: true
#VALIDATE_SNAKEMAKE_LINT: true
PYTHON_RUFF_CONFIG_FILE: .ruff.toml
VALIDATE_PYTHON_RUFF: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77 changes: 77 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]

# Same as Black.
line-length = 88
indent-width = 4

# Assume Python 3.8
target-version = "py38"

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
# Like Black, use double quotes for strings.
quote-style = "single"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false

# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# mixmax
[![Super-Linter](https://github.com/JohannesGawron/DNA-ADT-analysis/actions/workflows/linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)

A python tool to develop cost efficient and robust multiplexing strategies for single-cell genomics and transcriptomics data that allows sample identification after demultiplexing.

0 comments on commit 755c7b4

Please sign in to comment.