File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ _GID ?= 10001
6
6
7
7
VENV := $(shell echo $${VIRTUAL_ENV-.venv})
8
8
INSTALL_STAMP = $(VENV ) /.install.stamp
9
- DOTENV_FILE = ".env"
10
- POETRY_VIRTUALENVS_IN_PROJECT = true
9
+ DOTENV_FILE = .env
11
10
12
11
.PHONY : help
13
12
help :
16
15
@echo " JBI make rules:"
17
16
@echo " "
18
17
@echo " Local"
18
+ @echo " clean - clean local cache folders"
19
19
@echo " format - run formatters (black, isort), fix in place"
20
20
@echo " lint - run linters"
21
21
@echo " start - run the API service locally"
@@ -28,10 +28,16 @@ help:
28
28
@echo " "
29
29
@echo " help - see this text"
30
30
31
+ .PHONY : clean
32
+ clean :
33
+ find . -name " __pycache__" | xargs rm -rf
34
+ rm -rf .mypy_cache .pytest_cache .coverage .venv
35
+
36
+
31
37
install : $(INSTALL_STAMP )
32
38
$(INSTALL_STAMP ) : poetry.lock
33
39
@if [ -z $( shell command -v poetry 2> /dev/null) ]; then echo " Poetry could not be found. See https://python-poetry.org/docs/" ; exit 2; fi
34
- poetry install --no-root
40
+ POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root
35
41
touch $(INSTALL_STAMP )
36
42
37
43
.PHONY : build
@@ -53,7 +59,7 @@ start: $(INSTALL_STAMP) $(DOTENV_FILE)
53
59
poetry run python -m src.app.api
54
60
55
61
$(DOTENV_FILE ) :
56
- cp -n .env.example $(DOTENV_FILE )
62
+ cp .env.example $(DOTENV_FILE )
57
63
58
64
.PHONY : docker-shell
59
65
docker-shell : $(DOTENV_FILE )
You can’t perform that action at this time.
0 commit comments