membersystem/pyproject.toml

155 lines
3.8 KiB
TOML
Raw Normal View History

2024-01-13 14:39:31 +00:00
[build-system]
2024-03-03 10:05:08 +00:00
requires = ["hatchling"]
2024-01-13 14:39:31 +00:00
build-backend = "hatchling.build"
[project]
name = "membersystem"
description = ''
readme = "README.md"
requires-python = ">=3.11"
keywords = []
authors = [
{ name = "Víðir Valberg Guðmundsson", email = "valberg@orn.li" },
]
dependencies = [
2024-07-17 06:44:07 +00:00
"Django==5.0.7",
"django-money==3.5.2",
"django-allauth==0.63.6",
"psycopg[binary]==3.2.1",
2024-05-31 19:26:20 +00:00
"environs[django]==11.0.0",
2024-07-17 06:44:07 +00:00
"uvicorn==0.30.1",
"whitenoise==6.7.0",
2024-01-13 14:39:31 +00:00
"django-zen-queries==2.1.0",
"django-registries==0.0.3",
2024-01-14 11:27:36 +00:00
"django-view-decorator==0.0.4",
2024-05-31 19:26:20 +00:00
"django-oauth-toolkit==2.4.0",
2024-01-13 14:39:31 +00:00
]
2024-03-03 10:05:08 +00:00
version = "0.0.1"
2024-01-13 14:39:31 +00:00
2024-03-03 10:05:08 +00:00
[tool.hatch.build.targets.wheel]
packages = ["src"]
2024-01-13 14:39:31 +00:00
2024-07-14 21:14:07 +00:00
[tool.hatch.env]
requires = ["hatch-pip-compile"]
2024-01-13 14:39:31 +00:00
[tool.hatch.envs.default]
2024-07-14 21:14:07 +00:00
type = "pip-compile"
[tool.hatch.envs.dev]
type = "pip-compile"
2024-01-13 14:39:31 +00:00
dependencies = [
"coverage[toml]==7.3.0",
"pytest==7.2.2",
"pytest-cov",
"pytest-django==4.5.2",
"mypy==1.1.1",
"django-stubs==1.16.0",
"pip-tools==7.3.0",
"django-debug-toolbar==4.2.0",
"django-browser-reload==1.7.0",
"model-bakery==1.17.0",
]
[[tool.hatch.envs.tests.matrix]]
python = ["3.12"]
2024-07-14 21:14:07 +00:00
django = ["5.0"]
2024-01-13 14:39:31 +00:00
[tool.hatch.envs.tests.overrides]
matrix.django.dependencies = [
{ value = "django~={matrix:django}" },
]
matrix.python.dependencies = [
{ value = "typing_extensions==4.5.0", if = ["3.10"]},
]
2024-07-14 21:14:07 +00:00
[tool.hatch.envs.dev.scripts]
2024-01-13 14:39:31 +00:00
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --cov=tests --cov=append {args}"
no-cov = "cov --no-cov {args}"
typecheck = "mypy --config-file=pyproject.toml ."
requirements = "pip-compile --output-file requirements/base.txt pyproject.toml"
2024-03-03 10:05:08 +00:00
server = "./src/manage.py runserver 0.0.0.0:8000"
2024-01-13 14:39:31 +00:00
migrate = "./src/manage.py migrate"
makemigrations = "./src/manage.py makemigrations"
createsuperuser = "./src/manage.py createsuperuser"
shell = "./src/manage.py shell"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE="tests.settings"
addopts = "--reuse-db"
norecursedirs = "build dist docs .eggs/* *.egg-info htmlcov .git"
python_files = "test*.py"
testpaths = "tests"
pythonpath = ". tests"
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.mypy]
mypy_path = "src/"
exclude = [
"venv/",
"dist/",
"docs/",
]
namespace_packages = false
show_error_codes = true
strict = true
warn_unreachable = true
follow_imports = "normal"
#plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
#django_settings_module = "tests.settings"
[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true
2024-02-29 20:25:59 +00:00
[tool.ruff]
target-version = "py312"
extend-exclude = [
".git",
"__pycache__",
2024-07-14 22:19:37 +00:00
"manage.py",
"asgi.py",
"wsgi.py",
2024-02-29 20:25:59 +00:00
]
line-length = 120
[tool.ruff.lint]
# select = ["ALL"]
2024-02-29 20:25:59 +00:00
ignore = [
"G004", # Logging statement uses f-string
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use a f-string literal, assign to variable first
"COM812", # missing-trailing-comma (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"ISC001", # single-line-implicit-string-concatenation (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
2024-07-14 22:19:37 +00:00
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"FIX", # TODO, FIXME, XXX
"TD", # TODO, FIXME, XXX
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
2024-02-29 20:25:59 +00:00
]
[tool.ruff.lint.isort]
force-single-line = true
2024-07-14 22:19:37 +00:00
[tool.ruff.lint.per-file-ignores]
"tests.py" = [
"S101", # Use of assert
"SLF001", # Private member access
"D100", # Docstrings
"D103", # Docstrings
]