svthalia/concrexit

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[tool.poetry]
name = "concrexit"
version = "0.0.dev"
description = "New new Thalia website, now with extra Django."
authors = ["Thalia Technicie <www@thalia.nu>"]
license = "AGPL-3.0-or-later"
package-mode = false

[tool.poetry.dependencies]
python = "^3.11"
Django = "5.0.6"
django-localflavor = "4.0"
djangorestframework = "3.15.1"
django-ical = "1.9.2"
django-sendfile2 = "0.7.1"
django-queryable-properties = "1.8.5"
django-oauth-toolkit = "2.3.0"
django-cors-headers = "3.14.0"
django-debug-toolbar = "4.2.0"
django-admin-autocomplete-filter = "0.7.1"
django-bootstrap5 = "^22.1"
django-tinymce = "3.7.1"
django-storages = "^1.14.3"
django-drf-filepond = "0.5.0"
django-filepond-widget = "0.9.0"
django-thumbnails = "0.7.0"
django-ratelimit = "4.1.0"
django-sass-processor = "1.4.1"
django-otp = "1.5.0"
django-formtools = "2.5.1"
django-two-factor-auth = {extras = ["webauthn", "phonenumbers"], version = "^1.16.0"}
bleach = {extras = ["css"], version = "6.1.0"}
Pillow = "10.3.0"
python-magic = "0.4.27"
bcrypt = "4.0.1"
argon2_cffi = "21.3.0"
firebase-admin = "6.2.0"
google-api-python-client = "2.118.0"
sentry-sdk = "1.45.0"
beautifulsoup4 = "^4.11.1"
boto3 = "1.34.114"
gunicorn = "22.0.0"
qrcode = {version = "^7.4.2", extras = ["pil"]}
freezegun = "1.2.2"
celery = {version = "^5.3.6", extras = ["redis"]}

# Required (at least) by djangorestframework.
PyYAML = "6.0.1"
inflection = "^0.5.1"
uritemplate = "^4.1.1"

[tool.poetry.group.scss.dependencies]
# These dependencies are only needed to compile SASS, which can be done
# offline during a build. So these are not needed in production.
libsass = "0.23.0"
django-compressor = "4.4"

[tool.poetry.group.postgres]
optional = true

[tool.poetry.group.postgres.dependencies]
psycopg2 = "2.9.9"

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
recommonmark = "0.7.1"
sphinx = "6.2.1"

[tool.poetry.group.dev.dependencies]
django-template-check = "0.4.0"
factory_boy = "3.3.0"
pydenticon = "0.3.1"
Faker = "18.13.0"
coverage = {extras = ["toml"], version = "^7.5.3"}
isort = "5.12.0"
black = "23.9.1"
ruff = "0.0.291"
pre-commit = "3.5.0"
pyparsing = "^3.0.9"
pydot = "^1.4.2"
django-extensions = "^3.2.1"

[build-system]
requires = ["poetry>=1.8.2"]
build-backend = "poetry.masonry.api"

[tool.coverage.run]
branch = true
source = ["website"]
omit = ["website/manage.py", "website/thaliawebsite/wsgi.py", "website/thaliawebsite/settings.py", "website/*/migrations/*", "website/*/test*"]

[tool.coverage.report]
precision = 2
skip_covered = true
show_missing = true
fail_under = 65.0

[tool.black]
exclude = '(/(\.eggs|\.git|\.tox)/|migrations)'

[tool.isort]
profile = "black"
skip_glob = ["*/migrations/*"]
sections = [
    "FUTURE",
    "STDLIB",
    "DJANGO",
    "THIRDPARTY",
    "FIRSTPARTY",
    "LOCALFOLDER",
]

known_django = ["django"]
known_first_party = [
    "website",
    "activemembers",
    "announcements",
    "documents",
    "education",
    "events",
    "facedetection",
    "mailinglists",
    "members",
    "merchandise",
    "moneybirdsynchronization",
    "newsletters",
    "partners",
    "payments",
    "photos",
    "pizzas",
    "promotion",
    "pushnotifications",
    "registrations",
    "sales",
    "shortlinks",
    "singlepages",
    "thabloid",
    "thaliawebsite",
    "utils",
]

[tool.ruff]
exclude = ["migrations", "docs/conf.py", ".venv", ".vscode", ".pyenv"]

select = [
    "F",
    "E",
    "W",
    "N",
    "UP",
    "DJ008",
    "DJ003",
    "ISC",
    "PIE",
    "Q",
    "INT",
    "PLE",
    "PLW",
    "RUF",
    "D200",
    "D201",
    "D202",
    "D204",
    "D205",
    "D206",
    "D207",
    "D208",
    "D209",
    "D210",
    "D211",
    "D212",
    "D300",
    "D301",
    "D400",
    "D401",
    "D402",
    "D403",
    "D412",
    "D414",
    "D418",
    "D419",
]

target-version = "py311"

ignore = [
    "E501",  # line too long
    "N818",  # exception class should have Error suffix
    "PLW2901",  # loop variable overwritten
    "RUF005",  # use spread operator instead of concatenation
    "RUF012",
]

[tool.ruff.per-file-ignores]
"test_*.py" = [
    "F841",  # unused local variable
    "D400",  # docstring first line should end with a period
    "D401",  # docstring summary imperative mood
    "D205",  # docstring 1 line between summary and description
    "D212",  # docstring should start at first line
]