-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (32 loc) · 1.02 KB
/
Makefile
File metadata and controls
45 lines (32 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
38
39
40
41
42
43
44
45
.EXPORT_ALL_VARIABLES:
.PHONY: help
UV = uv
SRC = EMpy tests examples scripts
# Self-documenting Makefile
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help: ## Print this help
@grep -E '^[a-zA-Z][a-zA-Z0-9_-]*:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
develop: ## Install all dependencies
$(UV) sync
upgrade: ## Upgrade dependencies
$(UV) lock --upgrade
$(UV) sync
test: ## Run tests
$(UV) run pytest
black: ## Run formatter
$(UV) run black ${SRC}
lint: flake8 pyflakes mypy ## Run linters
flake8: ## Run flake8 linter
$(UV) run flake8 ${SRC}
pyflakes: ## Run pyflake linter
$(UV) run pyflakes ${SRC}
mypy: ## Run mypy linter
$(UV) run mypy ${SRC}
clean-repo:
git diff --quiet HEAD # no pending commits
git diff --cached --quiet HEAD # no unstaged changes
git pull --ff-only # latest code
release: clean-repo ## Make a release (specify: PART=[major|minor|patch])
bump2version ${PART}
git push
git push --tags