forked from CTFd/CTFd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 1.44 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
lint:
ruff check --select E,F,W,B,C4,I --ignore E402,E501,E712,B904,B905,I001 --exclude=CTFd/uploads CTFd/ migrations/ tests/
isort --profile=black --check-only --skip=CTFd/uploads --skip-glob **/node_modules CTFd/ tests/
yarn --cwd CTFd/themes/admin lint
black --check --diff --exclude=CTFd/uploads --exclude=node_modules .
prettier --check 'CTFd/themes/**/assets/**/*'
prettier --check '**/*.md'
format:
isort --profile=black --skip=CTFd/uploads --skip-glob **/node_modules CTFd/ tests/
black --exclude=CTFd/uploads --exclude=node_modules .
prettier --write 'CTFd/themes/**/assets/**/*'
prettier --write '**/*.md'
test:
pytest -rf --cov=CTFd --cov-context=test --cov-report=xml \
--ignore-glob="**/node_modules/" \
--ignore=node_modules/ \
-W ignore::sqlalchemy.exc.SADeprecationWarning \
-W ignore::sqlalchemy.exc.SAWarning \
-n auto
bandit -r CTFd -x CTFd/uploads --skip B105,B322
pipdeptree
yarn --cwd CTFd/themes/admin verify
coverage:
coverage html --show-contexts
serve:
python serve.py
shell:
python manage.py shell
translations-init:
# make translations-init lang=af
pybabel init -i messages.pot -d CTFd/translations -l $(lang)
translations-extract:
pybabel extract -F babel.cfg -k lazy_gettext -k _l -o messages.pot .
translations-update:
pybabel update --ignore-obsolete -i messages.pot -d CTFd/translations
translations-compile:
pybabel compile -f -d CTFd/translations
translations-lint:
dennis-cmd lint CTFd/translations