-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·48 lines (40 loc) · 971 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
39
40
41
42
43
44
45
46
47
48
.DEFAULT_GOAL := test
#
# Virtual environment setup
# You may want to replace python3 with the path to your python3 executable,
# e.g. the output of `pyenv which python3`when using pyenv
#
create-venv:
python3 -m venv '.venv'
echo "Don't forget to activate with 'source .venv/bin/activate'"
#
# Install requirements
#
install:
python3 -m pip install --upgrade pip
python3 -m pip install flit poetry
python3 -m flit install --deps production
install-dev: install
python3 -m pip install '.[dev]'
python3 -m certifi
pre-commit install --hook-type pre-commit --hook-type pre-push
echo "Please also install pandoc to create the documentation."
#
# Checks & package upload
#
check: install-dev
isort pytximport
black --check pytximport
flake8 pytximport
bandit -ll --recursive pytximport
upload: check
flit publish
#
# Testing
#
unittest:
coverage run -m pytest --maxfail=10
coverage-report: unittest
coverage report
coverage html
test: check unittest