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-08-09 06:33:14 +00:00
|
|
|
"Django~=5.1",
|
2024-07-31 21:17:00 +00:00
|
|
|
"django-allauth~=0.63",
|
2024-08-09 06:33:14 +00:00
|
|
|
"django-money~=3.5",
|
|
|
|
"django-oauth-toolkit~=2.4",
|
2024-01-13 14:39:31 +00:00
|
|
|
"django-registries==0.0.3",
|
2024-01-14 11:27:36 +00:00
|
|
|
"django-view-decorator==0.0.4",
|
2024-08-09 06:33:14 +00:00
|
|
|
"django-zen-queries~=2.1",
|
2024-08-03 17:55:32 +00:00
|
|
|
"django_stubs_ext~=5.0",
|
2024-08-09 06:33:14 +00:00
|
|
|
"environs[django]>=11,<12",
|
|
|
|
"psycopg[binary]~=3.2",
|
2024-08-03 17:55:32 +00:00
|
|
|
"stripe~=10.5",
|
2024-08-09 06:33:14 +00:00
|
|
|
"uvicorn~=0.30",
|
|
|
|
"whitenoise~=6.7",
|
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"
|
2024-08-02 22:58:19 +00:00
|
|
|
pip-compile-resolver = "uv"
|
2024-07-14 21:14:07 +00:00
|
|
|
|
|
|
|
[tool.hatch.envs.dev]
|
|
|
|
type = "pip-compile"
|
2024-08-02 22:58:19 +00:00
|
|
|
pip-compile-resolver = "uv"
|
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-08-09 06:33:14 +00:00
|
|
|
django = ["5.1"]
|
2024-01-13 14:39:31 +00:00
|
|
|
|
|
|
|
[tool.hatch.envs.tests.overrides]
|
|
|
|
matrix.django.dependencies = [
|
|
|
|
{ value = "django~={matrix:django}" },
|
|
|
|
]
|
|
|
|
|
2024-07-31 21:26:40 +00:00
|
|
|
[tool.hatch.envs.default.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 ."
|
2024-07-31 21:26:40 +00:00
|
|
|
requirements = "hatch env run --env default -- python --version; hatch env run --env dev -- python --version"
|
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"
|
2024-08-03 17:55:32 +00:00
|
|
|
# You need to install Stripe CLI from here to run this: https://github.com/stripe/stripe-cli/releases
|
|
|
|
stripe_cli = "stripe listen --forward-to 0.0.0.0:8000/order/stripe/webhook/"
|
2024-01-13 14:39:31 +00:00
|
|
|
|
|
|
|
[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"
|
2024-08-03 17:55:32 +00:00
|
|
|
plugins = ["mypy_django_plugin.main"]
|
2024-01-13 14:39:31 +00:00
|
|
|
|
|
|
|
[tool.django-stubs]
|
2024-08-03 17:55:32 +00:00
|
|
|
django_settings_module = "project.settings"
|
2024-01-13 14:39:31 +00:00
|
|
|
|
|
|
|
[[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"]
|
|
|
|
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
|
|
|
|
]
|