diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f3497b3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.black] +line-length = 79 + diff --git a/requirements.txt b/requirements.txt index bbfd3e2..ddff33d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,20 @@ +black==23.3.0 click==8.1.3 +flake8==6.0.0 Flask==2.2.3 +Flask-HTTPAuth==4.7.0 itsdangerous==2.1.2 Jinja2==3.1.2 MarkupSafe==2.1.2 +mccabe==0.7.0 +mypy==1.2.0 +mypy-extensions==1.0.0 +packaging==23.0 +pathspec==0.11.1 +platformdirs==3.2.0 +pur==7.1.0 +pycodestyle==2.10.0 +pyflakes==3.0.1 +tomli==2.0.1 +typing_extensions==4.5.0 Werkzeug==2.2.3 diff --git a/script/qa b/script/qa new file mode 100755 index 0000000..51c0984 --- /dev/null +++ b/script/qa @@ -0,0 +1,22 @@ +#!/bin/bash +# Software Quality Assurance tests (formatters, linters, ...) + +if [ "$1" == "--dry-run" ]; then + BLACK_FLAGS="--check" +fi + +set -euo pipefail + +cd "$(dirname "$0")/.." + +FILES=( + main.py +) + +# Code formatting +python3 -m black ${BLACK_FLAGS:-} "${FILES[@]}" + +# Linters +python3 -m flake8 "${FILES[@]}" +python3 -m mypy "${FILES[@]}" +