@@ -27,7 +27,7 @@ BRUTEFORCE :=$(shell echo '${BRUTEFORCE}'| tr '[:lower:]' '[:upper:]'| tr -d '[:
2727.EXPORT_ALL_VARIABLES : # (2)
2828
2929RUNTIME_TOOL =python3
30- PACKAGE_TOOL =pip3
30+ PACKAGE_TOOL =pipenv
3131
3232# DOCKER
3333BUILDKIT_PROGRESS =plain
@@ -36,11 +36,10 @@ DOCKER_COMPOSE=docker compose
3636help : list
3737 @echo " "
3838 @echo " Note: create and activate the environment in your local shell type (example):"
39- @echo " python3 -m venv ./.venv "
40- @echo " source .venv/bin/activate "
39+ @echo " pipenv install --dev "
40+ @echo " pipenv shell "
4141 @echo " See: "
42- @echo " https://docs.python.org/3/library/venv.html#creating-virtual-environments"
43- @echo " https://docs.python.org/3/library/venv.html#how-venvs-work"
42+ @echo " https://pipenv.pypa.io/en/latest/"
4443
4544list :
4645 @LC_ALL=C $(MAKE ) -pRrq -f $(lastword $(MAKEFILE_LIST ) ) : 2> /dev/null | awk -v RS= -F: ' /^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e ' ^[^[:alnum:]]' -e ' ^$@$$'
@@ -65,20 +64,20 @@ dependencies:
6564 @echo " ################################################################################"
6665 @echo " ## Dependencies: ###############################################################"
6766 @echo " ################################################################################"
68- ${PACKAGE_TOOL} install -r requirements.txt
67+ ${PACKAGE_TOOL} install --dev
6968 @echo " ################################################################################"
7069
7170outdated :
72- ${PACKAGE_TOOL} list --outdated
71+ ${PACKAGE_TOOL} update --outdated
7372
7473update :
75- ${PACKAGE_TOOL} freeze > requirements.txt
74+ ${PACKAGE_TOOL} lock --requirements > requirements.txt
7675
7776upgrade :
78- ${PACKAGE_TOOL} list --outdated | cut -f1 -d ' ' | tr " " " \n " | awk ' {if(NR>=3)print} ' | cut -d ' ' -f1 | xargs -n1 pip3 install -U
77+ ${PACKAGE_TOOL} update --dev
7978
8079clean :
81- ${PACKAGE_TOOL} freeze > unins ; ${PACKAGE_TOOL} uninstall -y -r unins ; rm unins
80+ ${PACKAGE_TOOL} -- rm || true
8281 rm -f .coverage
8382 rm -fr .pytest_cache
8483 rm -fr htmlcov
@@ -113,37 +112,37 @@ format/json:
113112 prettier --write ./src/** /* .json
114113
115114format/sources :
116- ${RUNTIME_TOOL} -m autopep8 --in-place --recursive --aggressive --aggressive --verbose src/
115+ ${PACKAGE_TOOL} run autopep8 --in-place --recursive --aggressive --aggressive --verbose src/
117116
118117format : format/sources format/json
119118
120119# # Static code analysis
121120test/static : dependencies
122- ${RUNTIME_TOOL} -m pylint --verbose --recursive yes src/
123- ${RUNTIME_TOOL} -m flake8 --verbose src/
124- ${RUNTIME_TOOL} -m pyright --verbose src/
121+ ${PACKAGE_TOOL} run pylint --verbose --recursive yes src/
122+ ${PACKAGE_TOOL} run flake8 --verbose src/
123+ ${PACKAGE_TOOL} run pyright --verbose src/
125124
126125test/styling : dependencies
127- ${RUNTIME_TOOL} -m pycodestyle --statistics src/
128- ${RUNTIME_TOOL} -m autopep8 --diff --recursive --exit-code --verbose .
126+ ${PACKAGE_TOOL} run pycodestyle --statistics src/
127+ ${PACKAGE_TOOL} run autopep8 --diff --recursive --exit-code --verbose .
129128
130129# # Unit tests and coverage
131130test : env dependencies
132- ${RUNTIME_TOOL} -m coverage run -m \
131+ ${PACKAGE_TOOL} run coverage run -m \
133132 pytest --verbose \
134133 -o log_cli=true \
135134 --log-cli-level=${LOG_LEVEL} \
136135 --full-trace src/
137- ${RUNTIME_TOOL} -m coverage report
136+ ${PACKAGE_TOOL} run coverage report
138137
139138coverage : test
140- ${RUNTIME_TOOL} -m coverage lcov -o coverage/lcov.info
139+ ${PACKAGE_TOOL} run coverage lcov -o coverage/lcov.info
141140
142141coverage/xml : test
143- ${RUNTIME_TOOL} -m coverage xml -o coverage/coverage.xml
142+ ${PACKAGE_TOOL} run coverage xml -o coverage/coverage.xml
144143
145144coverage/html : test
146- ${RUNTIME_TOOL} -m coverage html
145+ ${PACKAGE_TOOL} run coverage html
147146 open htmlcov/index.html
148147
149148# # Docker Compose commands
0 commit comments