Skip to content
Snippets Groups Projects
  • Nik | Klampfradler's avatar
    756eb1dc
    Implement base fo caching · 756eb1dc
    Nik | Klampfradler authored
    This adds a private module _caching that wraps both the Django caching frameworks and the ucache
    libray. Both happen to expose the same (or at least sufficiently identical) API. If neither is
    usable, a dummy cache class mocking the API, but doing nothing, is instantiated.
    Verified
    756eb1dc
    History
    Implement base fo caching
    Nik | Klampfradler authored
    This adds a private module _caching that wraps both the Django caching frameworks and the ucache
    libray. Both happen to expose the same (or at least sufficiently identical) API. If neither is
    usable, a dummy cache class mocking the API, but doing nothing, is instantiated.
tox.ini 1.98 KiB
[tox]
skipsdist = True
skip_missing_interpreters = true
envlist = py38

[testenv]
whitelist_externals = poetry
skip_install = true
envdir = {toxworkdir}/globalenv
commands_pre = poetry install -E cli -E django -E sysstat -E caching
commands =
    poetry run pytest --doctest-modules --cov-report=term-missing --cov=bigbluebutton/ {posargs} bigbluebutton/ tests/

[testenv:lint]
commands =
    - poetry run black --check --diff bigbluebutton/ tests/
    - poetry run isort -c --diff --stdout -rc bigbluebutton/ tests/
    poetry run flake8 {posargs} bigbluebutton/ tests/

[testenv:security]
commands =
    poetry show --no-dev
    poetry run safety check --full-report

[testenv:build]
commands_pre =
commands = poetry build

[testenv:docs]
commands = poetry run make -C docs/ html {posargs}

[testenv:reformat]
commands =
    poetry run isort -rc bigbluebutton/ tests/
    poetry run black bigbluebutton/ tests/

[testenv:django-admin]
commands =
    poetry run env DJANGO_SETTINGS_MODULE=tests.test_django.settings django-admin {posargs}

[flake8]
max_line_length = 100
ignore = E203,E231,W503
rst-directives =
    autosummary,data,currentmodule,deprecated,
    glossary,moduleauthor,plot,testcode,
    versionadded,versionchanged,
rst-roles =
    attr,class,func,meth,mod,obj,ref,term,
    # C programming language:
    c:member,
    # Python programming language:
    py:func,py:mod,

[isort]
line_length = 100
multi_line_output = 3
include_trailing_comma = 1
use_parantheses = 1
default_section = THIRDPARTY
known_first_party = aleksis
known_django = django
skip = migrations
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

[mypy]
plugins = mypy_django_plugin.main
python_version = 3.8
platform = linux
show_column_numbers = True
follow_imports = skip
ignore_missing_imports = True
cache_dir = /dev/null

[mypy.plugins.django-stubs]
django_settings_module = tests.test_django.settings

[pytest]
DJANGO_SETTINGS_MODULE = tests.test_django.settings
junit_family = legacy

[coverage:run]
omit =
    .tox/*