diff --git a/Makefile b/Makefile index 679b2e0..a975caf 100644 --- a/Makefile +++ b/Makefile @@ -12,5 +12,8 @@ examples: reqs docs: echo "NYI" -test: +test: lint py.test + +lint: + flake8 . diff --git a/dev-requirements.txt b/dev-requirements.txt index 8534d76..53c5306 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,4 +2,5 @@ -e . +flake8==3.5.0 pytest==3.6.4 diff --git a/ethics_checklist/ethics_checklist.py b/ethics_checklist/ethics_checklist.py index 872c3dc..132f2d3 100644 --- a/ethics_checklist/ethics_checklist.py +++ b/ethics_checklist/ethics_checklist.py @@ -4,7 +4,7 @@ import xerox -from .parser import Checklist, Section +from .parser import Checklist from .formats import FORMATS, EXTENSIONS DEFAULT_CHECKLIST = Path(__file__).parent.parent / 'checklist.yml' @@ -14,7 +14,8 @@ @click.command() @click.option('--checklist', default=None, type=click.Path(exists=True), help='Override checklist file.') -@click.option('--format', default=None, type=str, help='Output format. Default is "markdown". File extesion used if --output is passed.') +@click.option('--format', default=None, type=str, help='Output format. Default is "markdown". \ + File extesion used if --output is passed.') @click.option('--output', default=None, type=click.Path(), help='Output file path.') @click.option('--clipboard', is_flag=True, default=False, help='Whether or not to output to clipboard.') @click.option('--overwrite', is_flag=True, default=False, help='Overwrite output file if it exists. Default is False.') diff --git a/setup.py b/setup.py index 8c41dd7..c89d63f 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import setuptools from setuptools import setup setup( @@ -9,16 +10,16 @@ author="DrivenData", author_email="info@drivendata.org", - description = 'Data Science Ethics Checklist', + description='Data Science Ethics Checklist', long_description=open('README.md').read(), - license = 'MIT', + license='MIT', packages=setuptools.find_packages(), install_requires=[], - entry_points = { - 'console_scripts':[ + entry_points={ + 'console_scripts': [ 'ethics-checklist=ethics_checklist.ethics_checklist:main', ] }, diff --git a/tests/test_formats.py b/tests/test_formats.py index b541017..6c11b08 100644 --- a/tests/test_formats.py +++ b/tests/test_formats.py @@ -71,8 +71,8 @@ def test_jupyter(checklist, tmpdir): known_good = ({'cell_type': 'markdown', 'metadata': {}, 'source': ['# My Checklist\n', - '\n', - '## Section 1\n', + '\n', + '## Section 1\n', '------\n', ' - [ ] first\n', ' - [ ] second\n', diff --git a/tests/test_parser.py b/tests/test_parser.py index b2968bf..ccee6db 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1,4 +1,4 @@ -from ethics_checklist.parser import Checklist, Section +from ethics_checklist.parser import Checklist def test_checklist(): diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..791f075 --- /dev/null +++ b/tox.ini @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 119