Skip to content

Commit a8cf7ca

Browse files
committed
don't run setup on every command in makefile
1 parent 277b1d7 commit a8cf7ca

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

Makefile

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,38 @@ ACTIVEPYTHON = $(shell which python)
55
#* UV
66
.PHONY: setup
77
setup:
8-
@if command -v uv &> /dev/null; then \
9-
echo "uv is already installed"; \
10-
else \
11-
echo "uv not found, installing..."; \
12-
curl -LsSf https://astral.sh/uv/install.sh | sh; \
13-
fi
8+
curl -LsSf https://astral.sh/uv/install.sh | sh
149

1510
.PHONY: publish
1611
publish:
1712
uv publish --build
1813

1914
#* Installation
2015
.PHONY: install
21-
install: setup
16+
install:
2217
uv export --format requirements-txt -o requirements.txt --no-dev
2318
uv pip install --python $(ACTIVEPYTHON) -r requirements.txt
2419

2520
.PHONY: install-dev
26-
install-dev: setup
21+
install-dev:
2722
uv export --format requirements-txt -o requirements-dev.txt
2823
uv pip install --python $(ACTIVEPYTHON) -r requirements-dev.txt
2924

3025
.PHONY: pre-commit-install
31-
pre-commit-install: setup
26+
pre-commit-install:
3227
uv run --python $(ACTIVEPYTHON) pre-commit install
3328

3429
#* Formatters
3530
.PHONY: codestyle
36-
codestyle: setup
31+
codestyle:
3732
uv run --python $(ACTIVEPYTHON) ruff format --config=pyproject.toml stac_model tests
3833

3934
.PHONY: format
4035
format: codestyle
4136

4237
#* Linting
4338
.PHONY: test
44-
test: setup
39+
test:
4540
uv run --python $(ACTIVEPYTHON) pytest -c pyproject.toml --cov-report=html --cov=stac_model tests/
4641

4742
.PHONY: check
@@ -51,27 +46,27 @@ check: check-examples check-markdown check-lint check-mypy check-safety check-ci
5146
check-all: check
5247

5348
.PHONY: mypy
54-
mypy: setup
49+
mypy:
5550
uv run --python $(ACTIVEPYTHON) mypy --config-file pyproject.toml ./
5651

5752
.PHONY: check-mypy
5853
check-mypy: mypy
5954

6055
.PHONY: check-safety
61-
check-safety: setup
56+
check-safety:
6257
uv run --python $(ACTIVEPYTHON) safety check --full-report
6358
uv run --python $(ACTIVEPYTHON) bandit -ll --recursive stac_model tests
6459

6560
.PHONY: lint
66-
lint: setup
61+
lint:
6762
uv run --python $(ACTIVEPYTHON) ruff check --fix --config=pyproject.toml ./
6863

6964
.PHONY: check-lint
7065
check-lint: lint
7166
uv run --python $(ACTIVEPYTHON) ruff check --config=pyproject.toml ./
7267

7368
.PHONY: format-lint
74-
format-lint: setup lint
69+
format-lint: lint
7570
ruff format --config=pyproject.toml ./
7671

7772
.PHONY: install-npm
@@ -101,7 +96,7 @@ $(addprefix fix-, $(FORMATTERS)): fix-%: format-%
10196
lint-all: lint mypy check-safety check-markdown
10297

10398
.PHONY: update-dev-deps
104-
update-dev-deps: setup
99+
update-dev-deps:
105100
uv export --only-dev --format requirements-txt -o requirements-only-dev.txt
106101
uv pip install --python $(ACTIVEPYTHON) -r requirements-only-dev.txt
107102

tests/test_schema.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ def test_mlm_no_undefined_prefixed_field(
4444
with pytest.raises(pystac.errors.STACValidationError) as exc:
4545
mlm_item = pystac.Item.from_dict(mlm_data)
4646
pystac.validation.validate(mlm_item, validator=mlm_validator)
47-
assert all(
48-
field in str(exc.value.source)
49-
for field in ["mlm:unknown", "^(?!mlm:)"]
50-
)
47+
assert all(field in str(exc.value.source) for field in ["mlm:unknown", "^(?!mlm:)"])
5148

5249

5350
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)