https://github.com/statycc/pymwp
Raw File
Tip revision: 47b05d5139a07338f1051e9922f4220af3739a77 authored by Neea Rusch on 11 June 2021, 01:06:57 UTC
Merge pull request #35 from seiller/pypi-alpha2
Tip revision: 47b05d5
Makefile
SHELL := /bin/bash

help:
	@echo "clean - remove all build, test, coverage and Python artifacts"
	@echo "clean-build - remove build artifacts"
	@echo "clean-pyc - remove Python file artifacts"
	@echo "pre-commit - run unit tests and linter"
	@echo "test - run unit tests only"
	@echo "lint - check code style only"

clean: clean-build clean-pyc

clean-build:
	rm -fr output/
	rm -fr .pytest_cache/
	rm -fr .eggs/
	find . -name '*.egg-info' -exec rm -fr {} +
	find . -name '*.egg' -exec rm -f {} +
	rm -fr .coverage

clean-pyc:
	find . -name '*.pyc' -exec rm -f {} +
	find . -name '*.pyo' -exec rm -f {} +
	find . -name '*~' -exec rm -f {} +
	find . -name '__pycache__' -exec rm -fr {} +

pre-commit: dev-env lint-only test-only

test: dev-env test-only

lint: dev-env lint-only

dev-env:
	test -d venv || python3 -m venv venv;
	source venv/bin/activate;
	pip3 install -q -r requirements-dev.txt

test-only:
	@echo "\nrunning unit tests...\n"
	pytest --cov=./pymwp tests

lint-only:
	@echo "\nchecking code style...\n"
	flake8 ./pymwp --count --show-source --statistics

back to top