Add pyproject.toml file.

This commit is contained in:
Víðir Valberg Guðmundsson 2024-01-13 15:39:31 +01:00
parent 8eaaf4d11f
commit 4b78d27bce
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 # This file is autogenerated by pip-compile with Python 3.11
# by the following command: # 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 asgiref==3.7.2
# via django # via django
@ -26,21 +26,26 @@ dj-email-url==1.0.6
# via environs # via environs
django==5.0.1 django==5.0.1
# via # via
# -r requirements/base.in
# dj-database-url # dj-database-url
# django-allauth # django-allauth
# django-money # django-money
# django-registries
# django-zen-queries # django-zen-queries
# membersystem (pyproject.toml)
django-allauth==0.60.0 django-allauth==0.60.0
# via -r requirements/base.in # via membersystem (pyproject.toml)
django-cache-url==3.4.5 django-cache-url==3.4.5
# via environs # via environs
django-money==3.4.1 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 django-zen-queries==2.1.0
# via -r requirements/base.in # via membersystem (pyproject.toml)
environs[django]==10.0.0 environs[django]==10.0.0
# via -r requirements/base.in # via
# environs
# membersystem (pyproject.toml)
h11==0.14.0 h11==0.14.0
# via uvicorn # via uvicorn
idna==3.6 idna==3.6
@ -52,7 +57,9 @@ oauthlib==3.2.2
packaging==23.2 packaging==23.2
# via marshmallow # via marshmallow
psycopg[binary]==3.1.16 psycopg[binary]==3.1.16
# via -r requirements/base.in # via
# membersystem (pyproject.toml)
# psycopg
psycopg-binary==3.1.16 psycopg-binary==3.1.16
# via psycopg # via psycopg
py-moneyed==3.0 py-moneyed==3.0
@ -60,7 +67,9 @@ py-moneyed==3.0
pycparser==2.21 pycparser==2.21
# via cffi # via cffi
pyjwt[crypto]==2.8.0 pyjwt[crypto]==2.8.0
# via django-allauth # via
# django-allauth
# pyjwt
python-dotenv==1.0.0 python-dotenv==1.0.0
# via environs # via environs
python3-openid==3.2.0 python3-openid==3.2.0
@ -81,9 +90,9 @@ typing-extensions==4.9.0
urllib3==2.1.0 urllib3==2.1.0
# via requests # via requests
uvicorn==0.25.0 uvicorn==0.25.0
# via -r requirements/base.in # via membersystem (pyproject.toml)
whitenoise==6.6.0 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: # The following packages are considered to be unsafe in a requirements file:
# setuptools # setuptools