diff options
author | Mike Crute <mcrute@gmail.com> | 2017-05-25 19:19:43 -0700 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2017-05-25 19:21:03 -0700 |
commit | 709a25482a0e9a6b4d66561d5ea48253a230d01c (patch) | |
tree | bd4eefe144f9c327ea03df7bb4c3c4b4f0440def | |
parent | 62d6832e40ff62c656c5a76589a6da9b010ba8b6 (diff) | |
download | pydora-709a25482a0e9a6b4d66561d5ea48253a230d01c.tar.bz2 pydora-709a25482a0e9a6b4d66561d5ea48253a230d01c.tar.xz pydora-709a25482a0e9a6b4d66561d5ea48253a230d01c.zip |
Remove py_release_tools, use flake8
-rw-r--r-- | pandora/__init__.py | 4 | ||||
-rw-r--r-- | pandora/errors.py | 2 | ||||
-rw-r--r-- | pandora/py2compat.py | 4 | ||||
-rw-r--r-- | setup.cfg | 6 | ||||
-rwxr-xr-x | setup.py | 36 |
5 files changed, 42 insertions, 10 deletions
diff --git a/pandora/__init__.py b/pandora/__init__.py index 0de5cfe..bd2fe63 100644 --- a/pandora/__init__.py +++ b/pandora/__init__.py | |||
@@ -9,5 +9,5 @@ API Spec from: http://6xq.net/playground/pandora-apidoc/ | |||
9 | Keys at: http://6xq.net/playground/pandora-apidoc/json/partners/#partners | 9 | Keys at: http://6xq.net/playground/pandora-apidoc/json/partners/#partners |
10 | """ | 10 | """ |
11 | 11 | ||
12 | from .client import BaseAPIClient, APIClient | 12 | from .client import BaseAPIClient, APIClient # noqa: F401 |
13 | from .transport import APITransport, Encryptor, DEFAULT_API_HOST | 13 | from .transport import APITransport, Encryptor, DEFAULT_API_HOST # noqa: F401 |
diff --git a/pandora/errors.py b/pandora/errors.py index d28a60f..b09e813 100644 --- a/pandora/errors.py +++ b/pandora/errors.py | |||
@@ -97,7 +97,7 @@ class PandoraException(Exception): | |||
97 | PandoraException.export_exceptions(locals()) | 97 | PandoraException.export_exceptions(locals()) |
98 | 98 | ||
99 | 99 | ||
100 | class InvalidUserLogin(InvalidPartnerLogin): | 100 | class InvalidUserLogin(InvalidPartnerLogin): # noqa: F821 |
101 | """Pydora Internal Login Error | 101 | """Pydora Internal Login Error |
102 | 102 | ||
103 | This is thrown around a user login to disambiguate a login that is invalid | 103 | This is thrown around a user login to disambiguate a login that is invalid |
diff --git a/pandora/py2compat.py b/pandora/py2compat.py index 844ea59..d83f8c5 100644 --- a/pandora/py2compat.py +++ b/pandora/py2compat.py | |||
@@ -20,9 +20,9 @@ except ImportError: | |||
20 | 20 | ||
21 | # Only used in tests | 21 | # Only used in tests |
22 | try: | 22 | try: |
23 | from unittest.mock import Mock, MagicMock, call, patch | 23 | from unittest.mock import Mock, MagicMock, call, patch # noqa: F401 |
24 | except ImportError: | 24 | except ImportError: |
25 | try: | 25 | try: |
26 | from mock import Mock, MagicMock, call, patch | 26 | from mock import Mock, MagicMock, call, patch # noqa: F401 |
27 | except ImportError: | 27 | except ImportError: |
28 | pass | 28 | pass |
@@ -5,7 +5,5 @@ universal = 1 | |||
5 | universal = 1 | 5 | universal = 1 |
6 | 6 | ||
7 | [aliases] | 7 | [aliases] |
8 | validate = cover_tests pep8 | 8 | release = test flake8 |
9 | release = validate increment_semver git_push sdist bdist_wheel upload | 9 | validate = release |
10 | release_major = validate increment_semver -M git_push sdist bdist_wheel upload | ||
11 | release_minor = validate increment_semver -m git_push sdist bdist_wheel upload | ||
@@ -1,7 +1,34 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | 2 | ||
3 | from setuptools.command.test import test | ||
3 | from setuptools import setup, find_packages | 4 | from setuptools import setup, find_packages |
4 | 5 | ||
6 | |||
7 | class TestsWithCoverage(test): | ||
8 | |||
9 | description = "run unit tests with coverage" | ||
10 | |||
11 | def run(self): | ||
12 | # Must install test_requires before importing coverage | ||
13 | self.install_dists(self.distribution) | ||
14 | |||
15 | from coverage import coverage | ||
16 | |||
17 | cov = coverage(data_file=".coverage", branch=True, | ||
18 | source=self.distribution.packages) | ||
19 | cov.start() | ||
20 | |||
21 | # Unittest calls exit prior to python 3. How naughty | ||
22 | try: | ||
23 | super(TestsWithCoverage, self).run() | ||
24 | except SystemExit: | ||
25 | pass | ||
26 | |||
27 | cov.stop() | ||
28 | cov.xml_report(outfile="coverage.xml") | ||
29 | cov.html_report() | ||
30 | |||
31 | |||
5 | setup( | 32 | setup( |
6 | name="pydora", | 33 | name="pydora", |
7 | version="1.8.0", | 34 | version="1.8.0", |
@@ -12,9 +39,16 @@ setup( | |||
12 | url="https://github.com/mcrute/pydora", | 39 | url="https://github.com/mcrute/pydora", |
13 | test_suite="tests.discover_suite", | 40 | test_suite="tests.discover_suite", |
14 | packages=find_packages(exclude=["tests", "tests.*"]), | 41 | packages=find_packages(exclude=["tests", "tests.*"]), |
42 | cmdclass={ | ||
43 | "test": TestsWithCoverage, | ||
44 | }, | ||
15 | setup_requires=[ | 45 | setup_requires=[ |
16 | "py_release_tools", | ||
17 | "wheel", | 46 | "wheel", |
47 | "flake8>=3.3", | ||
48 | ], | ||
49 | tests_require=[ | ||
50 | "mock>=1.0", | ||
51 | "coverage>=4.0", | ||
18 | ], | 52 | ], |
19 | install_requires=[ | 53 | install_requires=[ |
20 | "pycrypto>=2.6.1", | 54 | "pycrypto>=2.6.1", |