[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "dantico"
description = "Tools to convert Django ORM models to Pydantic models"
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
authors = [
    { name = "Max Shapira", email = "max@winoutt.com" },
]
classifiers = [
    "Intended Audience :: Information Technology",
    "Intended Audience :: System Administrators",
    "Operating System :: OS Independent",
    "Topic :: Internet",
    "Topic :: Software Development :: Libraries :: Application Frameworks",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Software Development :: Libraries",
    "Topic :: Software Development",
    "Typing :: Typed",
    "Environment :: Web Environment",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Framework :: Django",
    "Framework :: Django :: 3.0",
    "Framework :: Django :: 3.1",
    "Framework :: Django :: 3.2",
    "Framework :: Django :: 4.0",
    "Framework :: Django :: 4.1",
    "Framework :: AsyncIO",
    "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
    "Topic :: Internet :: WWW/HTTP",
]

dependencies = [
    "Django >=3.0",
    "pydantic",
    "pydantic[email]"
]

dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/xshapira/dantico"
Documentation = "https://github.com/xshapira/dantico"

[project.optional-dependencies]
test = [
    "pytest",
    "pytest-cov",
    "pytest-django",
    "pytest-asyncio",
    "black",
    "isort",
    "flake8",
    "mypy",
    "django-stubs[compatible-mypy]",
    "psycopg2-binary",
]
doc = []

[tool.hatch.version]
path = "dantico/__init__.py"

[tool.isort]
profile = "black"
known_third_party = ["pydantic", "django"]

[tool.mypy]
ignore_missing_imports = true
show_error_codes = true

# --strict
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
# --strict end

[tool.pytest.ini_options]
addopts = "--nomigrations"
