From ca45d2567035d7469a8d80cfcdb67f6aa2a4c858 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 9 Mar 2020 23:18:36 +1100 Subject: [PATCH 01/30] Update README.rst Added example on serial. --- README.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.rst b/README.rst index 3eebf6d..6e8901d 100644 --- a/README.rst +++ b/README.rst @@ -76,6 +76,25 @@ Another example based on the Network printer class: kitchen.text("Hello World\n") kitchen.barcode('1324354657687', 'EAN13', 64, 2, '', '') kitchen.cut() + +Another example based on the Network printer class: + +.. code:: python + + from escpos.printer import Serial + + """ 9600 Baud, 8N1, Flow Control Enabled """ + p = Serial(devfile='/dev/tty.usbserial', + baudrate=9600, + bytesize=8, + parity='N', + stopbits=1, + timeout=1.00, + dsrdtr=True) + + p.text("Hello World\n") + p.qr("You can readme from your smartphone") + p.cut() The full project-documentation is available on `Read the Docs `_. From 2ee3ff7f87016e97d74894f249bbb36796c813d2 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 9 Mar 2020 23:19:11 +1100 Subject: [PATCH 02/30] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6e8901d..bd36cbe 100644 --- a/README.rst +++ b/README.rst @@ -77,7 +77,7 @@ Another example based on the Network printer class: kitchen.barcode('1324354657687', 'EAN13', 64, 2, '', '') kitchen.cut() -Another example based on the Network printer class: +Another example based on the Serial printer class: .. code:: python From cc67cb1c1ed2f97b349d0ca5a7639caf0ef6c841 Mon Sep 17 00:00:00 2001 From: Maximilian Wagenbach Date: Wed, 11 Mar 2020 15:51:16 +0100 Subject: [PATCH 03/30] Added some documentation and error handling to the image center flag. --- src/escpos/escpos.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index bfab265..3fa7eee 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -106,6 +106,9 @@ class Escpos(object): * `graphics`: prints with the `GS ( L`-command * `bitImageColumn`: prints with the `ESC *`-command + When trying to center an image make sure you have initialized the printer with a valid profile, that + contains a media width pixel field. Otherwise the centering will have no effect. + :param img_source: PIL image or filename to load: `jpg`, `gif`, `png` or `bmp` :param high_density_vertical: print in high density in vertical direction *default:* True :param high_density_horizontal: print in high density in horizontal direction *default:* True @@ -117,6 +120,10 @@ class Escpos(object): im = EscposImage(img_source) try: + if self.profile.profile_data['media']['width']['pixels'] == "Unknown": + print("The media.width.pixel field of the printer profile is not set. " + + "The center flag will have no effect.") + max_width = int(self.profile.profile_data['media']['width']['pixels']) if im.width > max_width: From f49c1dcb8963e9e7f0938dc44cebdd978444ed59 Mon Sep 17 00:00:00 2001 From: Maximilian Wagenbach Date: Wed, 11 Mar 2020 15:56:51 +0100 Subject: [PATCH 04/30] Updating AUTHORS. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 2b5edc7..64eab60 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,6 +19,7 @@ Kristi ldos Lucy Linder Manuel F Martinez +Maximilian Wagenbach Michael Billington Michael Elsdörfer mrwunderbar666 From e350a49cada7e61152e80781328abc9efe0b33b1 Mon Sep 17 00:00:00 2001 From: Alexander Bougakov Date: Sun, 22 Mar 2020 13:36:49 +0300 Subject: [PATCH 05/30] Clarify the positions of vendor_id and product_id An existing example uses same value, `0x1a2b` in both `Vendor id` and `Product id` fields, which can confuse a new user. --- doc/user/usage.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/user/usage.rst b/doc/user/usage.rst index 37f234a..853484f 100644 --- a/doc/user/usage.rst +++ b/doc/user/usage.rst @@ -48,14 +48,16 @@ to have and the second yields the "Output Endpoint" address. By default the "Interface" number is "0" and the "Output Endpoint" address is "0x01". If you have other values then you can define them on -your instance. So, assuming that we have another printer where in\_ep is -on 0x81 and out\_ep=0x02, then the printer definition should look like: +your instance. So, assuming that we have another printer, CT-S2000, +manufactured by Citizen (with "Vendor ID" of 2730 and "Product ID" of 0fff) +where in\_ep is on 0x81 and out\_ep=0x02, then the printer definition should +look like: **Generic USB Printer initialization** :: - p = printer.Usb(0x1a2b,0x1a2b,0,0x81,0x02) + p = printer.Usb(0x2730, 0x0fff, 0, 0x81, 0x02) Network printer ^^^^^^^^^^^^^^^ From ae0a049efadc8047bca89c04dec76af05190e860 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 22:43:47 +0200 Subject: [PATCH 06/30] fix authors file --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 2b5edc7..6f28dd8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,6 @@ Ahmed Tahri akeonly +Alexander Bougakov Alex Debiasio Asuki Kono belono From a3660a636687041cdf5799ba813b6efb1e0b60c8 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:14:05 +0200 Subject: [PATCH 07/30] fix authors file --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 6f28dd8..92a374d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,6 +4,7 @@ Alexander Bougakov Alex Debiasio Asuki Kono belono +Brian Christoph Heuel Cody (Quantified Code Bot) csoft2k From a2db415559700f9ff71ff96debb7728127dc879c Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:19:31 +0200 Subject: [PATCH 08/30] remove authors --- AUTHORS | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 AUTHORS diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 01113f4..0000000 --- a/AUTHORS +++ /dev/null @@ -1,42 +0,0 @@ -Ahmed Tahri -akeonly -Alexander Bougakov -Alex Debiasio -Asuki Kono -belono -Christoph Heuel -Cody (Quantified Code Bot) -csoft2k -Curtis // mashedkeyboard -Davis Goglin -Dean Rispin -Dmytro Katyukha -Gerard Marull-Paretas -Hark -Joel Lehtonen -Justin Vieira -kennedy -Kristi -ldos -Lucy Linder -Manuel F Martinez -Maximilian Wagenbach -Michael Billington -Michael Elsdörfer -mrwunderbar666 -Nathan Bookham -Omer Akram -Patrick Kanzler -primax79 -Qian Linfeng -Ramon Poca -reck31 -Renato Lorenzi -Romain Porte -Sam Cheng -Sergio Pulgarin -Stephan Sokolow -Thijs Triemstra -Thomas van den Berg -Yaisel Hurtado -ysuolmai From 34cd1ebde1d452c7143c77df93518835167fd1fd Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:19:47 +0200 Subject: [PATCH 09/30] readd authors --- AUTHORS | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 AUTHORS diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..01113f4 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,42 @@ +Ahmed Tahri +akeonly +Alexander Bougakov +Alex Debiasio +Asuki Kono +belono +Christoph Heuel +Cody (Quantified Code Bot) +csoft2k +Curtis // mashedkeyboard +Davis Goglin +Dean Rispin +Dmytro Katyukha +Gerard Marull-Paretas +Hark +Joel Lehtonen +Justin Vieira +kennedy +Kristi +ldos +Lucy Linder +Manuel F Martinez +Maximilian Wagenbach +Michael Billington +Michael Elsdörfer +mrwunderbar666 +Nathan Bookham +Omer Akram +Patrick Kanzler +primax79 +Qian Linfeng +Ramon Poca +reck31 +Renato Lorenzi +Romain Porte +Sam Cheng +Sergio Pulgarin +Stephan Sokolow +Thijs Triemstra +Thomas van den Berg +Yaisel Hurtado +ysuolmai From 4d106e8659a134336fe45e84e5ff507bf638e45c Mon Sep 17 00:00:00 2001 From: Patrick Kanzler <4189642+patkan@users.noreply.github.com> Date: Fri, 8 May 2020 23:34:24 +0200 Subject: [PATCH 10/30] Create pythonpackage.yml --- .github/workflows/pythonpackage.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/pythonpackage.yml diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml new file mode 100644 index 0000000..407d0eb --- /dev/null +++ b/.github/workflows/pythonpackage.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + tox From 32c56e78eaec3b7645b87e2e9e3b9e992c126954 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:48:48 +0200 Subject: [PATCH 11/30] simplify branching model --- CONTRIBUTING.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4ad2108..f14bc2b 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -56,12 +56,9 @@ Apart from that the travis-log and the check by Landscape will provide you with GIT ^^^ -The master-branch contains code that has been released to PyPi. A release is marked with a tag -corresponding to the version. Issues are closed when they have been resolved in the development-branch. - -When you have a change to make, begin by creating a new branch from the HEAD of `python-escpos/development`. -Name your branch to indicate what you are trying to achieve. Good branch names might -be `improve/text-handling`, `feature/enable-color-printing`. +The master-branch contains the main development of the project. A release to PyPi is marked with a tag +corresponding to the version. Issues are closed when they have been resolved by merging into the master-branch. +When you have a change to make, begin by creating a new branch from the HEAD of `python-escpos/master`. Please try to group your commits into logical units. If you need to tidy up your branch, you can make use of a git feature called an 'interactive rebase' before making a pull request. A small, self-contained change-set is From e1e1ccb3f2cf466aaee79751a405000e2fc09be1 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:50:28 +0200 Subject: [PATCH 12/30] update trove identifiers --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7220055..e80f745 100755 --- a/setup.py +++ b/setup.py @@ -66,10 +66,10 @@ setup( 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', From 7c05404ac47b6c84b3c33ebc31a0ae86f7da427d Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:51:06 +0200 Subject: [PATCH 13/30] build docs with python 3 --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index ecf365d..d34f875 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,5 +3,5 @@ formats: - epub requirements_file: doc/requirements.txt python: - version: 2 + version: 3 setup_py_install: true \ No newline at end of file From cadf448c3845a3dacc75d4dd614d12060836efc5 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:53:35 +0200 Subject: [PATCH 14/30] update travis --- .travis.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index b31199d..e65bc6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,20 +29,16 @@ matrix: osx_image: xcode10.2 language: shell env: TOXENV=py37 ESCPOS_CAPABILITIES_FILE=/Users/travis/build/python-escpos/python-escpos/capabilities-data/dist/capabilities.json - - python: 2.7 - env: TOXENV=py27 - - python: 3.4 - env: TOXENV=py34 - python: 3.5 env: TOXENV=py35 - python: 3.6 env: TOXENV=py36 - - python: 3.6-dev - env: TOXENV=py36 - python: 3.7 env: TOXENV=py37 - python: 3.7-dev env: TOXENV=py37 + - python: 3.8 + env: TOXENV=py38 - python: 3.8-dev env: TOXENV=py38 - python: nightly @@ -51,13 +47,11 @@ matrix: env: TOXENV=pypy - python: pypy3 env: TOXENV=pypy3 - - python: 3.7 + - python: 3.8 env: TOXENV=docs - - python: 3.7 + - python: 3.8 env: TOXENV=flake8 allow_failures: - - python: 2.7 - - python: 3.6-dev - python: 3.7-dev - python: 3.8-dev - python: nightly @@ -86,4 +80,4 @@ deploy: tags: true repo: python-escpos/python-escpos branch: master - condition: $TRAVIS_PYTHON_VERSION = "3.7" + condition: $TRAVIS_PYTHON_VERSION = "3.8" From c53575a155ed328842daee09a892ffddedbc2331 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:02:28 +0200 Subject: [PATCH 15/30] update tox config --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9dc7a4f..7fcb593 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py34, py35, py36, py37, docs, flake8 +envlist = py35, py36, py37, py38, docs, flake8 [testenv] deps = nose From fe2e1a6d2853926377827e0037085bf70de71777 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:07:02 +0200 Subject: [PATCH 16/30] add tox task for vscode --- .vscode/tasks.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d4f4af7 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "test with tox", + "type": "shell", + "command": "tox", + "group": { + "kind": "test", + "isDefault": true + } + } + ] +} \ No newline at end of file From d9d400da6d3dc0e0af9c207be64e89a3a7e71615 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:07:35 +0200 Subject: [PATCH 17/30] ignore vscode settings --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index f8415e3..ba41934 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ test/test-cli-output/ *.swp *.swn *.swo + +# vscode +.vscode/settings.json From 4836dcd486dc40a37711dc9d8dce052cf4d60573 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:27:58 +0200 Subject: [PATCH 18/30] change pytest call in tox --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7fcb593..f2ea147 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps = nose pytest-mock hypothesis!=3.56.9,<4 viivakoodi -commands = py.test --cov escpos +commands = pytest --cov escpos passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* [testenv:docs] From 18c3a5f2983238f01f4cc74bce84eaee20fc2ca3 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:37:10 +0200 Subject: [PATCH 19/30] add capabilities to manifest --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index f1666ca..d8e439a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include LICENSE include INSTALL include tox.ini include capabilities-data/dist/capabilities.json +include src/escpos/capabilities.json recursive-include doc *.bat recursive-include doc *.ico recursive-include doc *.py From 95ec6d5c087c4461cfee5ffcc47583cb70e166af Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:39:41 +0200 Subject: [PATCH 20/30] update hypothesis --- setup.py | 2 +- test/test_printer_file.py | 3 --- tox.ini | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index e80f745..6f64650 100755 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ setup( 'nose', 'scripttest', 'mock', - 'hypothesis!=3.56.9,<4', + 'hypothesis>4', 'flake8' ], entry_points={ diff --git a/test/test_printer_file.py b/test/test_printer_file.py index 0ab23e2..304c347 100644 --- a/test/test_printer_file.py +++ b/test/test_printer_file.py @@ -28,7 +28,6 @@ else: @pytest.mark.skip("this test is broken and has to be fixed or discarded") -@settings(use_coverage=False) @given(path=text()) def test_load_file_printer(mocker, path): """test the loading of the file-printer""" @@ -40,7 +39,6 @@ def test_load_file_printer(mocker, path): @pytest.mark.skip("this test is broken and has to be fixed or discarded") -@settings(deadline=None, use_coverage=False) @given(txt=text()) def test_auto_flush(mocker, txt): """test auto_flush in file-printer""" @@ -62,7 +60,6 @@ def test_auto_flush(mocker, txt): @pytest.mark.skip("this test is broken and has to be fixed or discarded") -@settings(deadline=None, use_coverage=False) @given(txt=text()) def test_flush_on_close(mocker, txt): """test flush on close in file-printer""" diff --git a/tox.ini b/tox.ini index f2ea147..6a5a9d6 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = nose pytest!=3.2.0,!=3.3.0 pytest-cov pytest-mock - hypothesis!=3.56.9,<4 + hypothesis>4 viivakoodi commands = pytest --cov escpos passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* From 7aa20a60e37fff19d7a55cf9282328b0c02cec7a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:40:05 +0200 Subject: [PATCH 21/30] update capabilities --- capabilities-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capabilities-data b/capabilities-data index 8885283..3b5b35c 160000 --- a/capabilities-data +++ b/capabilities-data @@ -1 +1 @@ -Subproject commit 8885283d71a43758aa63d633fd2301df13dce9d5 +Subproject commit 3b5b35cfd35d297f9085ec16d47d1f77c3f1e768 From 5b6b96d2a0cd830719b7e4b4eefe5222fcc0a10a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:58:54 +0200 Subject: [PATCH 22/30] update changelog --- CHANGELOG.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d823f07..6360a69 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,10 +1,35 @@ ********* Changelog ********* +2020-05-09 - Version 3.0a7 - "No Fixed Abode" +--------------------------------------------- +This release is the eight alpha release of the new version 3.0. +Please be aware that the API is subject to change until v3.0 +is released. + +This release also marks the point at which the project transitioned +to having only a master-branch (and not an additional development branch). + +changes +^^^^^^^ +- add Exception for NotImplementedError in detach_kernel_driver +- update installation information +- update and improve documentation +- add error handling to image centering flag +- update and fix tox and CI environment, preparing drop of support for Python 2 + +contributors +^^^^^^^^^^^^ +- Alexander Bougakov +- Brian +- Yaisel Hurtado +- Maximilan Wagenbach +- Patrick Kanzler + 2019-06-19 - Version 3.0a6 - "Mistake not..." --------------------------------------------- This release is the seventh alpha release of the new version 3.0. -Please be aware the the API is subject to change until v3.0 is +Please be aware that the API is subject to change until v3.0 is released. changes From ecbdd43dffa9dda556872dddbf9e97280f10811c Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:03:45 +0200 Subject: [PATCH 23/30] install tox in github ci --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 407d0eb..f4b57d4 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest tox if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | From baffd98a22e863f8dc589fb1073712cadddc7adb Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:05:35 +0200 Subject: [PATCH 24/30] use focal on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e65bc6d..5977b79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python sudo: false cache: pip -dist: xenial +dist: focal git: depth: 100000 addons: From 7ea58625e6ed7af4181a528772a1506f86a68636 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:08:16 +0200 Subject: [PATCH 25/30] use tox plugin for github --- .github/workflows/pythonpackage.yml | 4 ++-- tox.ini | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f4b57d4..f8360ae 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest tox + pip install flake8 pytest tox tox-gh-actions if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | @@ -34,6 +34,6 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + - name: Test with tox run: | tox diff --git a/tox.ini b/tox.ini index 6a5a9d6..53211f3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,13 @@ [tox] envlist = py35, py36, py37, py38, docs, flake8 +[gh-actions] +python = + 2.7: py27 + 3.6: py36 + 3.7: py37 + 3.8: py38 + [testenv] deps = nose jaconv From fd7bd0710e171684651d5a16debec94331ca4b97 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:11:38 +0200 Subject: [PATCH 26/30] set path to capabilities file --- .github/workflows/pythonpackage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f8360ae..ffebe1d 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -37,3 +37,4 @@ jobs: - name: Test with tox run: | tox + env: ESCPOS_CAPABILITIES_FILE=/home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json From f0b1a89c481cabd254ea3acbe8d5e53dfc553216 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:19:32 +0200 Subject: [PATCH 27/30] fix syntax --- .github/workflows/pythonpackage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index ffebe1d..0b0cd90 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -37,4 +37,5 @@ jobs: - name: Test with tox run: | tox - env: ESCPOS_CAPABILITIES_FILE=/home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json + env: + ESCPOS_CAPABILITIES_FILE: /home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json From 673105745612ea031718f9bd1e3415bb578b4368 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:25:28 +0200 Subject: [PATCH 28/30] checkout submodules on github --- .github/workflows/pythonpackage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 0b0cd90..2c2e3eb 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: 'recursive' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: From 6c27222aebf8bc3dbab7fa28c90a213d52da4244 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:30:38 +0200 Subject: [PATCH 29/30] use bionic on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5977b79..e73318c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python sudo: false cache: pip -dist: focal +dist: bionic git: depth: 100000 addons: From fe08fc1469c1e27c3466c7671cfdbabaf9440486 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:34:36 +0200 Subject: [PATCH 30/30] drop pypy --- .travis.yml | 2 -- setup.py | 1 - 2 files changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e73318c..39b238e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,8 +43,6 @@ matrix: env: TOXENV=py38 - python: nightly env: TOXENV=py38 - - python: pypy - env: TOXENV=pypy - python: pypy3 env: TOXENV=pypy3 - python: 3.8 diff --git a/setup.py b/setup.py index 6f64650..f067fa2 100755 --- a/setup.py +++ b/setup.py @@ -71,7 +71,6 @@ setup( 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Office/Business :: Financial :: Point-Of-Sale', ],