Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (101 loc) · 2.84 KB
/
Copy pathpyproject.toml
File metadata and controls
118 lines (101 loc) · 2.84 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[project]
name = "fgcz-python-project-reference"
version = "0.1.0"
description = "Minimal reference project for typed, tested, and documented FGCZ Python packages."
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
authors = [
{ name = "Functional Genomics Center Zurich" },
]
dependencies = [
"cyclopts>=5.2,<6",
"loguru>=0.7.3,<0.8",
]
[project.scripts]
fgcz-reference = "fgcz_reference_project.cli:main"
[build-system]
requires = ["uv_build>=0.12.0,<0.13"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"deptry>=0.25.1,<0.26",
"diff-cover>=10.4.1,<11",
"pip-audit>=2.10,<3",
"pre-commit>=4.5,<5",
"pyright>=1.1.408,<2",
"pytest>=9,<10",
"pytest-cov>=7,<8",
"ruff==0.16.7",
]
docs = [
"mkdocs-material>=9.7,<10",
]
[tool.uv.build-backend]
module-name = "fgcz_reference_project"
[tool.pytest.ini_options]
addopts = "-ra --strict-config --strict-markers"
testpaths = ["tests"]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"RUF", # ruff-specific
"C90", # mccabe complexity
"PL", # pylint (convention/error/warning/refactor)
"SIM", # flake8-simplify
"RET", # flake8-return
"PTH", # flake8-use-pathlib
"PT", # flake8-pytest-style
"TID", # flake8-tidy-imports
"TC", # flake8-type-checking
"ARG", # flake8-unused-arguments
"EM", # flake8-errmsg
"D", # pydocstyle
"ANN", # flake8-annotations
"S", # flake8-bandit (security)
]
ignore = ["ANN401"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pylint]
max-args = 7
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "D", "ANN", "PLR2004", "ARG"]
"scripts/**" = ["S603", "S607", "D", "PLR2004", "EM"]
# Vendored third-party hook: linted and formatted, but not held to this project's
# docstring, annotation, and typing rules. See .ci/check-tests-structure/README.md.
".ci/**" = ["S101", "D", "ANN", "EM", "PLR2004", "ARG", "TC"]
[tool.ruff.format]
quote-style = "double"
[tool.pyright]
pythonVersion = "3.12"
include = ["src", "tests", "scripts"]
typeCheckingMode = "strict"
[tool.coverage.run]
branch = true
relative_files = true
source = ["fgcz_reference_project"]
[tool.coverage.report]
fail_under = 100
show_missing = true
[tool.deptry]
known_first_party = ["fgcz_reference_project"]
# The vendored hook in .ci/ is a separate distribution with its own dependencies;
# deptry would otherwise report them against this project.
extend_exclude = ["\\.ci"]
[tool.check-tests-structure]
sources_path = "src/fgcz_reference_project"
tests_path = "tests"