Commit Graph

21 Commits

Author SHA1 Message Date
Patrick Kanzler 815f247df1
Improve test coverage and fix issue in path loading (#602)
* reactivate skipped tests

* remove unused internal interfaces

* enable pytest in VS Code

* simplify and fix path logic in loader

* increase test coverage

* test missing config

* check for wrong printer names

* Skipped appdir test
2023-12-06 00:25:36 +01:00
Patrick Kanzler ecfeeb9b13
Improve diagnostic output (#577)
* add extended version information

* autodocument argparser

* add spelling exception

* fix docstrings

* add annotations

* use typing types

* add test
2023-10-05 14:15:19 +02:00
Patrick Kanzler fbabd8ed88
Drop Py37, improve typing and docstrings (#544)
Drops Py3.7, improves typing and adds a mypy config, improves the docstrings and isorts the imports.

* configure isort
* sort with isort
* add github action
* enable flake8-docstrings
* fix docstrings
* add mypy env
* no implicit optional
* add type for raw
* add some type hints
2023-08-15 01:03:36 +02:00
Patrick Kanzler 4c2dcdfac6
Clean up tests and migrate (#540)
* migrate
  * abstract base class test
  * remove assert_equal in test_cli
  * remove nose from test_cli
  * remove nose dependencies
  * use tempfile
* configure coverage
  * flag python version in name
  * enable comment
* drop EOL py37
2023-08-10 00:18:02 +02:00
Patrick Kanzler e9e8b10582
Fixes from ci (#533)
* break line

* remove unused imports

* remove unused os import

* make flake8 more strict

* configure flake for black

* fix action

* use importlib_resources

* rename deprecated methods
2023-07-21 23:03:46 +02:00
Patrick Kanzler 435f2bba24 reformat codebase 2021-10-30 18:15:22 +02:00
Patrick Kanzler e898413464 change useage of assert_equal(s) 2020-11-08 21:29:18 +01:00
Romain Porte cb30d7a881 drop Python 2.7 support
Python 2.7 EOL is arriving on 2020-01-01: https://pythonclock.org/

This will allow us to use Python 3 only libraries, like python-barcode,
which can maintain a reduced, simpler codebase, due to only one version
to support.

Closes #371.

Signed-off-by: Romain Porte <microjoe@microjoe.org>
2020-05-10 10:55:44 +02:00
Patrick Kanzler c2fc464c55
reformat PEP8 and similar issues 2017-01-30 00:10:14 +01:00
Michael Elsdörfer d246e945a2 Merge branch 'capabilities' into text-encoding 2016-08-30 17:47:31 +02:00
Michael Elsdörfer 1bd53697b9 Fix the CLI test inside pytest runner. 2016-08-30 17:47:09 +02:00
Patrick Kanzler 0cfedb5706 add automatic codepage-changing
This code is adapted from the works by Frédéric Van der Essen in
pyxmlescpos.
I had to adapt the code completely in order to make it compatible with
modern unicode-handling

Further changes:
* improve text unittests in CLI and MagicEncode with hypothesis
* add feature force_encoding in order to enable old behaviour
* disable cli_text_test (for now)
* fix charcode(): it does now cooperate with the new structure
* remove redundant variable codepage from class Escpos
2016-08-02 04:42:21 +02:00
Patrick Kanzler 9f5eed0020
add version-strings into the module
The version string is in the module as __version__ available.
In the doc the version will be automatically parsed. The version comes
from the installed module if on read the docs or directly from
setuptools_scm if you are working locally.
The CLI will issue the version string if you call it with the option
'version'. The CLI does not accept commands like '--version', since this
would not be conform with the rest of the interface (and argparse).

The configuration for loading the version-string is adapted from
pimutils/vdirsyncer. It autogenerates a version string setuptools_scm at
install-time and then adds it to the __version__ member in __init__.py

I adapted the GitHub-template with a fitting comment and bumped the
changelog.

closes #141
2016-07-17 19:39:42 +02:00
Patrick Kanzler 0121aa0bfb
REFACTOR add PEP8-newlines 2016-04-02 15:29:51 +02:00
Davis Goglin 39da32ca85 Define class vars first in __init__ 2016-03-30 13:38:27 -07:00
Davis Goglin e545999aa2 Convert class methods to static 2016-03-30 13:38:03 -07:00
Davis Goglin 3017c14df2 Add future imports 2016-03-30 13:31:21 -07:00
Davis Goglin 39165fcb41 Fix tests I just wrote then broke 2016-03-28 15:21:16 -07:00
Davis Goglin cabb2c930a Add docstring to TestCLI class 2016-03-28 15:01:40 -07:00
Davis Goglin 0c3f273fa1 Clear test dir 2016-03-28 14:57:06 -07:00
Davis Goglin 76f300ea18 Fix text argument 2016-03-28 14:51:48 -07:00