-
-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (66 loc) · 1.85 KB
/
Makefile
File metadata and controls
87 lines (66 loc) · 1.85 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
ifneq ($(CURDIR),$(patsubst %/,%,$(ROOT_DIR)))
$(error Must run make from the project root: $(ROOT_DIR))
endif
.PHONY: init dev up down test test-core comply-fix commit docs clean superclean dist dist-upload docker docker-push
init:
devbox install
devbox run pdm install
dev:
docker compose up -d
docker compose exec cement pdm install
docker compose exec cement-py39 pdm install
docker compose exec cement-py310 pdm install
docker compose exec cement-py311 pdm install
docker compose exec cement-py312 pdm install
docker compose exec cement-py313 pdm install
docker compose exec cement /bin/bash
up:
process-compose up
down:
process-compose down
test: comply
pdm run pytest --cov=cement tests
test-core: comply
pdm run pytest --cov=cement.core tests/core
virtualenv:
pdm venv create
pdm install
@echo
@echo "VirtualENV Setup Complete. Now run: eval $(pdm venv activate)"
@echo
comply: comply-ruff comply-mypy
comply-ruff:
pdm run ruff check cement/ tests/
comply-ruff-fix:
pdm run ruff check --fix cement/ tests/
comply-mypy:
pdm run mypy
commit:
pdm run cz commit
docs:
cd docs; pdm run sphinx-build ./source ./build; cd ..
@echo
@echo DOC: "file://"$$(echo `pwd`/docs/build/html/index.html)
@echo
clean:
find . -name '*.py[co]' -delete
find . -name '__pycache__' -type d -delete
rm -rf docs/build
rm -rf coverage-report .coverage*
rm -rf .pytest_cache
rm -rf *.egg-info dist
rm -rf dump.rdb
superclean: clean
rm -rf .devbox/ .venv/
rm -rf .mypy_cache .ruff_cache .pdm-build
rm -rf tmp/*
@echo "Must run 'direnv allow' and 'make init' again"
dist:
pdm build
docker:
docker build -t datafolklabs/cement:latest .
docker-push:
docker push datafolklabs/cement:latest
remove-merged-branches:
git branch --merged | grep -v -e 'main\|stable/*\|dev/*' | xargs git branch -d