This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
99 lines (67 loc) · 1.8 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: build
MODULE:=mydevoirs
all: dev test
install:
python3.7 -m venv .venv
.venv/bin/pip install -U pip
.venv/bin/pip install -r requirements.txt
.venv/bin/briefcase dev
devtools:
.venv/bin/pip install -U ipython pdbpp autoflake toml markdown
dev: install devtools
test:
poetry run pytest
cov:
rm -rf .pytest_cache
poetry run coverage run -m pytest
poetry run coverage report
cov_html: cov
poetry run coverage html
firefox htmlcov/index.html &
pdb:
poetry run pytest --pdb
run:
poetry run python main.py
isort:
poetry run isort main.py
poetry run isort -rc mydevoirs
poetry run isort -rc tests
black:
poetry run black mydevoirs tests main.py
style: isort black
remove_unused_imports: isort
poetry run autoflake -r -i --remove-all-unused-imports mydevoirs tests
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-full: clean clean-venv
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name 'requirements*' -exec rm -f {} +
rm -rf docs/_build/
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -rf .pytest_cache/
clean-venv:
rm -rf .venv/
ipython:
.venv/bin/ipython
build:
poetry run python scripted/build_executable.py
run_binary: build
./dist/MyDevoirs
version_patch:
poetry run python scripted/bump_version.py patch
version_minor:
poetry run python scripted/bump_version.py minor
version_major:
poetry run python scripted/bump_version.py major