diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6707eac --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ + +files: '\.(py|rst|sh)$' +fail_fast: false + +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + #- id: check-executables-have-shebangs + - id: check-ast + +- repo: https://github.com/pycqa/flake8 + rev: 6.1.0 + hooks: + - id: flake8 + args: ["-j8", "--ignore=E203,E501,W503,E722", "--max-line-length=120", "--exit-zero"] + +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + args: ["--line-length=120"] + exclude: E501 + +- repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + args: ["--profile", "black"] # solves conflicts between black and isort + diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c040454..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -sequana -sequana_pipetools>=0.16 diff --git a/sequana_pipelines/demultiplex/main.py b/sequana_pipelines/demultiplex/main.py index d1a609c..0e6a588 100755 --- a/sequana_pipelines/demultiplex/main.py +++ b/sequana_pipelines/demultiplex/main.py @@ -10,18 +10,18 @@ # documentation: http://sequana.readthedocs.io # ############################################################################## -import sys import os +import sys -import rich_click as click import click_completion +import rich_click as click click_completion.init() NAME = "demultiplex" -from sequana_pipetools.options import * from sequana_pipetools import SequanaManager +from sequana_pipetools.options import * help = init_click( NAME, @@ -32,7 +32,7 @@ @click.command(context_settings=help) -@include_options_from(ClickSnakemakeOptions, working_directory=NAME) +@include_options_from(ClickSnakemakeOptions, working_directory="fastq") @include_options_from(ClickSlurmOptions) @include_options_from(ClickInputOptions, add_input_readtag=False) @include_options_from(ClickGeneralOptions) @@ -96,7 +96,7 @@ default=False, is_flag=True, show_default=True, - help="""Set options to--minimum-trimmed-read-length 15 --mask-short-adapter-reads 15 + help="""Set options to--minimum-trimmed-read-length 15 --mask-short-adapter-reads 15 and do not merge lanes""", ) @click.option( @@ -190,7 +190,7 @@ def main(**options): logger.critical(err) logger.critical( """Your sample sheet seems to be incorrect. Before running the pipeline you will have to fix it. You may use 'sequana samplesheet --quick-fix'""" - ) + ) # finalise the command and save it; copy the snakemake. update the config # file and save it.