-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (32 loc) · 1.73 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
# @file: Makefile
# @brief: etrobocon2022 カメラシステムのタスクランナー!?
# @author: Takahiro55555
# NOTE: foolproofのために、'make'単体のコマンドではプログラムを実行できないようにしておく
SHELL := powershell.exe
.SHELLFLAGS := -NoProfile -Command
all: style test
clean: coverage-clean
run-L:
poetry run python camera_system --is-left True --robot-ip $(ROBOT_IP)
run-R:
poetry run python camera_system --is-left False --robot-ip $(ROBOT_IP)
# NOTE: tox.ini ファイルの設定に従って、全てのソースコードの静的解析を実行する
style:
[Environment]::SetEnvironmentVariable('PYTHONUTF8',1); poetry run python -m pycodestyle camera_system/ tests/
[Environment]::SetEnvironmentVariable('PYTHONUTF8',1); poetry run python -m pydocstyle camera_system/ tests/
# NOTE: unittestを実行する
test:
poetry run python -m unittest
coverage:
poetry run python -m coverage run --source=camera_system/ -m unittest discover
poetry run python -m coverage report
# NOTE: htmlcovディレクトリが生成され、index.htmlをブラウザで開くことでカバレッジを視覚的に確認できる
coverage-html: coverage
poetry run python -m coverage html
# NOTE: 下記のコマンドは、2行に分けると何故かRemove-Itemコマンドが実行できずにエラーが発生した。
# poetry run python -m coverage erase; Remove-Item -Force -Recurse .\htmlcov
coverage-clean:
poetry run python -m coverage erase; Remove-Item -Force -Recurse htmlcov
# NOTE: tox.ini ファイルの設定に従って、全てのソースコードをフォーマットする
format:
[Environment]::SetEnvironmentVariable('PYTHONUTF8',1); poetry run python -m autopep8 -i -r camera_system/ tests/