@@ -5,28 +5,40 @@ help: # Preview Makefile commands
55 @awk ' BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \
66/^[-_[ :alpha:]]+:.?* # / { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)
77
8- # ######################
9- # Dependency commands
10- # ######################
8+ # ensure OS binaries aren't called if naming conflict with Make recipes
9+ .PHONY : help venv install update test coveralls lint black mypy ruff safety lint-apply black-apply ruff-apply
1110
12- install : # Install Python dependencies
13- pipenv install --dev
14- pipenv run pre-commit install
11+ # #############################################
12+ # Python Environment and Dependency commands
13+ # #############################################
1514
16- update : install # Update Python dependencies
17- pipenv clean
18- pipenv update --dev
15+ install : .venv .git/hooks/pre-commit # Install Python dependencies and create virtual environment if not exists
16+ uv sync --dev
17+
18+ .venv : # Creates virtual environment if not found
19+ @echo " Creating virtual environment at .venv..."
20+ uv venv .venv
21+
22+ .git/hooks/pre-commit : # Sets up pre-commit hook if not setup
23+ @echo " Installing pre-commit hooks..."
24+ uv run pre-commit install
25+
26+ venv : .venv # Create the Python virtual environment
27+
28+ update : # Update Python dependencies
29+ uv lock --upgrade
30+ uv sync --dev
1931
2032# #####################
2133# Unit test commands
2234# #####################
2335
2436test : # Run tests and print a coverage report
25- pipenv run coverage run --source=my_app -m pytest -vv
26- pipenv run coverage report -m
37+ uv run coverage run --source=my_app -m pytest -vv
38+ uv run coverage report -m
2739
2840coveralls : test # Write coverage data to an LCOV report
29- pipenv run coverage lcov -o ./coverage/lcov.info
41+ uv run coverage lcov -o ./coverage/lcov.info
3042
3143# ###################################
3244# Code quality and safety commands
@@ -35,23 +47,27 @@ coveralls: test # Write coverage data to an LCOV report
3547lint : black mypy ruff safety # Run linters
3648
3749black : # Run 'black' linter and print a preview of suggested changes
38- pipenv run black --check --diff .
50+ uv run black --check --diff .
3951
4052mypy : # Run 'mypy' linter
41- pipenv run mypy .
53+ uv run mypy .
4254
4355ruff : # Run 'ruff' linter and print a preview of errors
44- pipenv run ruff check .
56+ uv run ruff check .
4557
46- safety : # Check for security vulnerabilities and verify Pipfile.lock is up-to-date
47- pipenv run pip-audit
48- pipenv verify
58+ safety : # Check for security vulnerabilities
59+ uv run pip-audit
4960
50- lint-apply : # Apply changes with 'black' and resolve 'fixable errors' with 'ruff'
51- black-apply ruff-apply
61+ lint-apply : black-apply ruff-apply # Apply changes with 'black' and resolve 'fixable errors' with 'ruff'
5262
5363black-apply : # Apply changes with 'black'
54- pipenv run black .
64+ uv run black .
5565
5666ruff-apply : # Resolve 'fixable errors' with 'ruff'
57- pipenv run ruff check --fix .
67+ uv run ruff check --fix .
68+
69+ # #############################
70+ # CLI convenience commands
71+ # #############################
72+ my-app : # CLI without any arguments, utilizing uv script entrypoint
73+ uv run my-app
0 commit comments