From eafa7498b28f3a81819e1e51ed8858a74114ef37 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 20 Oct 2022 02:18:03 +0200 Subject: [PATCH] CI: Remove Travis CI, and tox (#705) --- .travis.yml | 67 -------------- README.md | 2 +- apprise/plugins/NotifyBulkSMS.py | 3 +- dev-requirements.txt | 1 - test/test_plugin_glib.py | 2 +- test/test_plugin_gnome.py | 2 +- tox.ini | 144 ------------------------------- 7 files changed, 4 insertions(+), 217 deletions(-) delete mode 100644 .travis.yml delete mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9260d6bd..00000000 --- a/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ -language: python - -dist: focal - -addons: - apt: - packages: - - libdbus-1-dev - -matrix: - include: - - python: "3.6" - env: TOXENV=py36 - - python: "3.7" - env: TOXENV=py37 - - python: "3.8" - env: TOXENV=py38 - - python: "3.9" - env: TOXENV=py39 - - python: "3.10" - env: TOXENV=py310 - - python: "3.11-dev" - env: TOXENV=py311 - # PyPy Environments - - python: "pypy3.6-7.3.3" - env: TOXENV=pypy36 - - python: "pypy3.9-7.3.9" - env: TOXENV=pypy39 - # An extra environment where additional packages are not installed - - python: "3.9" - env: - - TOXENV=bare - -install: - - pip install babel - - # Use up-to-date versions of tox, pip, virtualenv, and wheel. - - pip install --upgrade tox pip virtualenv wheel - - # cryptography 3.3 is the last one not needing a Rust toolchain. Let's use it for PyPy. - - if [[ $TOXENV == 'pypy'* ]]; then pip install "cryptography<3.4"; fi - - # Install project dependencies. - - pip install codecov - - pip install -r dev-requirements.txt - - pip install -r requirements.txt - - # bare installs do not include extra package dependencies - - if [[ $TOXENV != 'bare' ]]; then pip install -r all-plugin-requirements.txt; fi - # pypy and bare installs do not include dbus-python - - if [[ $TOXENV != 'bare' ]] && [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install dbus-python; fi - - # Fix/workaround: Python 3.7 importlib-metadata becomes incompatible with flake8, - # unless we use a version that still supports EntryPoints.get(). - # `tox.ini` has been updated to not call flake8 on Python 3.7. - - if [[ $TOXENV == 'py37' || $TOXENV == 'pypy37' ]]; then pip uninstall --yes flake8; fi - -# run tests -script: - - tox - -after_success: - - tox -e coverage-report - - codecov - -notifications: - email: false diff --git a/README.md b/README.md index bbc62918..53460061 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ System Administrators and DevOps who wish to send a notification now no longer n [![Follow](https://img.shields.io/twitter/follow/l2gnux)](https://twitter.com/l2gnux/)
[![Discord](https://img.shields.io/discord/558793703356104724.svg?colorB=7289DA&label=Discord&logo=Discord&logoColor=7289DA&style=flat-square)](https://discord.gg/MMPeN2D) [![Python](https://img.shields.io/pypi/pyversions/apprise.svg?style=flat-square)](https://pypi.org/project/apprise/) -[![Build Status](https://travis-ci.com/caronc/apprise.svg?branch=master)](https://app.travis-ci.com/github/caronc/apprise) +[![Build Status](https://github.com/caronc/apprise/actions/workflows/tests.yml/badge.svg)](https://github.com/caronc/apprise/actions/workflows/tests.yml) [![CodeCov Status](https://codecov.io/github/caronc/apprise/branch/master/graph/badge.svg)](https://codecov.io/github/caronc/apprise) [![PyPi](https://img.shields.io/pypi/dm/apprise.svg?style=flat-square)](https://pypi.org/project/apprise/) diff --git a/apprise/plugins/NotifyBulkSMS.py b/apprise/plugins/NotifyBulkSMS.py index 8fa54642..eaf2a18b 100644 --- a/apprise/plugins/NotifyBulkSMS.py +++ b/apprise/plugins/NotifyBulkSMS.py @@ -30,7 +30,6 @@ # API is documented here: # - https://www.bulksms.com/developer/json/v1/#tag/Message import re -import six import requests import json from itertools import chain @@ -192,7 +191,7 @@ class NotifyBulkSMS(NotifyBase): # Setup our route self.route = self.template_args['route']['default'] \ - if not isinstance(route, six.string_types) else route.upper() + if not isinstance(route, str) else route.upper() if self.route not in BULKSMS_ROUTING_GROUPS: msg = 'The route specified ({}) is invalid.'.format(route) self.logger.warning(msg) diff --git a/dev-requirements.txt b/dev-requirements.txt index 03e01a3e..e304524c 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,5 +4,4 @@ pytest pytest-cov pytest-mock pytest-xdist -tox babel diff --git a/test/test_plugin_glib.py b/test/test_plugin_glib.py index 959d1bf9..71153170 100644 --- a/test/test_plugin_glib.py +++ b/test/test_plugin_glib.py @@ -68,7 +68,7 @@ def setup_glib_environment(): importlib.reload(sys.modules['apprise.plugins.NotifyDBus']) # We need to fake our dbus environment for testing purposes since - # the gi library isn't available in Travis CI + # the gi library isn't available on CI gi = types.ModuleType(gi_name) gi.repository = types.ModuleType(gi_name + '.repository') diff --git a/test/test_plugin_gnome.py b/test/test_plugin_gnome.py index 11159141..9eab4913 100644 --- a/test/test_plugin_gnome.py +++ b/test/test_plugin_gnome.py @@ -58,7 +58,7 @@ def setup_glib_environment(): reload_plugin('NotifyGnome') # We need to fake our gnome environment for testing purposes since - # the gi library isn't available in Travis CI + # the gi library isn't available on CI gi = types.ModuleType(gi_name) gi.repository = types.ModuleType(gi_name + '.repository') gi.module = types.ModuleType(gi_name + '.module') diff --git a/tox.ini b/tox.ini deleted file mode 100644 index f3715a57..00000000 --- a/tox.ini +++ /dev/null @@ -1,144 +0,0 @@ -[tox] -envlist = py36,py37,py38,py39,py310,py311.pypy36,pypy39,bare,coverage-report - -[testenv] -# Prevent random setuptools/pip breakages like -# https://github.com/pypa/setuptools/issues/1042 from breaking our builds. -setenv = - VIRTUALENV_NO_DOWNLOAD=1 -deps= - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:py36] -deps= - dbus-python - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:py37] -deps= - dbus-python - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - -[testenv:py38] -deps= - dbus-python - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:py39] -deps= - dbus-python - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:py310] -deps= - dbus-python - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:py311] -deps= - dbus-python - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run --parallel -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:bare] -deps= - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:pypy36] -deps= - # cryptography 3.3 is the last one not needing a Rust toolchain. - cryptography<3.4 - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:pypy37] -deps= - # cryptography 3.3 is the last one not needing a Rust toolchain. - cryptography<3.4 - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - -[testenv:pypy38] -deps= - # cryptography 3.3 is the last one not needing a Rust toolchain. - cryptography<3.4 - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:pypy39] -deps= - # cryptography 3.3 is the last one not needing a Rust toolchain. - cryptography<3.4 - -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt - -r{toxinidir}/all-plugin-requirements.txt -commands = - python setup.py compile_catalog - coverage run -m pytest {posargs} - flake8 . --count --show-source --statistics - -[testenv:coverage-report] -deps = coverage -skip_install = true -commands= - coverage combine - coverage xml - coverage report