-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
188 lines (174 loc) · 5.21 KB
/
pyproject.toml
File metadata and controls
188 lines (174 loc) · 5.21 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
181
182
183
184
185
186
187
188
[project]
name = "fpbase-org"
version = "1.2.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
'algoliasearch_django==3.0.0',
'argon2-cffi>=21.3.0',
'biopython>=1.83',
'celery[redis]==5.5.3',
'django-allauth[socialaccount]>=0.70.0',
'django-anymail==10.0',
'django-autocomplete-light>=3.11.0',
'django-avatar>=8.0.1',
'django-cors-headers>=4.2.0',
'django-crispy-forms==1.13.0', # NOTE: there's an issue with 1.14 and bootstrap4 forms not having form-control class
'django-environ>=0.10.0',
'django-filter>=23.3',
'django-model-utils>=5.0.0',
'django-mptt>=0.18.0',
'django-recaptcha>=3.0.0',
'django-redis>=6.0.0',
'django-reversion-compare>=0.19.0',
'django-reversion>=6.0.0',
'django>=5.2,<5.3',
'djangorestframework-csv>=2.1.1',
'djangorestframework>=3.14.0',
'dnspython>=2.6.1',
'drf-spectacular>=0.26.3',
'google-analytics-data>=0.18.9',
'google-auth>=2.29.0',
'graphene-django-optimizer>=0.10.0',
'graphene-django>=3.2.3',
'graphene>=3.2.2',
'habanero>=1.2.3',
'matplotlib>=3.7.1',
'numpy>=1.26.3',
'Pillow>=10.0.0',
'psycopg2>=2.9.11; platform_system == "Linux"',
'python-slugify>=8.0.1',
'redis==5.0.4',
'sentry-sdk>=2.8',
"django-storages[boto3]>=1.13.2",
"django-structlog>=8.1.0",
"gunicorn>=20.1.0",
"requests>=2.32.5",
"scout-apm>=3.4.0",
"structlog-sentry>=2.1.0",
"structlog>=24.1.0",
"whitenoise[brotli]>=6.11.0",
"django-vite>=3.1.0",
"crispy-bootstrap5>=0.7",
]
[dependency-groups]
test = [
"factory-boy>=3.2.0",
"playwright>=1.55.0",
"psycopg2-binary>=2.9.11; platform_system == 'Darwin'",
"pytest-cov>=6.0.0",
"pytest-django>=4.10.0",
"pytest-playwright>=0.7.1",
"pytest-sugar>=1.0.0",
"pytest-xdist>=3.8.0",
"pytest>=8.3.4",
"pixelmatch>=0.3.0",
"sourcemap>=0.2.1",
]
typing = [
{ include-group = "test" },
"basedpyright>=1.32.1",
"celery-types>=0.23.0",
"django-types>=0.22.0",
"djangorestframework-stubs>=3.15.2",
]
dev = [
{ include-group = "typing" },
"django-extensions>=3.2.3",
"ipython>=8.32.0",
"pandas>=2.0.3",
"pdbpp>=0.10.3",
"prek>=0.2.11",
"ruff>=0.9.6",
]
# ==== pytest ====
[tool.pytest.ini_options]
minversion = "8.0"
DJANGO_SETTINGS_MODULE = "config.settings.test"
FAIL_INVALID_TEMPLATE_VARS = false
addopts = "--reuse-db --cov-config=pyproject.toml --color=yes"
python_files = ["tests.py", "test_*.py"]
pythonpath = ["backend"]
# Exclude e2e tests by default - run them explicitly with: pytest backend/tests_e2e/
norecursedirs = ["node_modules", "tests_e2e"]
filterwarnings = [
"error",
"ignore::ResourceWarning",
"ignore:.*_after_postgeneration will stop saving.*:DeprecationWarning:factory",
]
# ==== Coverage ====
[tool.coverage.run]
source = ["fpbase", "proteins", "references", "fpseq", "favit"]
omit = ["*/migrations/*", "*/tests/*", "proteins/management/**"]
# ==== ruff ====
[tool.ruff]
src = ["backend/"]
line-length = 99
target-version = "py313"
exclude = ['*/migrations/*', '*/static/CACHE/*', '.venv']
fix = true
unsafe-fixes = true
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"YTT", # flake8-2020
"B", # flake8-bugbear
"ISC", # string concatenation
"C4", # flake8-comprehensions
"DJ", # flake8-django
"RUF", # Ruff-specific rules
"LOG", # flake8-logging
"G", # flake8-logging-format
"TC", # flake8-type-checking
"SIM", # Common simplification rules
"TID", # flake8-tidy-imports
"FURB", # refurb
]
ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"S101", # Use of assert detected.
"RUF012", # Mutable class attributes should be annotated
]
[tool.ruff.lint.per-file-ignores]
"backend/config/settings/*" = ["F405"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.django-stubs]
django_settings_module = "config.settings.test"
[tool.djlint]
# we're actually using basedpyright
[tool.pyright]
pythonVersion = "3.13"
typeCheckingMode = "standard"
include = ["backend"]
exclude = ["**/migrations", "**/config/settings/"]
# Extra paths for module resolution
extraPaths = ["backend"]
# Type checking settings
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
# Disable noisy checks that don't work well with Django
reportMissingTypeStubs = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUntypedBaseClass = false
# Django has many dynamically created attributes (reverse relations, etc.)
reportAttributeAccessIssue = false
# Django and third-party libraries often use Optional types
reportOptionalMemberAccess = false
# Django Meta classes override parent Meta
reportIncompatibleVariableOverride = false
# Noisy for Django settings and library calls with incomplete stubs
reportCallIssue = false
reportArgumentType = false
reportIncompatibleMethodOverride = false
reportOperatorIssue = false
[tool.uv]
override-dependencies = ["django-stubs ; sys_platform == 'never'"]