Skip to content
Snippets Groups Projects
pyproject.toml 1.76 KiB
Newer Older
ynerant's avatar
ynerant committed
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", 'django>=2.2,<5.0']
ynerant's avatar
ynerant committed
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "constellation/version.py"

[tool.check-manifest]
ignore = ["constellation/version.py"]

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
    py37-django22
    py38-django22
    py39-django{22,32}
    py310-django{32,41}
    py311-django{32,41}
ynerant's avatar
ynerant committed

    linters
skipsdist = True

[testenv]
sitepackages = False
ynerant's avatar
ynerant committed
deps =
    coverage
ynerant's avatar
ynerant committed
    django22: Django>=2.2,<3.0
ynerant's avatar
ynerant committed
    django32: Django>=3.2,<4.0
ynerant's avatar
ynerant committed
    django-crispy-forms>=1.9.2
ynerant's avatar
ynerant committed
    django-extensions~=3.0
    django-filter>=2.4.0
    django-polymorphic~=3.0
    djangorestframework~=3.12
    django-tables2>=2.3
ynerant's avatar
ynerant committed
    requests>=2.25.1
ynerant's avatar
ynerant committed
commands =
    ./manage.py makemigrations
    coverage run --omit='constellation/wsgi.py' --source='access,billing,constellation,firewall,layers,management,member,topography,unix' ./manage.py test access billing firewall layers management member topography unix
    coverage report -m

[testenv:linters]
deps =
    flake8
    flake8-colors
    flake8-django
    flake8-typing-imports
    pep8-naming
    pyflakes
    check-manifest
commands =
    flake8 access billing constellation firewall layers management member topography unix
    check-manifest

[flake8]
ignore = W503, I100, I101
exclude =
    .tox,
    .git,
    __pycache__,
    build,
    dist,
    *.pyc,
    *.egg-info,
    .cache,
    .eggs,
    *migrations*
max-complexity = 15
max-line-length = 120
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
"""