@@ -5,38 +5,38 @@ ACTIVEPYTHON = $(shell which python)
55# * UV
66.PHONY : setup
77setup :
8- curl -LsSf https://astral.sh/uv/install.sh | sh
8+ which uv > /dev/null || ( curl -LsSf https://astral.sh/uv/install.sh | sh)
99
1010.PHONY : publish
1111publish :
1212 uv publish --build
1313
1414# * Installation
1515.PHONY : install
16- install :
16+ install : setup
1717 uv export --format requirements-txt -o requirements.txt --no-dev
1818 uv pip install --python $(ACTIVEPYTHON ) -r requirements.txt
1919
2020.PHONY : install-dev
21- install-dev :
21+ install-dev : setup
2222 uv export --format requirements-txt -o requirements-dev.txt
2323 uv pip install --python $(ACTIVEPYTHON ) -r requirements-dev.txt
2424
2525.PHONY : pre-commit-install
26- pre-commit-install :
26+ pre-commit-install : setup
2727 uv run --python $(ACTIVEPYTHON ) pre-commit install
2828
2929# * Formatters
3030.PHONY : codestyle
31- codestyle :
31+ codestyle : setup
3232 uv run --python $(ACTIVEPYTHON ) ruff format --config=pyproject.toml stac_model tests
3333
3434.PHONY : format
3535format : codestyle
3636
3737# * Linting
3838.PHONY : test
39- test :
39+ test : setup
4040 uv run --python $(ACTIVEPYTHON ) pytest -c pyproject.toml --cov-report=html --cov=stac_model tests/
4141
4242.PHONY : check
@@ -46,19 +46,19 @@ check: check-examples check-markdown check-lint check-mypy check-safety check-ci
4646check-all : check
4747
4848.PHONY : mypy
49- mypy :
49+ mypy : setup
5050 uv run --python $(ACTIVEPYTHON ) mypy --config-file pyproject.toml ./
5151
5252.PHONY : check-mypy
5353check-mypy : mypy
5454
5555.PHONY : check-safety
56- check-safety :
56+ check-safety : setup
5757 uv run --python $(ACTIVEPYTHON ) safety check --full-report
5858 uv run --python $(ACTIVEPYTHON ) bandit -ll --recursive stac_model tests
5959
6060.PHONY : lint
61- lint :
61+ lint : setup
6262 uv run --python $(ACTIVEPYTHON ) ruff check --fix --config=pyproject.toml ./
6363
6464.PHONY : check-lint
@@ -96,7 +96,7 @@ $(addprefix fix-, $(FORMATTERS)): fix-%: format-%
9696lint-all : lint mypy check-safety check-markdown
9797
9898.PHONY : update-dev-deps
99- update-dev-deps :
99+ update-dev-deps : setup
100100 uv export --only-dev --format requirements-txt -o requirements-only-dev.txt
101101 uv pip install --python $(ACTIVEPYTHON ) -r requirements-only-dev.txt
102102
0 commit comments