From a8640904840ede64007cb34893fdd107c282ff41 Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Mon, 29 Apr 2024 11:55:40 +1200 Subject: [PATCH] Added pyproject.toml --- .github/workflows/test.yml | 2 +- CHANGELOG.md | 1 + local_pangene | 5 ++--- pyproject.toml | 15 +++++++++++++++ tests/stub/{test_stub.json => params.json} | 3 ++- 5 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 pyproject.toml rename tests/stub/{test_stub.json => params.json} (89%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da21d2f..04497a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,7 @@ jobs: main.nf \ -profile local,docker \ -stub \ - -params-file tests/stub/test_stub.json + -params-file tests/stub/params.json confirm-pass: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 135fb02..7936734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 38. Updated `pfr_pangene` and `pfr/profile.config` 39. Now using local tests/stub files for GitHub CI 40. Now removing iso-forms left by TSEBRA using `AGAT_SPFILTERFEATUREFROMKILLLIST` +41. Added `pyproject.toml` ### `Fixed` diff --git a/local_pangene b/local_pangene index 9befef7..8a1aa8a 100755 --- a/local_pangene +++ b/local_pangene @@ -17,6 +17,5 @@ nextflow run \ -profile local,docker \ -resume \ $stub \ - -params-file pangene-test/test_params.json \ - --eggnogmapper_db_dir ../../dbs/emapperdb/5.0.2 \ - --eggnogmapper_tax_scope 33090 + -params-file pangene-test/params.json \ + --eggnogmapper_db_dir ../dbs/emapperdb/5.0.2 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5611062 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +# Config file for Python. Mostly used to configure linting of bin/*.py with Ruff. +# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. +[tool.ruff] +line-length = 120 +target-version = "py38" +cache-dir = "~/.cache/ruff" + +[tool.ruff.lint] +select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"] + +[tool.ruff.lint.isort] +known-first-party = ["nf_core"] + +[tool.ruff.lint.per-file-ignores] +"__init__.py" = ["E402", "F401"] diff --git a/tests/stub/test_stub.json b/tests/stub/params.json similarity index 89% rename from tests/stub/test_stub.json rename to tests/stub/params.json index c49c3e9..db97d3b 100644 --- a/tests/stub/test_stub.json +++ b/tests/stub/params.json @@ -1,7 +1,8 @@ { "input": "tests/stub/assemblysheet.csv", - "eggnogmapper_db_dir": "tests/stub/emapperdb/5.0.2", "external_protein_fastas": "tests/stub/external-protein-fastas.txt", + "eggnogmapper_db_dir": "tests/stub/emapperdb/5.0.2", + "eggnogmapper_tax_scope": 33090, "fastq": "tests/stub/fastqsheet.csv", "liftoff_annotations": "tests/stub/liftoffannotations.csv", "max_cpus": 2,