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
This commit is contained in:
parent
ee84ba0b8f
commit
8d8c8bd89f
@ -78,3 +78,7 @@ tmp/
|
|||||||
# Remove build context
|
# Remove build context
|
||||||
**/.git
|
**/.git
|
||||||
**/tmp
|
**/tmp
|
||||||
|
**/.mypy_cache
|
||||||
|
**/dist
|
||||||
|
**/node_modules
|
||||||
|
**/__pycache__
|
||||||
|
8
Makefile
8
Makefile
@ -115,6 +115,14 @@ $(TEST_LIBS):
|
|||||||
$(MAKE) -C $(basename $@) test
|
$(MAKE) -C $(basename $@) test
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean $(CLEAN_LIBS)
|
||||||
|
CLEAN_LIBS := $(addsuffix .clean,$(LIB_PATHS))
|
||||||
|
clean: $(CLEAN_LIBS)
|
||||||
|
rm -rf .venv dist
|
||||||
|
$(CLEAN_LIBS):
|
||||||
|
$(MAKE) -C $(basename $@) clean
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
BUILD_ENGINE ?= docker
|
BUILD_ENGINE ?= docker
|
||||||
BUILD_CONTEXT ?= .
|
BUILD_CONTEXT ?= .
|
||||||
|
@ -42,10 +42,10 @@ fmt:
|
|||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
# poetry run mypy --no-incremental $$(git ls-files -- **/*.py)
|
# poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
|
||||||
poetry run isort --check-only --diff $$(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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
@ -53,6 +53,11 @@ test:
|
|||||||
echo TODO
|
echo TODO
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf .venv dist
|
||||||
|
|
||||||
|
|
||||||
.PHONY: db_revision
|
.PHONY: db_revision
|
||||||
HEAD_REV ?= $(shell poetry run alembic heads | awk '{print $$1}')
|
HEAD_REV ?= $(shell poetry run alembic heads | awk '{print $$1}')
|
||||||
NEW_REV ?= $(shell python3 -c 'import sys; print(f"{int(sys.argv[1])+1:03}")' $(HEAD_REV))
|
NEW_REV ?= $(shell python3 -c 'import sys; print(f"{int(sys.argv[1])+1:03}")' $(HEAD_REV))
|
||||||
|
@ -30,12 +30,17 @@ fmt:
|
|||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
poetry run mypy --no-incremental $$(git ls-files -- **/*.py)
|
poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
|
||||||
poetry run isort --check-only --diff $$(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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
echo TODO
|
echo TODO
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf .venv dist
|
||||||
|
@ -30,12 +30,17 @@ fmt:
|
|||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
poetry run mypy --no-incremental $$(git ls-files -- **/*.py)
|
poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
|
||||||
poetry run isort --check-only --diff $$(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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
echo TODO
|
echo TODO
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf .venv dist
|
||||||
|
@ -30,12 +30,17 @@ fmt:
|
|||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
poetry run mypy --no-incremental $$(git ls-files -- **/*.py)
|
poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
|
||||||
poetry run isort --check-only --diff $$(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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
echo TODO
|
echo TODO
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf .venv dist
|
||||||
|
@ -31,12 +31,17 @@ fmt:
|
|||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
poetry run mypy --no-incremental $$(git ls-files -- **/*.py)
|
poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
|
||||||
poetry run isort --check-only --diff $$(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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
echo TODO
|
echo TODO
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf .venv dist
|
||||||
|
Loading…
Reference in New Issue
Block a user