Skip to content

Commit

Permalink
Merge pull request #20 from jcollado/landscape-strictness-veryhigh
Browse files Browse the repository at this point in the history
Landscape strictness veryhigh
  • Loading branch information
jcollado committed Jan 29, 2017
2 parents 6e96025 + a4a3b1e commit a7de3d3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .landscape.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
doc-warnings: true
test-warnings: true
strictness: high
strictness: veryhigh
max-line-length: 80
requirements:
- requirements/common.txt
Expand Down
2 changes: 1 addition & 1 deletion rabbithole/batcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

"""Batcher: group messages in batches before sending them to the output
"""Batcher: group messages in batches before sending them to the output.
The strategy to batch messages is:
- store them in memory as they are received
Expand Down
4 changes: 2 additions & 2 deletions rabbithole/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

def main(argv=None):
# type: (List[str]) -> int
"""Console script for rabbithole
"""Console script for rabbithole.
:param argv: Command line arguments
:type argv: list(str)
Expand Down Expand Up @@ -71,7 +71,7 @@ def main(argv=None):

def create_block_instance(block):
# type: (Dict[str, Any]) -> object
"""Create block instance from its configuration
"""Create block instance from its configuration.
:param block: Block configuration
:type block: dict(str)
Expand Down
21 changes: 14 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Project global configuration."""

from setuptools import setup
from setuptools.command.test import test as TestCommand

with open('README.rst') as readme_file:
readme = readme_file.read()
README = readme_file.read()

with open('HISTORY.rst') as history_file:
history = history_file.read()
HISTORY = history_file.read()

requirements = [
REQUIREMENTS = [
'PyYAML',
'blinker',
'pika',
'sqlalchemy',
]

test_requirements = [
TEST_REQUIREMENTS = [
'coveralls',
'mock',
'pytest',
Expand All @@ -26,12 +28,17 @@


class PyTest(TestCommand):

"""Command to run test cases through pytest."""

def finalize_options(self):
"""Set custom argumengs fro pytest."""
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
"""Execute pytest with custom arguments."""
# import here, cause outside the eggs aren't loaded
import pytest
pytest.main(self.test_args)
Expand All @@ -40,7 +47,7 @@ def run_tests(self):
name='rabbithole',
version='0.2.0',
description="Store messages from an AMQP server into a SQL database",
long_description=readme + '\n\n' + history,
long_description=README + '\n\n' + HISTORY,
author="Javier Collado",
author_email='javier@gigaspaces.com',
url='https://github.com/jcollado/rabbithole',
Expand All @@ -55,7 +62,7 @@ def run_tests(self):
]
},
include_package_data=True,
install_requires=requirements,
install_requires=REQUIREMENTS,
license="MIT license",
zip_safe=False,
keywords='rabbithole',
Expand All @@ -70,6 +77,6 @@ def run_tests(self):
'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements,
tests_require=TEST_REQUIREMENTS,
cmdclass={'test': PyTest},
)
2 changes: 1 addition & 1 deletion tests/cli/test_create_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def fixture_kwargs(input_block, output_block):


def test_signals_connected(input_block, output_block, kwargs):
"""Signals are connected as expected."""
"""Signal objects are connected as expected."""
input_signal = input_block()
output_cb = output_block()

Expand Down

0 comments on commit a7de3d3

Please sign in to comment.