-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (30 loc) · 927 Bytes
/
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
PROJECT_NAME=tinytorch
PROJECT_DIRS=tinytorch tests
venv: clean
python3 -m venv .venv
poetry run pip install --upgrade pip
poetry install
echo "To activate, use 'source ./.venv/bin/activate'"
echo "To deactivate, use 'deactivate'"
clean: clean_py
rm -rf .venv
rm -rf .has-*
clean_py:
rm -rf ".mypy_cache"
find . -name "*.pyc" -delete
find . -name "__pycache__" -delete
rm -rf .cache .eggs ${PROJECT_NAME}.egg-info dist build
test: test_unit test_format test_style
test_unit:
poetry run pytest --cov-report term-missing --cov=${PROJECT_NAME}
test_format:
poetry run black --check ${PROJECT_DIRS}
poetry run isort --check-only ${PROJECT_DIRS}
test_style:
poetry run flake8 ${PROJECT_DIRS}
# poetry run darglint ${PROJECT_DIRS}
poetry run pylint ${PROJECT_DIRS}
poetry run mypy --follow-imports=silent --package ${PROJECT_NAME}
format:
poetry run black ${PROJECT_DIRS}
poetry run isort ${PROJECT_DIRS}