-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (26 loc) · 1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
VENV_DIR ?= .venv
VENV_RUN = . $(VENV_DIR)/bin/activate
VENV_ACTIVATE = $(VENV_DIR)/bin/activate
TEST_PATH ?= .
TEST_EXEC ?= python -m
PYTEST_LOGLEVEL ?= warning
install: ## omit dev dependencies
uv venv
uv sync --no-dev
install-dev: ## create the venv and install
uv venv
uv sync
clean: ## Clean up the virtual environment
rm -rf $(VENV_DIR)
rm -rf dist/
clean-generated: ## Cleanup generated code
rm -rf packages/localstack-sdk-generated/localstack/
generate: ## Generate the code from the OpenAPI specs
./bin/generate.sh
format:
($(VENV_RUN); python -m ruff format --exclude packages .; python -m ruff check --output-format=full --exclude packages --fix .)
lint:
($(VENV_RUN); python -m ruff check --exclude packages --output-format=full . && python -m ruff format --exclude packages --check .)
test: ## Run automated tests
($(VENV_RUN); $(TEST_EXEC) pytest --durations=10 --log-cli-level=$(PYTEST_LOGLEVEL) $(PYTEST_ARGS) $(TEST_PATH))
.PHONY: clean install install-dev