68 lines
2.0 KiB
TOML
68 lines
2.0 KiB
TOML
[project]
|
|
name = "bbs"
|
|
version = "0.1.0"
|
|
description = ""
|
|
authors = [{ name = "Nikolai R Kristiansen", email = "nikolaik@gmail.com" }]
|
|
requires-python = ">=3.14"
|
|
license = "MIT"
|
|
dependencies = [
|
|
"django-cors-headers>=4.9.0,<5",
|
|
"django-extensions>=4.1,<5",
|
|
"Django>=6.0,<7",
|
|
"easy-thumbnails>=2.8.1,<3",
|
|
"gunicorn>=26.0,<27",
|
|
"mysqlclient>=2.2,<3",
|
|
"Pillow>=13.0.0,<14",
|
|
"sentry-sdk>=2.61,<3",
|
|
"strawberry-graphql-django>=0.93,<0.94",
|
|
"strawberry-graphql>=0.330.3,<0.337",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
DJANGO_SETTINGS_MODULE = "bbs.settings"
|
|
|
|
[tool.coverage.run]
|
|
source = ["bbs"]
|
|
omit = ["bbs/tests/*", "**/test_*.py", "manage.py", "bbs/wsgi.py"]
|
|
|
|
[tool.coverage.report]
|
|
skip_covered = true
|
|
show_missing = true
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"ruff==0.17.2",
|
|
"pytest-django",
|
|
"pytest",
|
|
"pytest-cov>=7.1.0",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py314"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["ALL"]
|
|
ignore = [
|
|
"D", # pydocstyle: Allow undocumented code
|
|
"ANN", # flake8-annotations: Allow untyped code
|
|
"TD", "FIX", # Allow TODOs and FIXMEs
|
|
"RUF012", # FIXME: Fix later https://docs.astral.sh/ruff/rules/mutable-class-default/
|
|
"FBT002", # Allow boolean args
|
|
"G004", # Allow logging using f-string
|
|
"EM101", "EM102", # Allow string in exceptions (prioritice code readability vs exception time readability)
|
|
"TRY003", # Allow long exception messages
|
|
"E501", # Allow long lines
|
|
"COM812", "ISC001", # Avoid conflicting with ruff formatter
|
|
"CPY", # No copyright headers
|
|
"TC", # Strawberry/Django process annotations at runtime, can't defer imports
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Testing code can deviate a bit more
|
|
"bbs/tests/*.py" = ["S101", "S106", "PLR2004"]
|
|
"**/test_*.py" = ["S101", "S106", "PLR2004"]
|
|
"**/tests.py" = ["S101", "S106", "PLR2004"]
|
|
# strawberry.lazy with TYPE_CHECKING-guarded imports requires string annotations
|
|
"bbs/api/types/*.py" = ["UP037"]
|