Add pyproject.toml file.

This commit is contained in:
Víðir Valberg Guðmundsson 2024-01-13 15:39:31 +01:00
parent 9b52cd4270
commit 2ed5df5241
2 changed files with 124 additions and 10 deletions

105
pyproject.toml Normal file
View file

@ -0,0 +1,105 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
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 = [
"Django==5.0.1",
"django-money==3.4.1",
"django-allauth==0.60.0",
"psycopg[binary]==3.1.16",
"environs[django]==10.0.0",
"uvicorn==0.25.0",
"whitenoise==6.6.0",
"django-zen-queries==2.1.0",
"django-registries==0.0.3",
]
dynamic = ["version"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.envs.default]
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"]
django = ["4.2", "5.0"]
[tool.hatch.envs.tests.overrides]
matrix.django.dependencies = [
{ value = "django~={matrix:django}" },
]
matrix.python.dependencies = [
{ value = "typing_extensions==4.5.0", if = ["3.10"]},
]
[tool.hatch.envs.default.scripts]
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"
server = "./src/manage.py runserver"
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

View file

@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements/base.txt requirements/base.in
# pip-compile --output-file=requirements/base.txt pyproject.toml
#
asgiref==3.7.2
# via django
@ -26,21 +26,26 @@ dj-email-url==1.0.6
# via environs
django==5.0.1
# via
# -r requirements/base.in
# dj-database-url
# django-allauth
# django-money
# django-registries
# django-zen-queries
# membersystem (pyproject.toml)
django-allauth==0.60.0
# via -r requirements/base.in
# via membersystem (pyproject.toml)
django-cache-url==3.4.5
# via environs
django-money==3.4.1
# via -r requirements/base.in
# via membersystem (pyproject.toml)
django-registries==0.0.3
# via membersystem (pyproject.toml)
django-zen-queries==2.1.0
# via -r requirements/base.in
# via membersystem (pyproject.toml)
environs[django]==10.0.0
# via -r requirements/base.in
# via
# environs
# membersystem (pyproject.toml)
h11==0.14.0
# via uvicorn
idna==3.6
@ -52,7 +57,9 @@ oauthlib==3.2.2
packaging==23.2
# via marshmallow
psycopg[binary]==3.1.16
# via -r requirements/base.in
# via
# membersystem (pyproject.toml)
# psycopg
psycopg-binary==3.1.16
# via psycopg
py-moneyed==3.0
@ -60,7 +67,9 @@ py-moneyed==3.0
pycparser==2.21
# via cffi
pyjwt[crypto]==2.8.0
# via django-allauth
# via
# django-allauth
# pyjwt
python-dotenv==1.0.0
# via environs
python3-openid==3.2.0
@ -81,9 +90,9 @@ typing-extensions==4.9.0
urllib3==2.1.0
# via requests
uvicorn==0.25.0
# via -r requirements/base.in
# via membersystem (pyproject.toml)
whitenoise==6.6.0
# via -r requirements/base.in
# via membersystem (pyproject.toml)
# The following packages are considered to be unsafe in a requirements file:
# setuptools