-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
71 lines (62 loc) · 2.38 KB
/
pyproject.toml
File metadata and controls
71 lines (62 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# =============================================================================
# pyproject.toml — tool configuration for sm-vcf-annotation
# =============================================================================
# Centralises settings for ruff, mypy, snakefmt, and shellcheck.
# Install dev tools: pip install ruff mypy snakefmt shellcheck-py
[project]
name = "sm-vcf-annotation"
requires-python = ">=3.10"
# ---------------------------------------------------------------------------
# Ruff (linter + formatter for Python)
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py310"
line-length = 99
src = ["scripts", "workflow/rules", "workflow/scripts", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # line too long — handled by formatter
"SIM108", # ternary operator — readability preference
"SIM102", # nested if — keep for readability with comments
]
[tool.ruff.lint.per-file-ignores]
"workflow/scripts/*.py" = ["F821"] # `snakemake` global is injected at runtime
[tool.ruff.lint.isort]
known-first-party = ["scripts"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
# ---------------------------------------------------------------------------
# Mypy (type checker)
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
warn_unused_configs = true
warn_return_any = true
warn_unused_ignores = true
check_untyped_defs = true
exclude = ["workflow/scripts/"] # `snakemake` global is injected at runtime
# ---------------------------------------------------------------------------
# Pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = ["dryrun: snakemake subprocess tests (may require snakemake installed)"]
# ---------------------------------------------------------------------------
# Snakefmt (Snakemake formatter)
# ---------------------------------------------------------------------------
[tool.snakefmt]
line_length = 99
include = 'workflow/.*\.(smk|rules)$|workflow/Snakefile$'