django_example_ynh/pyproject.toml
2020-12-28 12:35:36 +01:00

100 lines
2.4 KiB
TOML

[tool.poetry]
name = "django_ynh"
version = "0.1.0alpha0"
description = "Glue code to package django projects as yunohost apps."
authors = ["JensDiemer <git@jensdiemer.de>"]
license = "GPL"
readme = "README.md"
packages = [
{ include = "django_ynh" },
]
[tool.poetry.dependencies]
python = ">=3.7,<4.0.0"
django = "*"
django-axes = "*" # https://github.com/jazzband/django-axes
psycopg2-binary = "*"
django-redis = "*"
[tool.poetry.dev-dependencies]
poetry-publish = "*" # https://github.com/jedie/poetry-publish
tox = "*"
pytest = "*"
pytest-randomly = "*"
pytest-cov = "*"
pytest-django = "*"
coveralls = "*"
isort = "*"
flake8 = "*"
flynt = "*"
black = "*"
pyupgrade = "*"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
create_superuser = "django_ynh.create_superuser:main"
publish = "django_ynh_tests.test_project.publish:publish"
[tool.isort]
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
atomic=true
line_length=120
case_sensitive=false
skip_glob=["*/htmlcov/*","*/migrations/*","*/volumes/*"]
multi_line_output=3
include_trailing_comma=true
known_first_party=["django_ynh","django_ynh_project","django_ynh_tests"]
no_lines_before="LOCALFOLDER"
default_section="THIRDPARTY"
sections=["FUTURE","STDLIB","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"]
lines_after_imports=2
[tool.pytest.ini_options]
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
minversion = "6.0"
DJANGO_SETTINGS_MODULE="django_ynh_project.settings.tests"
norecursedirs = ".* .git __pycache__ coverage* dist htmlcov volumes"
# sometimes helpfull "addopts" arguments:
# -vv
# --verbose
# --capture=no
# --trace-config
# --full-trace
# -p no:warnings
addopts = """
--import-mode=importlib
--reuse-db
--nomigrations
--cov=.
--cov-report term-missing
--cov-report html
--cov-report xml
--no-cov-on-fail
--showlocals
--doctest-modules
--failed-first
--last-failed-no-failures all
--new-first
-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 = py39,py38,py37
skip_missing_interpreters = True
[testenv]
passenv = *
whitelist_externals = pytest
commands =
pytest --workers auto --tests-per-worker 1 --pyargs django_ynh django_ynh_project
"""