Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pre-commit 4.2.0
python 3.12.10
poetry 2.2.1
uv 0.11.28
terraform 1.15.8
trivy 0.71.2
tflint 0.63.1
29 changes: 16 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL:=$(shell which bash) -o pipefail -O globstar
.SHELLFLAGS = -ec
.PHONY: build dist
.DEFAULT_GOAL := list
# this is just to try and supress errors caused by poetry run
# this is just to try and supress errors caused by uv run
export PYTHONWARNINGS=ignore:::setuptools.command.install
make := make --no-print-directory

Expand Down Expand Up @@ -31,11 +31,14 @@ ifneq (,$(wildcard ./.env))
export
endif

install:
poetry install --sync
.venv/:
uv venv --python="$$(python --version | cut -d ' ' -f2)"

install: .venv/
uv sync

install-ci:
poetry install --without local --sync
uv sync --no-group local

local-terraform:
$(make) -C terraform/stacks/local
Expand All @@ -50,18 +53,18 @@ clean:
touch .env

pytest: .env
poetry run pytest
uv run pytest

test: pytest

reports/:
mkdir -p reports

coverage: .env
poetry run pytest --cov --color=yes -v --cov-report=term-missing:skip-covered
uv run pytest --cov --color=yes -v --cov-report=term-missing:skip-covered

coverage-ci: clean .env reports/
poetry run pytest --cov --color=yes -v --junit-xml=./reports/junit/results.xml --cov-report=term-missing:skip-covered --cov-report xml | tee reports/pytest-coverage.txt
uv run pytest --cov --color=yes -v --junit-xml=./reports/junit/results.xml --cov-report=term-missing:skip-covered --cov-report xml | tee reports/pytest-coverage.txt

tf-lint:
tflint --config "$(pwd)/.tflint.hcl"
Expand All @@ -76,25 +79,25 @@ tf-trivy:
#trivy conf --exit-code 1 ./ --skip-dirs "**/.terraform" --skip-dirs ".venv"

mypy:
poetry run mypy .
uv run mypy .

shellcheck:
@docker run --rm -i -v ${PWD}:/mnt:ro koalaman/shellcheck -f gcc -e SC1090,SC1091 `find . \( -path "*/.venv/*" -prune -o -path "*/build/*" -prune -o -path "*/dist/*" -prune -o -path "*/.tox/*" -prune \) -o -type f -name '*.sh' -print`

ruff: black
poetry run ruff check . --fix --show-fixes
uv run ruff check . --fix --show-fixes

ruff-check:
poetry run ruff check .
uv run ruff check .

ruff-ci:
poetry run ruff check . --output-format=github
uv run ruff check . --output-format=github

black:
poetry run black .
uv run black .

black-check:
poetry run black . --check
uv run black . --check

lint: ruff mypy shellcheck

Expand Down
Loading
Loading