-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (48 loc) · 1.21 KB
/
Makefile
File metadata and controls
60 lines (48 loc) · 1.21 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SHELL=/bin/bash -e
VERSION := $(shell grep '__version__ = ' cstruct/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
help:
@echo - make ruff ------- Format code and sort imports
@echo - make clean ------ Clean virtual environment
@echo - make coverage --- Run tests coverage
@echo - make docs ------- Make docs
@echo - make lint ------- Run lint
@echo - make test ------- Run test
@echo - make test-32bit - Run test on 32bit architecture
@echo - make typecheck -- Typecheck
@echo - make venv ------- Create virtual environment
.PHONY: codespell
codespell:
uv run codespell -w cstruct tests examples
.PHONY: ruff
ruff:
uv run ruff format cstruct tests examples
.PHONY: clean
clean:
-rm -rf build dist pyvenv.cfg *.egg-info .venv
.PHONY: coverage
coverage:
uv run pytest --cov --cov-report=term-missing
.PHONY: docs
docs:
uv run mkdocs build
uv run mkdocs gh-deploy
.PHONY: lint
lint:
uv run ruff check cstruct tests
.PHONY: test
test:
uv run pytest
.PHONY: test-32bit
test-32bit:
make -C docker/i386 test
.PHONY: typecheck
typecheck:
uv run mypy --strict --no-warn-unused-ignores cstruct
.PHONY: tag
tag:
git tag v${VERSION}
.PHONY: venv
venv:
uv venv
uv pip install -e .
uv pip install -e ".[dev]"