From 6dfbeffa3aceddb4fd07c9582f7cdf880527c192 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 15 Aug 2020 22:38:37 +0200 Subject: [PATCH 1/2] Use tox for testing and CI Far simpler. Especially to quickly run tests locally. --- .github/workflows/tests.yml | 22 ++++++++++------------ Pipfile | 13 ------------- setup.py | 1 + tox.ini | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 25 deletions(-) delete mode 100644 Pipfile create mode 100644 tox.ini diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c0354ff..50bfc59 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,22 +9,20 @@ jobs: matrix: os: [ubuntu-18.04, macOS-10.14] python: [ '3.5', '3.6', '3.7' ] - extras: [ "", "[images]" ] - name: python${{ matrix.python }} on ${{ matrix.os }} ${{ matrix.extras }} + variant: [ "py", "py-images" ] + name: python${{ matrix.python }} on ${{ matrix.os }} ${{ matrix.variant }} steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} - architecture: x64 - - name: Install test dependencies - run: | - pip install --upgrade --no-cache-dir pipenv - pipenv install --dev - pipenv install .${{ matrix.extras }} + - name: Install test dependency + run: pip install tox codecov - name: Run tests - run: pipenv run pytest + run: tox + env: + TOXENV: ${{ matrix.variant }} - name: Report coverage - run: pipenv run codecov + run: codecov env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 22a34d1..0000000 --- a/Pipfile +++ /dev/null @@ -1,13 +0,0 @@ -[[source]] -name = "pypi" -url = "https://pypi.org/simple" -verify_ssl = true - -[dev-packages] -pytest = "*" -pytest-cov = "*" - -[packages] -python-barcode = {editable = true,path = "."} -pytest-cov = "*" -codecov = "*" diff --git a/setup.py b/setup.py index b9b380c..d4f28c5 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Multimedia :: Graphics", "Topic :: Software Development :: Libraries :: Python Modules", ], diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..61fc6a4 --- /dev/null +++ b/tox.ini @@ -0,0 +1,16 @@ +[tox] +envlist = {py35,py36,py37,py38}{,-images} +skip_missing_interpreters = True + +[testenv] +deps = + pytest + pytest-cov + images: Pillow +commands = pytest --cov barcode +usedevelop = True + +[flake8] +exclude=.tox,build,.eggs +application-import-names=barcode,tests +import-order-style=smarkets From 8ef3ed7f9caf4f2b6e3059ae63b31eff69af611f Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 15 Aug 2020 22:41:34 +0200 Subject: [PATCH 2/2] Drop support for Python 3.5 --- .github/workflows/tests.yml | 2 +- README.rst | 2 +- setup.py | 2 +- tox.ini | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 50bfc59..0617da7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, macOS-10.14] - python: [ '3.5', '3.6', '3.7' ] + python: [ '3.6', '3.7', '3.8' ] variant: [ "py", "py-images" ] name: python${{ matrix.python }} on ${{ matrix.os }} ${{ matrix.variant }} steps: diff --git a/README.rst b/README.rst index 80785e8..fce3d45 100644 --- a/README.rst +++ b/README.rst @@ -35,7 +35,7 @@ Please report any bugs at https://github.com/WhyNotHugo/python-barcode/issues Features -------- -- Works on Python 3.5 to 3.8 +- Works on Python 3.6 to 3.9 - No visualiser (just use your browser) - Generate barcodes as SVG files. - Generate barcodes as images (png, jpeg, etc). Requires Pillow. diff --git a/setup.py b/setup.py index d4f28c5..6231b73 100755 --- a/setup.py +++ b/setup.py @@ -23,10 +23,10 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Topic :: Multimedia :: Graphics", "Topic :: Software Development :: Libraries :: Python Modules", ], diff --git a/tox.ini b/tox.ini index 61fc6a4..09e934c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py35,py36,py37,py38}{,-images} +envlist = {py36,py37,py38,py39}{,-images} skip_missing_interpreters = True [testenv]