-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
99 lines (72 loc) · 1.79 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
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
88
89
90
91
92
93
94
95
96
97
98
99
.PHONY: install test lint format clean run docs check
# poetryがインストールされていることを確認
POETRY := $(shell command -v poetry 2> /dev/null)
install:
ifndef POETRY
@echo "Poetry is not installed. Please install it first."
@exit 1
endif
poetry install
test:
poetry run pytest
lint:
poetry run ruff check src/palkia
lint-fix:
poetry run ruff check src --fix
format-check:
poetry run ruff format --check src/palkia
format-fix:
poetry run ruff format src/palkia
pyright:
poetry run pyright src/palkia
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
rm -rf .pytest_cache
rm -rf .mypy_cache
run:
cd examples && \
poetry run python main.py
run2:
cd examples && \
poetry run python main2.py
run_floor5:
cd examples && \
poetry run python main_floor5.py
run_ble:
cd examples && \
poetry run python main_ble.py
run_pressure:
cd examples && \
poetry run python main_pressure.py
run_correct:
cd examples && \
poetry run python main_correct.py
make generate-project-summary:
poetry run python generate_project_summary.py
release:
poetry version patch
git add pyproject.toml dist
poetry build
git commit -m "Bump up version"
git push origin main
poetry publish
docs:
poetry run pdoc --html --output-dir docs src
ci: lint format-check pyright
# 開発環境のセットアップ
setup: install
git config core.hooksPath .githooks
# 新しい機能ブランチの作成
feature:
@read -p "Enter feature name: " name; \
git checkout -b feature/$$name
# デプロイ(例:Herokuにデプロイする場合)
deploy:
git push heroku main
# データベースのマイグレーション
migrate:
poetry run python src/manage.py migrate
# 開発サーバーの起動
serve:
poetry run python src/manage.py runserver