소스 검색

Fix flake8 issues; add make all

Basti Tee 5 년 전
부모
커밋
3f6fe953a3
2개의 변경된 파일17개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 1
      acme/__init__.py
  2. 17 4
      make

+ 0 - 1
acme/__init__.py

@@ -6,7 +6,6 @@
 :license: Apache 2.0, see LICENSE for more details.
 """
 
-from .api import *
 from logging import getLogger, NullHandler
 
 # Set default logging handler to avoid "No handler found" warnings.

+ 17 - 4
make

@@ -3,6 +3,7 @@ cd "$( cd "$( dirname "$0" )"; pwd )"
 
 PROJECT_NAME="acme"
 export PIPENV_VERBOSITY=-1  # suppress warning if pipenv is starting inside venv
+export PYTHONPATH=.
 
 function init {
 	pip3 install pipenv --upgrade
@@ -10,7 +11,7 @@ function init {
 }
 
 function run {
-	FLASK_APP=$PROJECT_NAME FLASK_DEBUG=1 pipenv run flask run
+	FLASK_APP=$PROJECT_NAME.api FLASK_DEBUG=1 pipenv run flask run
 }
 
 function shell {
@@ -30,10 +31,22 @@ function coverage {
     pipenv run py.test -c .coveragerc --verbose tests
 }
 
-function publish {
+function build {
     pipenv run python setup.py sdist bdist_wheel
-	# publish somewhere...
-	rm -fr build dist .egg $PROJECT_NAME.egg-info
+}
+
+function clean {
+	rm -fr build dist .egg $PROJECT_NAME.egg-info .pytest_cache
+}
+
+function all {
+    clean
+    init
+    test
+    lint
+    coverage
+    build
+    clean
 }
 
 # -----------------------------------------------------------------------------