-
Notifications
You must be signed in to change notification settings - Fork 11
/
pyproject.toml
141 lines (131 loc) · 3.85 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
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "jobserver"
description = "jobserver"
readme = "README.md"
authors = [{name = "OpenSAFELY", email = "[email protected]"}]
license = {file = "LICENSE"}
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
]
requires-python = ">=3.12"
dynamic = ["version"]
[tool.setuptools.packages.find]
exclude = ["tests*"] # exclude packages matching these glob patterns (empty by default)
[tool.coverage.run]
branch = true
relative_files = true
dynamic_context = "test_function"
omit = [
"*/migrations/*",
"applications/management/commands/fix_truncated_data.py",
"jobserver/asgi.py",
"jobserver/jobs/*",
"interactive/management/commands/create_testing_analysis.py",
"interactive/management/commands/osi_release.py",
"interactive/management/commands/osi_run.py",
"interactive/management/commands/osi_run_and_release.py",
"jobserver/management/commands/count_rows.py",
"jobserver/management/commands/ensure_backends.py",
"jobserver/management/commands/get_all_projects.py",
"jobserver/management/commands/get_transitional_projects.py",
"jobserver/management/commands/inflate_release_files.py",
"jobserver/management/commands/list_missing_repos.py",
"jobserver/management/commands/publish_files.py",
"jobserver/management/commands/release.py",
"jobserver/settings.py",
"jobserver/wsgi.py",
]
parallel = true
source = [
"airlock",
"applications",
"interactive",
"jobserver",
"redirects",
"services",
"staff",
"tests",
]
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true
[tool.coverage.html]
show_contexts = true
[tool.pytest.ini_options]
addopts = "--disable-network --tb=native --ignore=./release-hatch --maxprocesses=6"
DJANGO_SETTINGS_MODULE = "jobserver.settings"
env = [
"JOBSERVER_GITHUB_TOKEN=empty",
"PASSWORD_HASHERS=django.contrib.auth.hashers.MD5PasswordHasher",
"SECRET_KEY=12345",
"SOCIAL_AUTH_GITHUB_KEY=test",
"SOCIAL_AUTH_GITHUB_SECRET=test",
"DEFAULT_OUTPUT_CHECKING_REPO=test-repo",
"DEFAULT_OUTPUT_CHECKING_SLACK_CHANNEL=test-channel",
]
filterwarnings = [
"error",
"ignore::pytest.PytestUnraisableExceptionWarning:",
"ignore:Call to deprecated method __init__:DeprecationWarning:",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning:",
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning:",
"ignore:The FORMS_URLFIELD_ASSUME_HTTPS transitional setting is deprecated.:django.utils.deprecation.RemovedInDjango60Warning:",
# this is actually in protobuf, via the opentelemetry stack vendored into
# opensafely, but is likely also coming from the opentelemetry stack also
# installed with this project
"ignore:datetime.datetime.utcfromtimestamp\\(\\) is deprecated.*:DeprecationWarning:opensafely",
]
markers = [
"slow_test: mark test as being slow running",
"verification: tests that verify fakes",
"disable_db: test that do not require a database",
]
[tool.ruff]
line-length = 88
exclude = [
".direnv",
".git",
".github",
".ipynb_checkpoints",
".pytest_cache",
".venv",
"__pycache__",
"assets",
"coverage",
"docker",
"docs",
"htmlcov",
"node_modules",
"outputs",
"release-hatch",
"releases",
"snippets",
"static",
"staticfiles",
"uploads",
"venv",
]
[tool.ruff.lint]
isort.lines-after-imports = 2
extend-select = [
"A", # flake8-builtins
"I", # isort
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"UP", # pyupgrade
"W", # pycodestyle warning
]
extend-ignore = [
"E501",
"E731",
# Remove ISC001 when https://github.com/astral-sh/ruff/issues/8272 is resolved.
"ISC001",
]
[tool.ruff.lint.per-file-ignores]
"gunicorn.conf.py" = ["INP001"]
"manage.py" = ["INP001"]
"sitecustomize.py" = ["INP001"]