Split load_config into per-section readers, use contextlib.suppress and a single condition where ruff asked, remove stale noqa comments, add the SIM and RUF100 rules, share the sign_in test helper, align AD-6 with the code and record the remaining deferred findings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3t4WL7bd9bdHHNjEsxzqC
63 lines
1.8 KiB
TOML
63 lines
1.8 KiB
TOML
[project]
|
|
name = "self-service-portal"
|
|
version = "0.1.0"
|
|
description = "Self-service portal for directory users"
|
|
readme = "README.md"
|
|
requires-python = ">=3.13,<3.14"
|
|
dependencies = [
|
|
"django>=5.2,<5.3",
|
|
"gunicorn>=23.0",
|
|
"whitenoise>=6.9",
|
|
"tzdata",
|
|
"python-ldap>=3.4.4",
|
|
"authlib>=1.7,<1.8",
|
|
"requests>=2.32",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"polib>=1.2.0",
|
|
"pytest>=8",
|
|
"pytest-django>=4.9",
|
|
"pytest-env>=1.1",
|
|
"ruff>=0.8",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
DJANGO_SETTINGS_MODULE = "portal.config.settings"
|
|
testpaths = ["portal/tests"]
|
|
filterwarnings = ["ignore:No directory at:UserWarning"]
|
|
env = [
|
|
"SECRET_KEY=test-only-secret-key-not-for-use-0123456789abcdef",
|
|
"ALLOWED_HOSTS=testserver,localhost",
|
|
"DATA_DIR=.",
|
|
"DEBUG=false",
|
|
"LOG_LEVEL=INFO",
|
|
"LDAP_SERVER=dc.example.test",
|
|
"LDAP_USER_OU_DN=OU=Users,DC=example,DC=test",
|
|
"LDAP_BIND_DN=svc@example.test",
|
|
"LDAP_BIND_PASSWORD=test-only-service-password",
|
|
"LDAP_CA_FILE=pyproject.toml",
|
|
"LDAP_PUBLISHER_GROUP_DN=CN=Publishers,OU=Users,DC=example,DC=test",
|
|
"LDAP_ADMIN_GROUP_DN=CN=Admins,OU=Users,DC=example,DC=test",
|
|
"OIDC_ISSUER=https://idp.example.test/application/o/portal/",
|
|
"OIDC_CLIENT_ID=portal-client",
|
|
"OIDC_CLIENT_SECRET=test-only-client-secret",
|
|
"PUBLIC_BASE_URL=https://portal.example.test",
|
|
"SMTP_HOST=mail.example.test",
|
|
"SMTP_USERNAME=portal@example.test",
|
|
"SMTP_PASSWORD=test-only-mail-password",
|
|
"MAIL_FROM=Portal <portal@example.test>",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py313"
|
|
extend-exclude = ["**/migrations", "_bmad", "_bmad-output", ".agents", "context-resources"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "B", "UP", "S", "SIM", "RUF100"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"portal/tests/*" = ["S"]
|