forked from zeno-ml/zeno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (49 loc) · 1.33 KB
/
Makefile
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
all: lint typecheck test
.PHONY: install
install:
@echo "==> 📦 Installing"
@cd frontend && npm i && npm run build
@poetry install
.PHONY: lint
lint:
@echo "==> 👕 Linting"
@poetry check
@poetry run black --check zeno/
@poetry run ruff check zeno/
@cd frontend && npm run lint
.PHONY: typecheck
typecheck:
@echo "==> ✅ Type checks"
@poetry run pyright zeno
@cd frontend && npm run check
.PHONY: test
test:
@echo "==> 🧪 Tests"
@poetry run pytest -svv zeno/tests/
.PHONY: build
build:
@echo "==> 👷♀️ Build"
@cd frontend && npm run build
@cd frontend && node build.js
@mv zeno/frontend/index.html zeno/frontend/index_og.html
@mv zeno/frontend/index_tmp.html zeno/frontend/index.html
@poetry build -v
@rm zeno/frontend/index.html
@mv zeno/frontend/index_og.html zeno/frontend/index.html
.PHONY: clean
clean:
@rm -rf dist
@rm -rf ./.zeno_cache
@rm -rf ./.ruff_cache
@find . -type d -name '__pycache__' -exec rm -rf {} +
@find . -type d -name '*pytest_cache*' -exec rm -rf {} +
@find . -type f -name "*.py[co]" -exec rm -rf {} +
@find . -type d -name '*.ipynb_checkpoints' -exec rm -r {} +
.PHONY: publish
publish:
@echo "==> 🚀 Publishing"
@git commit -am "chore: bump version to $(shell poetry version -s)"
@git tag "v$(shell poetry version -s)"
@make build
@poetry publish
@git push && git push --tags