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
|
||||
**/.git
|
||||
**/tmp
|
||||
**/.mypy_cache
|
||||
**/dist
|
||||
**/node_modules
|
||||
**/__pycache__
|
||||
|
8
Makefile
8
Makefile
@ -115,6 +115,14 @@ $(TEST_LIBS):
|
||||
$(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
|
||||
BUILD_ENGINE ?= docker
|
||||
BUILD_CONTEXT ?= .
|
||||
|
@ -42,7 +42,7 @@ fmt:
|
||||
|
||||
.PHONY: 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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||
@ -53,6 +53,11 @@ test:
|
||||
echo TODO
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf .venv dist
|
||||
|
||||
|
||||
.PHONY: db_revision
|
||||
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))
|
||||
|
@ -30,7 +30,7 @@ fmt:
|
||||
|
||||
.PHONY: 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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||
@ -39,3 +39,8 @@ lint:
|
||||
.PHONY: test
|
||||
test:
|
||||
echo TODO
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf .venv dist
|
||||
|
@ -30,7 +30,7 @@ fmt:
|
||||
|
||||
.PHONY: 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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||
@ -39,3 +39,8 @@ lint:
|
||||
.PHONY: test
|
||||
test:
|
||||
echo TODO
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf .venv dist
|
||||
|
@ -30,7 +30,7 @@ fmt:
|
||||
|
||||
.PHONY: 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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||
@ -39,3 +39,8 @@ lint:
|
||||
.PHONY: test
|
||||
test:
|
||||
echo TODO
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf .venv dist
|
||||
|
@ -31,7 +31,7 @@ fmt:
|
||||
|
||||
.PHONY: 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 black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
|
||||
poetry run flake8 $$(git ls-files -- **/*.py)
|
||||
@ -40,3 +40,8 @@ lint:
|
||||
.PHONY: test
|
||||
test:
|
||||
echo TODO
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf .venv dist
|
||||
|
Loading…
Reference in New Issue
Block a user