hookmeup

A Git hook to automate your Pipenv and Django workflow
git clone git://git.danielmoch.com/hookmeup.git
Log | Files | Refs | README | LICENSE

commit a32cd40b66f5936db1b675cf963bbeec0568d403
parent 532a588327fa523f7156ba6ac59f77a963b8f1d2
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Thu, 30 Aug 2018 08:08:03 -0400

Add __main__.py for calling from python -m

Diffstat:
A.coveragerc | 3+++
Rtests/pylintrc -> .pylintrc | 0
MMakefile | 4++--
Ahookmeup/__main__.py | 6++++++
Dtests/coveragerc | 2--
5 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/.coveragerc b/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = True +omit = hookmeup/__main__.py diff --git a/tests/pylintrc b/.pylintrc diff --git a/Makefile b/Makefile @@ -53,7 +53,7 @@ clean-test: ## remove test and coverage artifacts rm -fr .tox lint: ## check style with pylint - pipenv run pylint --rcfile tests/pylintrc hookmeup tests --disable=parse-error + pipenv run pylint hookmeup tests --disable=parse-error test: ## run tests quickly with the default Python pipenv run python -m pytest @@ -65,7 +65,7 @@ test-install: ## install dependenices from Pipfile (for tox / CI builds) pipenv --bare install --dev --skip-lock coverage: ## check code coverage quickly with the default Python - pipenv run python -m pytest --cov=hookmeup --cov-config tests/coveragerc + pipenv run python -m pytest --cov=hookmeup pipenv run coverage report -m coverage-html: coverage ## generate an HTML report and open in browser diff --git a/hookmeup/__main__.py b/hookmeup/__main__.py @@ -0,0 +1,6 @@ +# -*- encoding: utf-8 -*- +"""hookmeup main module""" +import hookmeup + +if __name__ == '__main__': + hookmeup.main() diff --git a/tests/coveragerc b/tests/coveragerc @@ -1,2 +0,0 @@ -[run] -branch = True