@@ -35,7 +35,7 @@ FILES = input output
3535help :
3636 @echo " $( BOLD_BLUE) -----------------------------MAKE GUIDE----------------------------$( RESET_STYLES) "
3737 @echo " $( BOLD_CYAN) make setup$( RESET_STYLES) : Setup pyflask-service"
38- @echo " $( BOLD_CYAN) make format$( RESET_STYLES) : Format and fix python code pyflask-service"
38+ @echo " $( BOLD_CYAN) make format$( RESET_STYLES) : Format and fix python code in pyflask-service"
3939 @echo " $( BOLD_CYAN) make lint$( RESET_STYLES) : Lint pyflask-service"
4040 @echo " $( BOLD_CYAN) make test$( RESET_STYLES) : Test pyflask-service"
4141 @echo " $( BOLD_CYAN) make debug$( RESET_STYLES) : Debug pyflask-service"
@@ -46,46 +46,49 @@ help:
4646
4747
4848setup : # : Use pip-tools, pip-compile, pip install
49- @echo " $( BOLD_CYAN) Setting up pyflask base$( RESET_STYLES) "
49+ @echo " \n $( BOLD_CYAN) Setting up pyflask base$( RESET_STYLES) "
5050 # Check for venv, conda else exit
51- @echo " $( BOLD_CYAN) Installing pip-tools . . .$( RESET_STYLES) "
51+ @echo " \n $( BOLD_CYAN) Installing pip-tools . . .$( RESET_STYLES) "
5252 pip install pip-tools
53- @echo " $( BOLD_CYAN) Generating requirements$( RESET_STYLES) "
53+ @echo " \n $( BOLD_CYAN) Generating requirements$( RESET_STYLES) "
5454 pip-compile -q --build-isolation --output-file=requirements/requirements.txt requirements/requirements.in
55- @echo " $( BOLD_CYAN) Generating dev requirements$( RESET_STYLES) "
55+ @echo " \n $( BOLD_CYAN) Generating dev requirements$( RESET_STYLES) "
5656 pip-compile -q --build-isolation --output-file=requirements/dev-requirements.txt requirements/dev-requirements.in
57- @echo " $( BOLD_CYAN) Syncing requirements$( RESET_STYLES) "
57+ @echo " \n $( BOLD_CYAN) Syncing requirements$( RESET_STYLES) "
5858 pip-sync -q requirements/requirements.txt requirements/dev-requirements.txt
59- @echo " $( BOLD_CYAN) Installing requirements$( RESET_STYLES) "
59+ @echo " \n $( BOLD_CYAN) Installing requirements$( RESET_STYLES) "
6060 pip install -r requirements/requirements.txt
61- @echo " $( BOLD_CYAN) Installing dev requirements$( RESET_STYLES) "
61+ @echo " \n $( BOLD_CYAN) Installing dev requirements$( RESET_STYLES) "
6262 pip install -r requirements/dev-requirements.txt
63- @echo " $( BOLD_CYAN) Adding pre-commit hooks$( RESET_STYLES) "
63+ @echo " \n $( BOLD_CYAN) Adding pre-commit hooks$( RESET_STYLES) "
6464 pre-commit install
6565
6666
6767format : # : Format and fix python code with black, isort, autoflake
68- @echo " $( BOLD_CYAN) Blackifying $( RESET_STYLES) 🍳"
68+ @echo " \n $( BOLD_CYAN) Blackifying$( RESET_STYLES) 🍳"
6969 black --version
7070 black $(APP_DIR ) $(TEST_DIR ) $(HOME_DIR_PY_FILES )
71- @echo " $( BOLD_CYAN) ISorting 〽️ $( RESET_STYLES) ️ "
71+ @echo " \n $( BOLD_CYAN) ISorting$( RESET_STYLES) 〽️️ "
7272 isort --recursive $(APP_DIR ) $(TEST_DIR ) $(HOME_DIR_PY_FILES )
73- @echo " $( BOLD_CYAN) Flaking️❄️ $( RESET_STYLES) "
73+ @echo " \n $( BOLD_CYAN) Flaking $( RESET_STYLES) ❄️ "
7474 flake8 --version
7575 autoflake --remove-all-unused-imports --remove-unused-variables --remove-duplicate-keys --ignore-init-module-imports -i -r $(APP_DIR ) $(TEST_DIR ) $(HOME_DIR_PY_FILES )
7676
7777
78- lint : # : Run static analysis with flake8, mypy and bandit
79- @echo " $( BOLD_CYAN) Flake linting ❄️ $( RESET_STYLES) "
78+ lint : # : Run static analysis with flake8, radon, mypy and bandit
79+ @echo " \n $( BOLD_CYAN) Linting with flake8 $( RESET_STYLES) ❄️ "
8080 flake8 --version
8181 flake8 $(APP_DIR ) $(TEST_DIR ) $(HOME_DIR_PY_FILES )
82- @echo " $( BOLD_CYAN) Static typing️️$( RESET_STYLES) ⌨️"
82+ @echo " \n$( BOLD_CYAN) Checking cyclomatic complexity with radon$( RESET_STYLES) 💫️"
83+ radon --version
84+ radon cc $(APP_DIR ) $(TEST_DIR ) $(HOME_DIR_PY_FILES ) --total-average -nc
85+ @echo " \n$( BOLD_CYAN) Static typing with mypy$( RESET_STYLES) ⌨️"
8386 mypy --version
8487 mypy $(APP_DIR ) $(HOME_DIR_PY_FILES )
85- @echo " $( BOLD_CYAN) Securing with bandit️🕵️️ $( RESET_STYLES) "
88+ @echo " \n $( BOLD_CYAN) Securing with bandit $( RESET_STYLES) 🕵️️ "
8689 bandit --version
8790 bandit -l -i -r . --format=custom
88- @echo " $( BOLD_CYAN) Running pre-commit hooks 🏁️️️ $( RESET_STYLES) "
91+ @echo " \n $( BOLD_CYAN) Running pre-commit hooks$( RESET_STYLES) 🏁️️️ "
8992 pre-commit run --all-files
90- @echo " $( BOLD_CYAN) All checks passed 🏳️️️️ $( RESET_STYLES) "
93+ @echo " \n $( BOLD_CYAN) All checks passed$( RESET_STYLES) 🏳️️️️ "
9194
0 commit comments