diff --git a/.travis.yml b/.travis.yml index 406795e..f8a8c7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,9 @@ matrix: env: TEST_TYPE=test - python: 3.6 env: TEST_TYPE=test - + - python: 3.7 + env: TEST_TYPE=test + sudo: false install: - if [[ $TEST_TYPE == 'check' ]]; then pip install -r requirements-dev.txt; fi diff --git a/Makefile b/Makefile index 0b0052a..2d394d6 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,13 @@ # py.test --cov awsshell --cov-report term-missing --cov-fail-under 95 tests/ # which will fail if tests are under 95% +prepare: + ###### FLAKE8 ##### + # Install all requirements for testing and debugging + pip install -U -r requirements-dev.txt + pip install -U -r requirements-test.txt + python scripts/ci/install + check: ###### FLAKE8 ##### # No unused imports, no undefined vars, @@ -34,6 +41,9 @@ check: test: python scripts/ci/run-tests +integration: + python scripts/ci/run-integ-tests + pylint: ###### PYLINT ###### # Python linter. This will generally not have clean output. diff --git a/awsshell/shellcomplete.py b/awsshell/shellcomplete.py index b50f70b..d227ff1 100644 --- a/awsshell/shellcomplete.py +++ b/awsshell/shellcomplete.py @@ -110,8 +110,8 @@ def get_completions(self, document, complete_event): completions = self._completer.autocomplete(text_before_cursor) prompt_completions = list(self._convert_to_prompt_completions( completions, text_before_cursor)) - if (not prompt_completions and self._completer.last_option and - len(self._completer.cmd_path) == 3): + if (not prompt_completions and self._completer.last_option + and len(self._completer.cmd_path) == 3): # If we couldn't complete anything from the JSON model # completer and we're on a cli option (e.g --foo), we # can ask the server side completer if it knows anything diff --git a/awsshell/ui.py b/awsshell/ui.py index 71a6383..7882235 100644 --- a/awsshell/ui.py +++ b/awsshell/ui.py @@ -54,8 +54,8 @@ def create_default_layout(app, message='', replacing the prompt. """ assert isinstance(message, text_type) - assert (get_bottom_toolbar_tokens is None or - callable(get_bottom_toolbar_tokens)) + assert (get_bottom_toolbar_tokens is None + or callable(get_bottom_toolbar_tokens)) assert get_prompt_tokens is None or callable(get_prompt_tokens) assert not (message and get_prompt_tokens) @@ -166,13 +166,13 @@ def separator(): content=CompletionsMenu( max_height=16, scroll_offset=1, - extra_filter=(HasFocus(DEFAULT_BUFFER) & - ~display_completions_in_columns))), + extra_filter=(HasFocus(DEFAULT_BUFFER) + & ~display_completions_in_columns))), # noqa E501 Float(xcursor=True, ycursor=True, content=MultiColumnCompletionsMenu( - extra_filter=(HasFocus(DEFAULT_BUFFER) & - display_completions_in_columns), + extra_filter=(HasFocus(DEFAULT_BUFFER) + & display_completions_in_columns), show_meta=Always())) ] ), diff --git a/requirements-dev.txt b/requirements-dev.txt index 556c8b3..cceeabd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -doc8==0.6.0 -flake8==2.5.0 +doc8==0.8.0 +flake8==3.6.0 pep257==0.7.0 -pylint==1.7.2 +pylint<=2.2.2 # pylint 2.2.2 is not released on Python 2.7.x -rrequirements-test.txt diff --git a/requirements-test.txt b/requirements-test.txt index d74d772..c7dd809 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,8 +1,8 @@ -pytest==3.0.2 -pytest-cov==2.3.1 -mock==1.3.0 -tox==2.2.1 +pytest==4.1.0 +pytest-cov==2.6.1 +mock==2.0.0 +tox==3.6.1 configobj==5.0.6 # Note you need at least pip --version of 6.0 or # higher to be able to pick on these version specifiers. -unittest2==1.1.0; python_version == '2.6' +unittest2==1.1.0; python_version == '2.7' diff --git a/scripts/ci/install b/scripts/ci/install index 17f66a9..116f684 100755 --- a/scripts/ci/install +++ b/scripts/ci/install @@ -20,9 +20,9 @@ try: except KeyError: python_version = '.'.join([str(i) for i in sys.version_info[:2]]) -run('pip install -r requirements-test.txt') +run('pip install -U -r requirements-test.txt') if os.path.isdir('dist') and os.listdir('dist'): shutil.rmtree('dist') run('python setup.py bdist_wheel') wheel_dist = os.listdir('dist')[0] -run('pip install %s' % (os.path.join('dist', wheel_dist))) +run('pip install -U %s' % (os.path.join('dist', wheel_dist))) diff --git a/setup.py b/setup.py index 5696838..8618623 100644 --- a/setup.py +++ b/setup.py @@ -6,9 +6,9 @@ requires = [ - 'awscli>=1.16.10,<2.0.0', - 'prompt-toolkit>=1.0.0,<1.1.0', - 'boto3>=1.9.0,<2.0.0', + 'awscli>=1.16.87,<2.0.0', + 'prompt-toolkit>=1.0.15,<2.0.0', + 'boto3>=1.9.77,<3.0.0', 'configobj>=5.0.6,<6.0.0', 'Pygments>=2.1.3,<3.0.0', ] @@ -55,5 +55,6 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ), )