@@ -2,6 +2,13 @@ include ./scripts/common.Makefile
22
33PYTHON_DIR := $(CLIENTS_DIR ) /python
44
5+
6+ .vscode/% .json : .vscode/% .template.json
7+ $(if $(wildcard $@ ) , \
8+ @echo " WARNING ##### $< is newer than $@ ####" ; diff -uN $@ $< ; false ; ,\
9+ @echo " WARNING ##### $@ does not exist, cloning $< as $@ ############" ; cp $< $@ )
10+
11+
512.PHONY : info
613info : # # general information
714 # system
@@ -13,30 +20,32 @@ info: ## general information
1320 @which python
1421 @pip list
1522 # API
16- @echo ' title : ' $(shell bash $(SCRIPTS_DIR ) /jq.bash -r .info.title $(REPO_ROOT ) /api/openapi.json)
17- @echo ' version : ' $(shell bash $(SCRIPTS_DIR ) /jq.bash -r .info.version $(REPO_ROOT ) /api/openapi.json)
23+ @echo ' title : $(shell bash $(SCRIPTS_DIR)/jq.bash -r .info.title $(REPO_ROOT)/api/openapi.json)'
24+ @echo ' version : $(shell bash $(SCRIPTS_DIR)/jq.bash -r .info.version $(REPO_ROOT)/api/openapi.json)'
1825 # nox
1926 @echo nox --list-session
2027
2128
22- .venv :
23- @python3 --version
24- python3 -m venv $@
29+ .venv : .check-uv-installed
30+ @uv venv $@
2531 # # upgrading tools to latest version in $(shell python3 --version)
26- $@ /bin/pip3 --quiet install --upgrade \
27- pip \
32+ @uv pip --quiet install --upgrade \
33+ pip~=24.0 \
2834 wheel \
29- setuptools
30- @$@ /bin/pip3 list --verbose
35+ setuptools \
36+ uv
37+ @uv pip list
38+
3139
3240.PHONY : devenv
33- devenv : .venv # # create a python virtual environment with dev tools (e.g. linters, etc)
34- $< /bin/pip3 --quiet install -r requirements.txt
41+ devenv : .venv .vscode/settings.json .vscode/launch.json # # create a python virtual environment with dev tools (e.g. linters, etc)
42+ @uv pip --quiet install -r requirements.txt
3543 # Installing pre-commit hooks in current .git repo
3644 @$< /bin/pre-commit install
3745 @echo " To activate the venv, execute 'source .venv/bin/activate'"
3846
3947
48+
4049# # VERSION -------------------------------------------------------------------------------
4150
4251.PHONY : version-patch version-minor version-major
@@ -53,6 +62,7 @@ define _bumpversion
5362endef
5463
5564# # DOCUMENTATION ------------------------------------------------------------------------
65+
5666.PHONY : http-doc docs
5767docs : # # generate docs
5868 # generate documentation
@@ -69,21 +79,3 @@ http-doc: docs ## generates and serves doc
6979 # starting doc website
7080 @echo " Check site on http://127.0.0.1:50001/"
7181 python3 -m http.server 50001 --bind 127.0.0.1
72-
73- # # CLEAN -------------------------------------------------------------------------------
74-
75- .PHONY : clean-hooks
76- clean-hooks : # # Uninstalls git pre-commit hooks
77- @-pre-commit uninstall 2> /dev/null || rm .git/hooks/pre-commit
78-
79- _git_clean_args := -dx --force --exclude=.vscode --exclude=TODO.md --exclude=.venv --exclude=.python-version --exclude="*keep*"
80-
81- .check-clean :
82- @git clean -n $(_git_clean_args )
83- @echo -n " Are you sure? [y/N] " && read ans && [ $$ {ans:-N} = y ]
84- @echo -n " $( shell whoami) , are you REALLY sure? [y/N] " && read ans && [ $$ {ans:-N} = y ]
85-
86-
87- clean : .check-clean # # cleans all unversioned files in project and temp files create by this makefile
88- # Cleaning unversioned
89- @git clean $(_git_clean_args )
0 commit comments