generated from opensafely-core/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
103 lines (92 loc) · 2.37 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
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "opensafely-ehrql"
description = ""
version = "2+local"
readme = "README.md"
authors = [{name = "OpenSAFELY", email = "[email protected]"}]
license = {file = "LICENSE"}
classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
requires-python = ">=3.11"
[project.scripts]
ehrql = "ehrql.__main__:entrypoint"
[project.urls]
Home = "https://opensafely.org"
Documentation = "https://docs.opensafely.org"
Source = "https://github.com/opensafely-core/ehrql"
[tool.coverage.run]
branch = true
[tool.coverage.report]
fail_under = 100
skip_covered = true
exclude_also = [
# this indicates that the line should never be hit
"assert False",
# this condition is only true when a module is run as a script
'if __name__ == "__main__":',
# this indicates that a method should be defined in a subclass
"raise NotImplementedError",
]
omit = [
"ehrql/docs/__main__.py",
"tests/acceptance/external_studies/*",
"tests/lib/update_tpp_schema.py",
]
[tool.coverage.html]
[tool.flit.module]
name = "ehrql"
[tool.pydocstyle]
convention = "google"
add_select = [
"D213",
]
# Base ignores for all docstrings, for module/package specific ones add them to
# the CLI args in justfile
add_ignore = [
"D100",
"D104",
"D107",
"D212",
]
[tool.pytest.ini_options]
addopts = "--tb=native --strict-markers --dist=loadgroup"
testpaths = ["tests"]
filterwarnings = [
# ignnore dbapi() deprecation warnings for the third party TrinoDialect that we subclass
"ignore:.*dbapi.*TrinoDialect.*:sqlalchemy.exc.SADeprecationWarning",
# ignore warning about pydot being unmaintained; there's no obvious easy-to-install replacement
"ignore:.*nx.nx_pydot.to_pydot.*:DeprecationWarning",
]
[tool.ruff]
line-length = 88
exclude = [
".direnv",
".git",
".github/",
".ipynb_checkpoints",
".pytest_cache",
".venv/",
"__pycache__",
"coverage/",
"docker/",
"docs/",
"htmlcov/",
"tests/acceptance/external_studies/",
"tests/fixtures/bad_definition_files",
"venv/",
]
[tool.ruff.lint]
extend-select = [
"A", # flake8-builtins
"I", # isort
"INP", # flake8-no-pep420
"UP", # pyupgrade
"W", # pycodestyle warning
]
extend-ignore = [
"E501", # line-too-long
"UP032", # replace `.format` with f-string
]
isort.lines-after-imports = 2