Skip to content
Snippets Groups Projects
Verified Commit 952d41df authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Reformat

parent 3265c7f4
No related branches found
No related tags found
1 merge request!48Revert "Update pyproject"
Pipeline #173457 failed
{
"name": "aleksis-builddeps",
"version": "1.0.0",
"dependencies": {
"@intlify/eslint-plugin-vue-i18n": "^2.0.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-vue": "^9.7.0",
"prettier": "^3.0.0",
"stylelint": "^15.0.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^34.0.0"
}
}
......@@ -52,6 +52,11 @@ DEADJOE
.idea
.idea/
# VSCode
.vscode/
.history/
*.code-workspace
# Database
db.sqlite3
......@@ -62,20 +67,28 @@ docs/_build/
*.aux
# Generated files
aleksis/node_modules/
aleksis/static/
aleksis/whoosh_index/
/cache
/node_modules
.dev-js/node_modules
/static/
/whoosh_index/
.vite
.dev-js/.yarn
.dev-js/.pnp.cjs
.dev-js/.pnp.loader.mjs
# Lock files
poetry.lock
package-lock.json
yarn.lock
.dev-js/yarn.lock
# Tests
.coverage
.mypy_cache/
.tox/
htmlcov/
# Data
maintenance_mode_state.txt
media/
package-lock.json
# VSCode
.vscode/
.history/
*.code-workspace
......@@ -3,8 +3,6 @@ include:
file: /ci/general.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/prepare/lock.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/test/lint.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/test/security.yml
- project: "AlekSIS/official/AlekSIS"
......
# Byte-compiled / optimized / DLL files
*$py.class
*.py[cod]
__pycache__/
# Distribution / packaging
*.egg
*.egg-info/
.Python
.eggs/
.installed.cfg
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
# Installer logs
pip-delete-this-directory.txt
pip-log.txt
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# pyenv
.python-version
# Environments
.env
.venv
ENV/
env/
venv/
# Editors
*~
DEADJOE
\#*#
# IntelliJ
.idea
.idea/
# Database
db.sqlite3
# Sphinx
docs/_build/
# TeX
*.aux
# Generated files
/node_modules/
/static/
/whoosh_index/
poetry.lock
.coverage
.mypy_cache/
.tox/
htmlcov/
maintenance_mode_state.txt
media/
package-lock.json
yarn.lock
# VSCode
.vscode/
.history/
*.code-workspace
/cache
# Add HTML files to avoid problems with unsupported Django templates
*.html
# Do not check/reformat generated files
aleksis/core/util/licenses.json
.vite/
.pnp.cjs
.pnp.loader.mjs
......@@ -93,7 +93,7 @@ class EditVoucherForm(forms.ModelForm):
class Meta:
model = Voucher
exclude = ["code", "used_person_uid", "used", "deleted"]
exclude = ["code", "used_person_uid", "used", "deleted"] # noqa
widgets = {
"event": ModelSelect2Widget(
search_fields=["display_name__icontains"],
......@@ -415,13 +415,13 @@ class EditEventRegistrationForm(forms.ModelForm):
class Meta:
model = EventRegistration
exclude = []
exclude = [] # noqa
class EditTermForm(forms.ModelForm):
class Meta:
model = Terms
exclude = []
exclude = [] # noqa
class RegisterEventAccount(SignupForm, ExtensibleForm):
......@@ -468,7 +468,7 @@ class EditInfoMailingForm(forms.ModelForm):
class Meta:
model = InfoMailing
exclude = ["sent_to"]
exclude = ["sent_to"] # noqa
class RegistrationNotificationForm(forms.ModelForm):
......@@ -482,13 +482,13 @@ class RegistrationNotificationForm(forms.ModelForm):
class Meta:
model = InfoMailing
exclude = ["sent_to", "active"]
exclude = ["sent_to", "active"] # noqa
class RegistrationStatesForm(forms.ModelForm):
class Meta:
model = RegistrationState
exclude = []
exclude = [] # noqa
class PersonGroupFormPerson(forms.Form):
......
......@@ -18,30 +18,54 @@ classifiers = [
"Topic :: Education"
]
[[tool.poetry.source]]
name = "PyPI"
priority = "primary"
[[tool.poetry.source]]
name = "gitlab"
url = "https://edugit.org/api/v4/projects/461/packages/pypi/simple"
secondary = true
priority = "supplemental"
[tool.poetry.dependencies]
python = "^3.9"
aleksis-core = "^4.0.0.dev0"
python = "^3.10"
aleksis-core = "4.0.0.dev3"
django-localflavor = "^3.0"
django-formtools = "2.2"
django-formtools = "2.3"
django-starfield = "^1.0"
aleksis-app-postbuero = { version = "^3.0.dev0", allow-prereleases = true }
aleksis-app-tezor = { version = "^2.0.dev0", allow-prereleases = true }
aleksis-app-kort = { version = "^0.5.dev0" , allow-prereleases = true }
aleksis-app-postbuero = "3.0.dev0"
aleksis-app-tezor = "2.0.dev3"
aleksis-app-kort = "0.5.dev1"
[tool.poetry.dev-dependencies]
aleksis-builddeps = "*"
[tool.poetry.group.dev.dependencies]
django-stubs = "^4.2"
safety = "^2.3.5"
[tool.poetry.plugins."aleksis.app"]
paweljong = "aleksis.apps.paweljong.apps:DefaultConfig"
ruff = "^0.1.5"
[tool.black]
line-length = 100
exclude = "/migrations/"
curlylint = "^0.13.0"
[tool.poetry.group.test.dependencies]
pytest = "^7.2"
pytest-django = "^4.1"
pytest-django-testing-postgresql = "^0.2"
pytest-cov = "^4.0.0"
pytest-sugar = "^0.9.2"
selenium = "<4.10.0"
freezegun = "^1.1.0"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "^7.0"
sphinxcontrib-django = "^2.3.0"
sphinxcontrib-svg2pdfconverter = "^1.1.1"
sphinx-autodoc-typehints = "^1.7"
sphinx_material = "^0.0.35"
[tool.curlylint]
include = '\.html'
[tool.curlylint.rules]
aria_role = true
......@@ -52,6 +76,21 @@ meta_viewport = true
no_autofocus = true
tabindex_no_positive = true
[tool.ruff]
exclude = ["migrations", "tests"]
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "UP", "B", "SIM", "I", "DJ", "A", "S"]
ignore = ["UP034", "UP015", "B028"]
[tool.ruff.isort]
known-first-party = ["aleksis"]
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]
[tool.ruff.isort.sections]
django = ["django"]
[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tox]
skipsdist = True
skip_missing_interpreters = true
envlist = py37,py38,py39
envlist = py39,py310,py311
[testenv]
whitelist_externals = poetry
sudo
allowlist_externals =
poetry
yarnpkg
skip_install = true
envdir = {toxworkdir}/globalenv
commands_pre =
poetry install
poetry run aleksis-admin webpack_bundle
poetry install --all-extras
poetry run aleksis-admin vite build
poetry run aleksis-admin collectstatic --no-input
commands =
poetry run pytest --cov=. {posargs} aleksis/
......@@ -23,12 +23,16 @@ 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 ruff check {posargs} aleksis/
yarnpkg --cwd=.dev-js run prettier --ignore-path={toxinidir}/.prettierignore {posargs} --check ..
[testenv:security]
commands_pre =
poetry install --all-extras
commands =
poetry show --no-dev
poetry run safety check --full-report
......@@ -40,44 +44,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 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
[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 = aleksis.core.settings
[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