-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 1.02 KB
/
Makefile
File metadata and controls
37 lines (28 loc) · 1.02 KB
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
36
37
# Basic development functions for pylibftdi.
# Example:
# make container && make lint && make test && make build
.PHONY: all
all: container test lint build
.PHONY: container
container:
docker build -t pylibftdi-dev:latest .
.PHONY: build
build:
docker run --rm -t -v $$PWD:/app -w /app pylibftdi-dev:latest uv build
.PHONY: test
test:
docker run --rm -t -v $$PWD:/app -w /app pylibftdi-dev:latest uv run pytest
.PHONY: lint
lint:
docker run --rm -t -v $$PWD:/app -w /app pylibftdi-dev:latest bash -c 'uv run ruff format --check . && uv run ruff check src tests && uv run mypy src'
.PHONY: format
format:
docker run --rm -t -v $$PWD:/app -w /app pylibftdi-dev:latest bash -c 'uv run ruff format . && uv run ruff check --fix src tests'
.PHONY: shell
shell:
# Drop into a shell where e.g. `uv run python -m pylibftdi.examples.list_devices` etc can be run
docker run --rm -it -v $$PWD:/app -w /app pylibftdi-dev:latest bash
.PHONY: clean
clean:
# Ideally this would remove all relevant dev containers too...
rm -rf dist/ .venv/