-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
181 lines (161 loc) · 4.62 KB
/
pyproject.toml
File metadata and controls
181 lines (161 loc) · 4.62 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "fgmetric"
version = "0.2.0"
description = "Pydantic-backed Metric."
readme = "README.md"
authors = [{ name="Fulcrum Genomics LLC", email="contact@fulcrumgenomics.com" }]
license = "MIT"
include = ["LICENSE"]
requires-python = ">=3.12"
dependencies = [
"pydantic>=2.11.4",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
[project.urls]
"homepage" = "https://github.com/fg-labs/fgmetric"
"repository" = "https://github.com/fg-labs/fgmetric"
"Bug Tracker" = "https://github.com/fg-labs/fgmetric/issues"
[dependency-groups]
dev = [
"ruff ==0.14.4",
"mypy ==1.18.2",
"pytest ~=8.3",
"pytest-cov ~=6.1",
"pytest-mock ~=3.14",
"poethepoet ~=0.34",
"pre-commit ~=4.0",
]
ipython = [
"ipython ~=9.2",
]
[project.optional-dependencies]
benchmark = [
"pytest-benchmark ~=5.1.0",
"fgpyo ~=1.2.0",
]
[tool.poe.tasks]
fix-format = "ruff format"
fix-lint = "ruff check --fix"
fix-all.ignore_fail = "return_non_zero"
fix-all.sequence = [
"fix-format",
"fix-lint"
]
check-format = "ruff format --check --diff"
check-lint = "ruff check"
check-tests = "pytest --ignore=tests/benchmarks"
check-typing = "mypy"
check-all.ignore_fail = "return_non_zero"
check-all.sequence = [
"check-format",
"check-lint",
"check-typing",
"check-tests"
]
fix-and-check-all.sequence = [
"fix-format",
"fix-lint",
"check-typing",
"check-tests"
]
benchmark = "pytest --no-cov --benchmark-group-by param:num_rows --override-ini testpaths=tests/benchmarks"
[tool.mypy]
files = ["./"]
strict_optional = true
strict_equality = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
enable_error_code = [
"ignore-without-code",
"possibly-undefined",
"exhaustive-match",
]
exclude = [
"docs/",
"site/",
]
[[tool.mypy.overrides]]
module = [
"pytest_benchmark.*",
"fgpyo.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests/"]
minversion = "7.4"
addopts = [
"--color=yes",
"--import-mode=importlib",
"--cov",
]
[tool.coverage.run]
omit = ["tests/benchmarks/*"]
[tool.ruff]
line-length = 100
target-version = "py312"
output-format = "full"
preview = true
[tool.ruff.lint]
select = [
"A", # Builtin shadowing
"ARG", # Unused arguments
"C901", # McCabe complexity
"B", # bugbear
"D", # pydocstyle (docstrings. We have the "google" convention enabled)
"D204", # Blank line between class docstring and first (__init__) method
"D213", # Summary line should be located on the line after opening quotes
"E", # pycodestyle errors
"LOG", # flake8-logging
"LOG015", # (preview rule) Prohibit calls to the root logger
"F", # pyflakes
"I", # isort
"N", # PEP8 naming
"W", # pycodestyle warnings
"Q", # flake8-quotes
"RUF008", # Do not use mutable default values for dataclass attributes
"RUF012", # Mutable class attributes should be annotated with typing.ClassVar
"RUF024", # Do not pass mutable objects as values to dict.fromKeys
]
ignore = [
"E203",
"E701",
"D212", # summary line should be located on the same line as opening quotes
"D100", # missing docstring in public module
"D104", # missing docstring in public package
"D105", # missing docstring in magic method
]
unfixable = ["B"]
# NB: only preview rules explicitly selected above (e.g. LOG015) will be enforced
preview = true
explicit-preview-rules = true
[tool.ruff.lint.per-file-ignores]
# Ignore `D103` Missing docstring in public function in test files
"tests/**.py" = ["D103"]
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.pydocstyle]
convention = "google"