mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-17 13:51:54 -05:00
Added Makefile for easy dev setup
This patch adds a Makefile for helping setup a dev environment as well as running tox tests for those that aren't used to python development.
This commit is contained in:
parent
7b51c36f65
commit
d084360599
29
Makefile
Normal file
29
Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
.PHONY: virtual install build-requirements black isort flake8
|
||||
|
||||
virtual: .venv/bin/pip # Creates an isolated python 3 environment
|
||||
|
||||
.venv/bin/pip:
|
||||
virtualenv -p /usr/bin/python3 .venv
|
||||
|
||||
install:
|
||||
.venv/bin/pip install -Ur requirements.txt
|
||||
|
||||
dev: virtual
|
||||
.venv/bin/pip install -e .
|
||||
.venv/bin/pre-commit install
|
||||
|
||||
test: dev
|
||||
tox -p
|
||||
|
||||
update-requirements: install
|
||||
.venv/bin/pip freeze > requirements.txt
|
||||
|
||||
.venv/bin/tox: # install tox
|
||||
.venv/bin/pip install -U tox
|
||||
|
||||
check: .venv/bin/tox # Code format check with isort and black
|
||||
tox -efmt-check
|
||||
tox -epep8
|
||||
|
||||
fix: .venv/bin/tox # fixes code formatting with isort and black
|
||||
tox -efmt
|
Loading…
Reference in New Issue
Block a user