[tool.poetry]
name = "django-tools"
version = "0.54.0rc1"
description = "miscellaneous tools for Django based projects"
license = "GPL-3.0-or-later"
authors = ["Jens Diemer <django-tools@jensdiemer.de>"]
homepage = "https://github.com/jedie/django-tools/"
keywords=["django", "helpers", "tools", "utilities"]
classifiers = [
    # http://pypi.python.org/pypi?%3Aaction=list_classifiers
    "Development Status :: 5 - Production/Stable",
    "Environment :: Web Environment",
    "Intended Audience :: End Users/Desktop",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3 :: Only",
    'Framework :: Django',
    "Topic :: Database :: Front-Ends",
    "Topic :: Documentation",
    "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
    "Topic :: Internet :: WWW/HTTP :: Site Management",
    "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
    "Operating System :: OS Independent",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Utilities",
]
packages = [
    { include = "django_tools" },
    { include = "django_tools_test_project" },
]
# Will be generated from README.creole with: 'poetry run update_rst_readme'
readme='README.rst'

[tool.poetry.dependencies]
python = ">=3.7,<4.0.0"
bx_py_utils = "*"  # https://github.com/boxine/bx_py_utils
icdiff = "*"  # https://github.com/jeffkaufman/icdiff
pprintpp = "*"  # https://github.com/wolever/pprintpp
bleach = "*"
django = "*"

[tool.poetry.dev-dependencies]
poetry-publish = "*"  # https://github.com/jedie/poetry-publish
python-creole = "*"  # https://github.com/jedie/python-creole
bx_django_utils = "*"  # https://github.com/boxine/bx_django_utils
beautifulsoup4 = "*"
tox = "*"
poetry = "*"
poetry-core = "*"
pytest = "*"
pytest-randomly = "*"
pytest-cov = "*"
pytest-django = "*"
pytest-darker = "*"  # https://github.com/akaihola/pytest-darker
flake8 = "*"
isort = "*"
coveralls = "*"
autopep8 = "*"
colorlog = "*"
easy-thumbnails = "*"
django-filer = "*"
django-parler = "*"
django-debug-toolbar = "*"
pytest-playwright = "*"  # https://playwright.dev/python/docs/test-runners
model-bakery = "*"  # https://github.com/model-bakers/model_bakery
requests-mock = "*"
django-override-storage = "*"  # https://github.com/danifus/django-override-storage
EditorConfig = "*"  # https://github.com/editorconfig/editorconfig-core-py
tomli = "*"  # https://github.com/hukkin/tomli


[tool.poetry.scripts]
django_tools_selenium = "django_tools.selenium.cli:main"
update_rst_readme = "django_tools.publish:update_readme"
publish = "django_tools.publish:publish"
dev_server = "django_tools_test_project.manage:start_test_server"


[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"


[tool.darker]
src = ['.']
revision = "origin/main..."
line_length = 100
verbose = true
skip_string_normalization = true
diff = false
check = false
stdout = false
isort = true
lint = [
    "flake8",
]
log_level = "INFO"


[tool.isort]
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
atomic=true
profile='black'
line_length=100
skip_glob=[".*", "*/htmlcov/*","*/migrations/*"]
known_first_party=["django_tools","django_tools_test_project"]
lines_after_imports=2


[tool.pytest.ini_options]
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
minversion = "6.0"
markers = "playwright: marks Playwright tests (deselect with '-m \"not playwright\"')"
DJANGO_SETTINGS_MODULE="django_tools_test_project.settings.test"
norecursedirs = ".* __pycache__ coverage* dist htmlcov migrations django_tools/selenium"
# sometimes helpfull "addopts" arguments:
#    -vv
#    --verbose
#    --capture=no
#    --trace-config
#    --full-trace
#    -p no:warnings
# Add this to local test runs:
#    -x -p no:randomly
addopts = """
    --reuse-db
    --nomigrations
    --cov=.
    --cov-report term-missing
    --cov-report html
    --cov-report xml
    --no-cov-on-fail
    --showlocals
    --darker
    --doctest-modules
    --failed-first
    --last-failed-no-failures all
    --new-first
    --maxfail 3
    -p no:randomly
"""


[tool.tox]
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = py{37,38,39,310}-django{3.2,4.0,4.1}
skip_missing_interpreters = True

[testenv]
deps =
    django3.2: django>=3.2,<3.3
    django4.0: django>=4.0,<4.1
    django4.1: django>=4.1,<4.2
whitelist_externals = make
commands =
    make pytest
"""
