skyline-apiserver/libs/skyline-log/Makefile
zhu.boxiang 28429a0ac5 refactor: Remove -f of poetry build command
1. Remove -f of poetry build command. Merge two commands
as 'poetry build'.
2. Update submodule for skyline-console

Change-Id: I91a04439c3a605a0159890a4603684a785d7a90c
2021-09-29 14:10:13 +08:00

48 lines
876 B
Makefile

PYTHON ?= python3
PY_FILES := $(shell git ls-files -- *.py | xargs)
.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'<58.0.0'
poetry install -vvv
.PHONY: package
package:
poetry build
.PHONY: fmt
fmt:
poetry run isort $(PY_FILES)
poetry run black --config ../../pyproject.toml $(PY_FILES)
poetry run add-trailing-comma --py36-plus --exit-zero-even-if-changed $(PY_FILES)
.PHONY: lint
lint:
poetry run mypy --strict --config-file=../../mypy.ini $(PY_FILES)
poetry run isort --check-only --diff $(PY_FILES)
poetry run black --check --diff --color --config ../../pyproject.toml $(PY_FILES)
poetry run flake8 --config ../../.flake8 $(PY_FILES)
.PHONY: test
test:
poetry run pytest
.PHONY: clean
clean:
rm -rf .venv dist htmlcov .coverage