django_example_ynh/pyproject.toml

103 lines
2.6 KiB
TOML
Raw Normal View History

2020-12-23 19:53:13 +01:00
[tool.poetry]
name = "django_ynh"
2021-01-17 10:56:22 +01:00
version = "0.1.5"
2020-12-23 19:53:13 +01:00
description = "Glue code to package django projects as yunohost apps."
authors = ["JensDiemer <git@jensdiemer.de>"]
license = "GPL"
readme = "README.md"
2021-01-08 08:50:43 +01:00
homepage = "https://github.com/YunoHost-Apps/django_ynh"
2020-12-23 19:53:13 +01:00
packages = [
{ include = "django_ynh" },
]
[tool.poetry.dependencies]
python = ">=3.7,<4.0.0"
django = "*"
2021-01-17 10:56:22 +01:00
# The follogin extra packages are used for install "django_ynh" as YunoHost app:
gunicorn = { version = "*", optional = true }
psycopg2-binary = { version = "*", optional = true }
django-redis = { version = "*", optional = true }
django-axes = { version = "*", optional = true } # https://github.com/jazzband/django-axes
2020-12-23 19:53:13 +01:00
[tool.poetry.dev-dependencies]
2021-01-17 10:56:22 +01:00
django-axes = "*" # https://github.com/jazzband/django-axes
2020-12-23 19:53:13 +01:00
poetry-publish = "*" # https://github.com/jedie/poetry-publish
bx_py_utils = "*"
2020-12-23 19:53:13 +01:00
tox = "*"
pytest = "*"
pytest-cov = "*"
pytest-django = "*"
coveralls = "*"
isort = "*"
flake8 = "*"
flynt = "*"
black = "*"
pyupgrade = "*"
2021-01-17 10:56:22 +01:00
[tool.poetry.extras]
ynh = ["gunicorn", "psycopg2-binary", "django-redis", "django-axes"] # install as YunoHost app
2020-12-23 19:53:13 +01:00
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[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"
norecursedirs = ".* .git __pycache__ conf coverage* dist htmlcov volumes"
2020-12-23 19:53:13 +01:00
# 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
"""
[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
"""