-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (56 loc) · 1.59 KB
/
Makefile
File metadata and controls
69 lines (56 loc) · 1.59 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
61
62
63
64
65
66
67
68
69
.DEFAULT_GOAL := help
PYTHON := python3
POETRY := poetry
.PHONY: help
help:
@echo "Available targets:"
@echo " install Install all dependencies (with async extras + dev)"
@echo " install-prod Install runtime dependencies only"
@echo " test Run pytest"
@echo " test-cov Run pytest with coverage report"
@echo " lint Run ruff + mypy"
@echo " format Run black + isort"
@echo " format-check Check formatting without modifying"
@echo " typecheck Run mypy"
@echo " clean Remove caches and build artifacts"
@echo " build Build distribution packages"
@echo " publish Publish to PyPI (requires credentials)"
.PHONY: install
install:
$(POETRY) install --all-extras --with dev
.PHONY: install-prod
install-prod:
$(POETRY) install --only main
.PHONY: test
test:
$(POETRY) run pytest
.PHONY: test-cov
test-cov:
$(POETRY) run pytest --cov=hip4 --cov-report=term-missing --cov-report=html
.PHONY: lint
lint:
$(POETRY) run ruff check hip4 tests
$(POETRY) run mypy hip4
.PHONY: format
format:
$(POETRY) run isort hip4 tests
$(POETRY) run black hip4 tests
.PHONY: format-check
format-check:
$(POETRY) run isort --check-only hip4 tests
$(POETRY) run black --check hip4 tests
.PHONY: typecheck
typecheck:
$(POETRY) run mypy hip4
.PHONY: clean
clean:
rm -rf build/ dist/ *.egg-info
rm -rf .pytest_cache/ .mypy_cache/ .ruff_cache/ htmlcov/ .coverage
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
.PHONY: build
build:
$(POETRY) build
.PHONY: publish
publish: build
$(POETRY) publish