libretime/api/Makefile

27 lines
641 B
Makefile
Raw Permalink Normal View History

all: lint
include ../tools/python.mk
PIP_INSTALL := \
--editable ../shared \
2023-02-26 23:24:29 +01:00
--editable .[dev,sentry]
2022-06-28 21:01:57 +02:00
PYLINT_ARG := libretime_api
MYPY_ARG := libretime_api
BANDIT_ARG := --exclude '*/tests/*' libretime_api || true
export DJANGO_SETTINGS_MODULE=libretime_api.settings.testing
2021-09-13 14:43:18 +02:00
format: .format
2022-02-14 17:53:18 +01:00
lint: .format-check .pylint .mypy .bandit
2022-12-07 11:42:16 +01:00
test: .pytest
test-coverage: .coverage
clean: .clean
SCHEMA_FILE ?= schema.yml
schema: $(VENV)
$(VENV)/bin/libretime-api spectacular --file $(SCHEMA_FILE)
if command -v npx > /dev/null; then npx prettier --write $(SCHEMA_FILE); fi
schema-foreach-commit:
git rebase main -x "$(MAKE) -C api schema"