Skip to content
Snippets Groups Projects
Commit be395378 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'check/update-tox-ini' into 'master'

Update tox.ini

See merge request !133
parents 5071a302 4f7a4958
No related branches found
No related tags found
1 merge request!133Update tox.ini
Pipeline #157265 failed
Pipeline: AlekSIS

#157272

    ......@@ -12,9 +12,7 @@ class FAQForm(forms.Form):
    question = forms.CharField(widget=forms.Textarea(), label=_("Your question"), required=True)
    FAQOrderFormSet = forms.modelformset_factory(
    FAQSection, can_order=True, extra=0, fields="__all__"
    ) # noqa
    FAQOrderFormSet = forms.modelformset_factory(FAQSection, can_order=True, extra=0, fields="__all__") # noqa
    FAQOrderFormSet.ordering_widget = forms.widgets.HiddenInput
    ......
    ......@@ -136,7 +136,7 @@ class IssueCategory(ExtensibleModel):
    def save(self, *args, **kwargs):
    if self.free_text and self.children.exists():
    IssueCategory.objects.filter(parent=self).delete()
    super(IssueCategory, self).save(*args, **kwargs)
    super().save(*args, **kwargs)
    def get_absolute_url(self):
    return reverse("admin:hjelp_issuecategory_change", args=[self.id])
    ......@@ -21,14 +21,20 @@ span.chip {
    }
    .card-panel {
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
    box-shadow:
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12),
    0 1px 5px 0 rgba(0, 0, 0, 0.2);
    -webkit-box-shadow:
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12),
    0 1px 5px 0 rgba(0, 0, 0, 0.2);
    -webkit-transition: -webkit-box-shadow 0.25s;
    transition: -webkit-box-shadow 0.25s;
    transition: box-shadow 0.25s;
    transition: box-shadow 0.25s, -webkit-box-shadow 0.25s;
    transition:
    box-shadow 0.25s,
    -webkit-box-shadow 0.25s;
    padding: 24px;
    margin: 0.5rem 0 1rem 0;
    border-radius: 2px;
    ......
    ......@@ -288,7 +288,7 @@ def feedback(request):
    apps = form.cleaned_data["apps"]
    # Register activity
    act = Activity.objects.create(
    Activity.objects.create(
    title=_("You submitted feedback."),
    description=_(f"You rated AlekSIS with {overall_rating} out of 5 stars."),
    app="Feedback",
    ......
    ......@@ -4,11 +4,12 @@ skip_missing_interpreters = true
    envlist = py39,py310,py311
    [testenv]
    allowlist_externals = poetry
    allowlist_externals =
    poetry
    yarnpkg
    skip_install = true
    envdir = {toxworkdir}/globalenv
    commands_pre =
    poetry install
    poetry install --all-extras
    poetry run aleksis-admin vite build
    poetry run aleksis-admin collectstatic --no-input
    commands =
    ......@@ -22,14 +23,17 @@ setenv =
    TEST_HOST = {env:TEST_HOST:172.17.0.1}
    [testenv:lint]
    commands_pre =
    poetry install --only=dev
    yarnpkg --cwd=.dev-js
    commands =
    poetry run black --check --diff aleksis/
    poetry run isort -c --diff --stdout aleksis/
    poetry run flake8 {posargs} aleksis/
    poetry run sh -c "aleksis-admin yarn run prettier --check --ignore-path={toxinidir}/.prettierignore {toxinidir}"
    poetry run sh -c "aleksis-admin yarn run eslint {toxinidir}/aleksis/**/*/frontend/**/*.{js,vue} --config={toxinidir}/.eslintrc.js --resolve-plugins-relative-to=."
    poetry run ruff check {posargs} aleksis/
    yarnpkg --cwd=.dev-js run prettier --ignore-path={toxinidir}/.prettierignore {posargs} --check ..
    yarnpkg --cwd=.dev-js run eslint ../aleksis/**/*/frontend/**/*.{js,vue} --config={toxinidir}/.eslintrc.js --resolve-plugins-relative-to=.
    [testenv:security]
    commands_pre =
    poetry install --all-extras
    commands =
    poetry show --no-dev
    poetry run safety check --full-report
    ......@@ -41,33 +45,25 @@ commands_pre =
    commands = poetry build
    [testenv:docs]
    commands_pre =
    poetry install --with docs
    commands = poetry run make -C docs/ html {posargs}
    [testenv:reformat]
    commands_pre =
    poetry install --only=dev
    yarnpkg --cwd=.dev-js
    commands =
    poetry run isort aleksis/
    poetry run black aleksis/
    poetry run sh -c "aleksis-admin yarn run prettier --write --ignore-path={toxinidir}/.prettierignore {toxinidir}"
    poetry run ruff format aleksis/
    yarnpkg --cwd=.dev-js run prettier --ignore-path={toxinidir}/.prettierignore --write ..
    [testenv:makemessages]
    commands_pre =
    poetry install
    commands =
    poetry run aleksis-admin makemessages --no-wrap -e html,txt,py,email -i static -l ar -l de_DE -l fr -l nb_NO -l tr_TR -l la -l uk -l ru
    poetry run aleksis-admin makemessages --no-wrap -d djangojs -i **/node_modules -l ar -l de_DE -l fr -l nb_NO -l tr_TR -l la -l uk -l ru
    [flake8]
    max_line_length = 100
    exclude = migrations,tests
    ignore = BLK100,E203,E231,W503,D100,D101,D102,D103,D104,D105,D106,D107,RST215,RST214,F821,F841,S106,T100,T101,DJ05
    [isort]
    profile = black
    line_length = 100
    default_section = THIRDPARTY
    known_first_party = aleksis
    known_django = django
    skip = migrations
    sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
    [pytest]
    DJANGO_SETTINGS_MODULE = aleksis.core.settings
    junit_family = legacy
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment