From aac72ed3a34c8e55f0d8923ef1b78e75dbb9aede Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Wed, 2 Nov 2016 23:55:14 +0200 Subject: [PATCH] Clean up and final fixes --- .coveragerc | 3 ++- Makefile | 10 +++++----- setup.py | 3 +-- tox.ini | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.coveragerc b/.coveragerc index 3c6ac723..46a0a2ee 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,7 @@ [run] +source = src/dependency_injector +omit = tests/unit plugins = Cython.Coverage -include = dependency_injector/* [html] directory=reports/unittests/ diff --git a/Makefile b/Makefile index 8fe71f05..61eb028c 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,13 @@ build: clean cythonize # Compile C extensions python setup.py build_ext --inplace -install: clean cythonize - python setup.py install +install: uninstall clean cythonize + pip install . -v uninstall: - pip uninstall -y -q dependency-injector 2> /dev/null -test: +test: build # Unit tests with coverage report coverage erase coverage run --rcfile=./.coveragerc -m unittest2 discover tests/unit @@ -50,10 +50,10 @@ test: check: # Static analysis - flake8 --max-complexity=10 dependency_injector/ + flake8 --max-complexity=10 src/dependency_injector/ flake8 --max-complexity=10 examples/ # Code style analysis - pydocstyle dependency_injector/ + pydocstyle src/dependency_injector/ pydocstyle examples/ publish: cythonize diff --git a/setup.py b/setup.py index e7dad33c..56c753ea 100644 --- a/setup.py +++ b/setup.py @@ -41,8 +41,7 @@ setup(name='dependency-injector', 'dependency_injector.providers', ], package_dir={ - 'dependency_injector': 'src/dependency_injector', - 'dependency_injector.providers': 'src/dependency_injector/providers', + '': 'src', }, ext_modules=[ Extension('dependency_injector.injections', diff --git a/tox.ini b/tox.ini index 4d14e0f4..b52fc2e7 100644 --- a/tox.ini +++ b/tox.ini @@ -25,18 +25,18 @@ commands= deps= pylint commands= - - pylint -f colorized --rcfile=./.pylintrc dependency_injector + - pylint -f colorized --rcfile=./.pylintrc src/dependency_injector [testenv:flake8] deps= flake8 commands= - flake8 --max-complexity=10 dependency_injector/ + flake8 --max-complexity=10 src/dependency_injector/ flake8 --max-complexity=10 examples/ [testenv:pydocstyle] deps= pydocstyle commands= - pydocstyle dependency_injector/ + pydocstyle src/dependency_injector/ pydocstyle examples/