#!/usr/bin/make -f

.PHONY: help clean requirements test upgrade
help:  ## This.
	@perl -ne 'print if /^[a-zA-Z_-]+:.*## .*$$/' $(MAKEFILE_LIST) \
	| sort \
	| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

clean:  ## Remove all build artifacts
	find . -name '*.pyc'

test:  ## Run the library test suite
	tox

requirements: ## install development environment requirements
	uv sync --group dev

upgrade: ## update the uv.lock to use the latest releases satisfying our constraints
	uv run --with edx-lint edx_lint write_uv_constraints pyproject.toml
	uv lock --upgrade
