-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
184 lines (160 loc) · 4.55 KB
/
pyproject.toml
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
181
182
183
184
[project]
name = "biocommons.example"
authors = [
{ name="biocommons contributors", email="[email protected]" },
]
description = "Example Package"
readme = "README.md"
license = { file="LICENSE.txt" }
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dynamic = ["version"]
dependencies = [
"coloredlogs ~= 15.0",
"pyyaml ~= 6.0",
]
[project.optional-dependencies]
dev = [
"build ~= 0.8",
"ipython ~= 8.4",
"mypy-extensions ~= 1.0",
"pre-commit ~= 3.4",
"pyright~=1.1",
"ruff == 0.4.4",
]
tests = [
"pytest-cov ~= 4.1",
"pytest-optional-tests",
"pytest ~= 7.1",
"vcrpy",
"tox ~= 4.15",
]
docs = [
"mkdocs",
]
[project.scripts]
marvin-quote = "biocommons.example.__main__:main"
[project.urls]
"Homepage" = "https://github.com/biocommons/biocommons.example"
"Bug Tracker" = "https://github.com/biocommons/biocommons.example/issues"
[build-system]
requires = [
"setuptools >= 70.1",
"setuptools_scm[toml] ~= 8.1"
]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = [
"src",
]
exclude = [
"__pycache__",
"*.pyc",
]
namespaces = true
[tool.setuptools.package-data]
"*" = [
"*.gz",
"*.json",
"*.yaml",
]
[tool.setuptools_scm]
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
[tool.pytest.ini_options]
addopts = "-s -v -x --strict-markers -m 'not extra' --doctest-modules --cov=src"
doctest_optionflags = [
"ALLOW_BYTES",
"ALLOW_UNICODE",
"ELLIPSIS",
"IGNORE_EXCEPTION_DETAIL",
"NORMALIZE_WHITESPACE",
]
markers = [
"network: tests that require network connectivity",
"slow: slow tests that should be run infrequently",
]
[tool.coverage.run]
branch = true
source = ["biocommons.example"]
omit = ["*_test.py", "*/test/*", "*/tests/*"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
]
[tool.pyright]
include = ["src", "tests"]
[tool.ruff]
src = ["src", "tests"]
line-length = 100
[tool.ruff.lint]
select = [
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"E", "W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"DTZ", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
"EM", # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
"LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
"PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
"PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
"TRY", # https://docs.astral.sh/ruff/rules/#tryceratops-try
"PERF", # https://docs.astral.sh/ruff/rules/#perflint-perf
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
]
fixable = [
"F401",
"F541",
"I",
"D",
"UP",
"B",
"C4",
"EM",
"PIE",
"PT",
"RSE",
"RET",
"SIM",
"PERF",
"RUF",
]
ignore = [
# ignore for compatibility with formatter
"W191", "E111", "E114", "E117", "S321",
# other
"PLR0913",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]