11# Variables
2- PYTHON := poetry run
3- POETRY := poetry
4- PRE_COMMIT := poetry run pre-commit
2+ PYTHON := uv run
3+ UV := uv
4+ PRE_COMMIT := uv run pre-commit
55PROJECT_NAME := archipy
66PYTHON_FILES := $(PROJECT_NAME ) features/steps scripts
77
@@ -23,28 +23,28 @@ help: ## Show this help message
2323.PHONY : setup
2424setup : # # Setup project pre-requisites
2525 @echo " ${BLUE} Setup project pre-requisites...${NC} "
26- @echo " ${GREEN} Installing poetry (may need your sudo password)...${NC} "
26+ @echo " ${GREEN} Installing uv (may need your sudo password)...${NC} "
2727 sudo apt install pipx
28- pipx install poetry
28+ pipx install uv
2929 pipx ensurepath
30- poetry completions bash >> ~ /.bash_completion
30+ uv generate-shell-completion bash >> ~ /.bash_completion
3131
3232.PHONY : install
3333install : # # Install project dependencies
3434 @echo " ${BLUE} Installing project dependencies...${NC} "
35- $(POETRY ) install
35+ $(UV ) sync --extra dev
3636 $(PRE_COMMIT ) install
3737
3838.PHONY : install-dev
39- install-dev : # # Install project dependencies
40- @echo " ${BLUE} Installing project dependencies...${NC} "
41- $(POETRY ) install --with dev --all-extras
39+ install-dev : # # Install project dependencies with dev extras
40+ @echo " ${BLUE} Installing project dependencies with dev extras ...${NC} "
41+ $(UV ) sync --all-extras
4242 $(PRE_COMMIT ) install
4343
4444.PHONY : update
4545update : # # Update dependencies to their latest versions
4646 @echo " ${BLUE} Updating dependencies...${NC} "
47- $(POETRY ) update
47+ $(UV ) lock --upgrade
4848
4949.PHONY : clean
5050clean : # # Remove build artifacts and cache directories
@@ -77,45 +77,48 @@ security: ## Run security scan with Bandit
7777.PHONY : behave
7878behave : # # Run tests with behave
7979 @echo " ${BLUE} Running tests...${NC} "
80- $(PYTHON ) behave
80+ $(UV ) run --extra behave behave
81+
82+ .PHONY : test
83+ test : behave # # Run tests (alias for behave)
8184
8285.PHONY : build
8386build : clean # # Build project distribution
8487 @echo " ${BLUE} Building project distribution...${NC} "
85- $(POETRY ) build
88+ $(UV ) build
8689
8790.PHONY : version
8891version : # # Display current version
8992 @echo " ${BLUE} Current version:${NC} "
90- @$(POETRY ) version
91- @echo " ${YELLOW} Current tag(Fetching...) :${NC} "
92- @git fetch && git describe --tags --abbrev=0
93+ @$(UV ) run python -c " import tomllib; print(f \" archipy {tomllib.load(open('pyproject.toml', 'rb'))['project'][' version']} \" ) "
94+ @echo " ${YELLOW} Current tag:${NC} "
95+ @git describe --tags --abbrev=0 2> /dev/null || echo " No tags found "
9396
9497.PHONY : bump-patch
9598bump-patch : # # Bump patch version
9699 @echo " ${BLUE} Bumping patch version...${NC} "
97100 @if [ -n " $( message) " ]; then \
98- $(PYTHON ) python scripts/bump_version.py patch -m " $( message) " ; \
101+ $(UV ) run python scripts/bump_version.py patch -m " $( message) " ; \
99102 else \
100- $(PYTHON ) python scripts/bump_version.py patch -m " $$ (git log -1 --pretty=%s)" ; \
103+ $(UV ) run python scripts/bump_version.py patch -m " $$ (git log -1 --pretty=%s)" ; \
101104 fi
102105
103106.PHONY : bump-minor
104107bump-minor : # # Bump minor version
105108 @echo " ${BLUE} Bumping minor version...${NC} "
106109 @if [ -n " $( message) " ]; then \
107- $(PYTHON ) python scripts/bump_version.py minor -m " $( message) " ; \
110+ $(UV ) run python scripts/bump_version.py minor -m " $( message) " ; \
108111 else \
109- $(PYTHON ) python scripts/bump_version.py minor -m " $$ (git log -1 --pretty=%s)" ; \
112+ $(UV ) run python scripts/bump_version.py minor -m " $$ (git log -1 --pretty=%s)" ; \
110113 fi
111114
112115.PHONY : bump-major
113116bump-major : # # Bump major version
114117 @echo " ${BLUE} Bumping major version...${NC} "
115118 @if [ -n " $( message) " ]; then \
116- $(PYTHON ) python scripts/bump_version.py major -m " $( message) " ; \
119+ $(UV ) run python scripts/bump_version.py major -m " $( message) " ; \
117120 else \
118- $(PYTHON ) python scripts/bump_version.py major -m " $$ (git log -1 --pretty=%s)" ; \
121+ $(UV ) run python scripts/bump_version.py major -m " $$ (git log -1 --pretty=%s)" ; \
119122 fi
120123
121124.PHONY : docker-build
@@ -134,7 +137,7 @@ pre-commit: ## Run pre-commit hooks
134137 $(PRE_COMMIT ) run --all-files
135138
136139.PHONY : check
137- check : lint security test # # Run all checks (linting, security, and tests)
140+ check : lint security behave # # Run all checks (linting, security, and tests)
138141
139142.PHONY : ci
140143ci : # # Run CI pipeline locally
@@ -143,22 +146,22 @@ ci: ## Run CI pipeline locally
143146 $(MAKE ) install
144147 $(MAKE ) lint
145148 $(MAKE ) security
146- $(MAKE ) test
149+ $(MAKE ) behave
147150 $(MAKE ) build
148151
149152.PHONY : docs-serve
150153docs-serve : # # Serve MkDocs documentation locally
151154 @echo " ${BLUE} Serving documentation...${NC} "
152- $(POETRY ) run mkdocs serve
155+ $(UV ) run --extra docs mkdocs serve
153156
154157.PHONY : docs-build
155158docs-build : # # Build MkDocs documentation
156159 @echo " ${BLUE} Building documentation...${NC} "
157- $(POETRY ) run mkdocs build
160+ $(UV ) run --extra docs mkdocs build
158161
159162.PHONY : docs-deploy
160163docs-deploy : # # Deploy MkDocs to GitHub Pages
161164 @echo " ${BLUE} Deploying documentation...${NC} "
162- $(POETRY ) run mkdocs gh-deploy --force
165+ $(UV ) run --extra docs mkdocs gh-deploy --force
163166
164167.DEFAULT_GOAL := help
0 commit comments