11SHELL: =/bin/bash
22
33PROJECT := cloudsplaining
4- PROJECT_UNDERSCORE := cloudsplaining
54
6- virtualenv :
7- python3 -m venv ./venv && source venv/bin/activate
8-
9- setup-env : virtualenv
10- python3 -m pip install -r requirements.txt
11-
12- setup-dev : setup-env
13- python3 -m pip install -r requirements-dev.txt
5+ setup-env :
6+ uv sync --frozen
147
158# Create the documentation files and open them locally
16- build-docs : clean virtualenv
9+ build-docs : clean
1710 mkdocs build
1811
1912# Serve the docs locally as you edit them
20- serve-docs : clean virtualenv
13+ serve-docs : clean
2114 mkdocs serve --dev-addr " 127.0.0.1:8001"
2215
2316# Build the cloudsplaining package from the current directory contents for use with PyPi
2417build : setup-env clean
25- python3 -m pip install --upgrade setuptools wheel
26- python3 -m setup -q sdist bdist_wheel
18+ uv build
2719
2820# Install the package locally
2921install : build
30- python3 -m pip install -q ./dist/${PROJECT} * .tar.gz
22+ uv pip install -q ./dist/${PROJECT} * .tar.gz
3123 ${PROJECT} --help
3224
3325# Uninstall the package
34- uninstall : virtualenv
35- python3 -m pip uninstall ${PROJECT} -y
36- python3 -m pip uninstall -r requirements.txt -y
37- python3 -m pip uninstall -r requirements-dev.txt -y
38- python3 -m pip freeze | xargs python3 -m pip uninstall -y
26+ uninstall :
27+ uv pip uninstall ${PROJECT} -y
3928
4029# Clean the directory of extra python files
4130clean :
@@ -49,18 +38,17 @@ clean:
4938 find . -name ' *.pyo' -exec rm --force {} +
5039
5140# Run unit tests
52- test : setup-dev
53- python3 -m coverage run -m pytest -v
54- python3 -m coverage report -m
41+ test : setup-env
42+ coverage run -m pytest -v
43+ coverage report -m
5544
56- type-check : setup-dev
45+ type-check : setup-env
5746 mypy
5847
5948# Publish to PyPi
6049publish : build
61- python3 -m pip install --upgrade twine
62- python3 -m twine upload dist/*
63- python3 -m pip install ${PROJECT}
50+ uv publish
51+ uv pip install ${PROJECT}
6452
6553# count lines of code
6654count-loc :
@@ -70,8 +58,8 @@ count-loc:
7058
7159# Generate the example report
7260generate-report :
73- python3 ./utils/generate_example_iam_data.py
74- python3 ./utils/generate_example_report.py
61+ python ./utils/generate_example_iam_data.py
62+ python ./utils/generate_example_report.py
7563# ---------------------------------------------------------------------------------------------------------------------
7664# JavaScript
7765# ---------------------------------------------------------------------------------------------------------------------
@@ -89,7 +77,7 @@ install-js-production: clean-js
8977
9078# Generate the updated Javascript bundle
9179build-js : setup-env install-js-production
92- python3 ./utils/generate_example_iam_data.py
80+ python ./utils/generate_example_iam_data.py
9381 npm run build
9482
9583# Run Javascript unit tests
@@ -104,8 +92,8 @@ serve-js: install-js-production
10492
10593# Update Homebrew file. Does not commit to Git
10694update-homebrew-file : uninstall
107- python3 -m pip install homebrew-pypi-poet
108- python3 -m pip install cloudsplaining -U
95+ uv pip install homebrew-pypi-poet
96+ uv pip install cloudsplaining -U
10997 git fetch origin
11098 latest_tag := $(git describe --tags `git rev-list --tags --max-count=1` )
11199 echo " latest tag: $latest_tag "
0 commit comments