skyline-apiserver/libs/skyline-nginx/Makefile
Gao Hanxiang 8d8c8bd89f chore: Add make clean to clean up project directory
1. Add make clean
2. Specify configuration file used by mypy
3. Add some directories to dockerignore

Change-Id: I4f6b0d5ba894214bb0fcff21443f9808f56d595e
2021-07-26 14:35:55 +00:00

47 lines
880 B
Makefile

PYTHON ?= python3
.PHONY: all
all: install fmt lint test package
.PHONY: venv
venv:
poetry env use $(PYTHON)
.PHONY: install
install: venv
poetry run pip install -U pip setuptools
poetry install -vvv
.PHONY: package
package:
poetry build -f wheel
.PHONY: fmt
fmt:
poetry run isort $$(git ls-files -- **/*.py)
poetry run black --config ../../pyproject.toml $$(git ls-files -- **/*.py)
poetry run add-trailing-comma --py36-plus --exit-zero-even-if-changed $$(git ls-files -- **/*.py)
.PHONY: lint
lint:
poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
poetry run isort --check-only --diff $$(git ls-files -- **/*.py)
poetry run black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
poetry run flake8 $$(git ls-files -- **/*.py)
.PHONY: test
test:
echo TODO
.PHONY: clean
clean:
rm -rf .venv dist